The current calendar layout uses « and » as the navigation to go forward/back a month at a time. I got complaints from users that they couldn't figure out how to navigate previous/next months using these controls - basically a usability problem.

This patch adds the text 'prev' and 'next' just next to the current controls. By using the t() function these labels can now be "translated" to a new string if users desire using this method: http://drupal.org/node/24593

I wasn't sure if it should be

l('«'.t('prev')
or
l(t('«prev')

To me the first approach is desirable because users are unlikely to be able to find the « strings when the search to manage strings. This has the drawback of users not being able to remove the « if they do not like it.

CommentFileSizeAuthor
#5 prev_next_event_0.patch850 bytesdarren oh
#3 prev_next_event.patch848 bytesgreggles

Comments

Tobias Maier’s picture

patch missing...

Tobias Maier’s picture

Status: Needs review » Needs work
greggles’s picture

Status: Needs work » Needs review
StatusFileSize
new848 bytes

Sorry about that...

darren oh’s picture

Status: Needs review » Reviewed & tested by the community

I love this patch. Please commit it to both 4.7 and CVS. I made one small change: next» and «prev are now next » and « prev.

darren oh’s picture

StatusFileSize
new850 bytes

I love this patch. Please commit it to both 4.7 and CVS. I made one small change: next» and «prev are now next » and « prev.

Steve Dondley’s picture

+1 I've hacked my own copy of event.module to do the same. Thanks for providing a patch.

RayZ’s picture

+1 patch in #5 RTBC

killes@www.drop.org’s picture

let me state why I don't like this patch too much:

1) "prev" doesn't appear to be good english,
2) these links are also used on the small event block. While "prev" and "next" only take up little screen estate, translations might not.

greggles’s picture

Killes - I originally put in "previous" and the feedback from the users was "previous is too long, just use 'prev'". I'd be happy to use previous for the patch if you'd like.

For number 2, I don't use the little block so I didn't notice that. What about separating the labels used in the little calendar from those used in the big calendar? If you agree with that idea then I can work on that.

killes@www.drop.org’s picture

I think my preferred solution is to blow up the guillemets through some additional CSS.

killes@www.drop.org’s picture

Separating them would be ok, too.

I still think that nicer CSS would be a nicer solution, though. Steven and Morbus also found some nice unicode arrows we could use instead of the guillemets.

02:31 < MorbusIff> killes: http://www.unicode.org/charts/PDF/U2190.pdf
02:31 < UnConeD> U+25c4 and U+25ba in http://www.unicode.org/charts/PDF/U25A0.pdf

greggles’s picture

The most important thing to me is to make them some sort of text that is easy for a user to find using the locale search menu so that they can be changed via that method. Unicode fanciness isn't useful for that technique.

Even if the CSS were changed to just make the unicode fancy characters larger, I'm not sure that it would have solved the original problem from my users.

greggles’s picture

I got another complaint about this - the quote is "How do you navigate from one day, week, or month to the next?"

I applied this same patch to make the users happier.

gerhard killesreiter’s picture

Status: Reviewed & tested by the community » Needs work
hyperlogos’s picture

Depending on how you feel about this, this would either be best handled by a configuration option or by just using css. If you wrap the next and prev in a span or something, then you can just use the :before and :after psuedo-elements to insert some text:

span.event-prev:after { content: "previous" }
span.event-next:before { content: "next" }

so in this hypothetical example you have a left arrow for previous and a right arrow for next. This will put the text inside the arrows.

But if you don't like doing it through CSS, then really there should be two text field config options; one for the previous text, and one for the next, and if you leave either blank nothing is printed for it at all. Personally I'd like the option to also use php for the text, but that's not as critical to me.

killes@www.drop.org’s picture

as a rule of thumb I feel very bad about additional config options.

darren oh’s picture

Martin, can you submit a patch of your CSS solution? If you need help, send me working copies of the modified files and I'll create a patch from them.

greggles’s picture

Assigned: greggles » Unassigned

Not sure if this status is still right, but I know the assigned is not ;)

japerry’s picture

Status: Needs work » Closed (outdated)

Event for Drupal 8 is unrelated to older versions. If an issue similar to this one exists, please open a new issue with the 8.x branch.