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.
| Comment | File | Size | Author |
|---|---|---|---|
| #5 | prev_next_event_0.patch | 850 bytes | darren oh |
| #3 | prev_next_event.patch | 848 bytes | greggles |
Comments
Comment #1
Tobias Maier commentedpatch missing...
Comment #2
Tobias Maier commentedComment #3
gregglesSorry about that...
Comment #4
darren ohI 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.
Comment #5
darren ohI 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.
Comment #6
Steve Dondley commented+1 I've hacked my own copy of event.module to do the same. Thanks for providing a patch.
Comment #7
RayZ commented+1 patch in #5 RTBC
Comment #8
killes@www.drop.org commentedlet 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.
Comment #9
gregglesKilles - 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.
Comment #10
killes@www.drop.org commentedI think my preferred solution is to blow up the guillemets through some additional CSS.
Comment #11
killes@www.drop.org commentedSeparating 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
Comment #12
gregglesThe 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.
Comment #13
gregglesI 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.
Comment #14
gerhard killesreiter commentedhttp://drupal.org/node/65573#comment-120831
Comment #15
hyperlogos commentedDepending 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:
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.
Comment #16
killes@www.drop.org commentedas a rule of thumb I feel very bad about additional config options.
Comment #17
darren ohMartin, 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.
Comment #18
gregglesNot sure if this status is still right, but I know the assigned is not ;)
Comment #19
japerryEvent 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.