User tests: Successful: Unsuccessful:
This PR sorts the menutypes in the backend in alphabetical order and not in order how they were first created some ancient time ago.
Labels |
Added:
?
|
Category | ⇒ | Administration UI/UX |
Easy | No | ⇒ | Yes |
I get the following error
Strict Standards: Only variables should be passed by reference in /Applications/MAMP/htdocs/joomla-cms-staging/administrator/modules/mod_menu/tmpl/default_enabled.php on line 142
Ooops: I have the same, haven't seen it when testing before (blush).
Sorry, fixed that one. I even looked at the source of JArrayHelper::sortObjects() and saw the reference, but missed it...
@test Success. Works now without PHP warnings after correction.
What would be perfect of course wold be to have an ordering column for the menus, as we have for the menu items, and show them in this order in the menu (which can be modified by drag and drop in the menu manager).
@test the Strict standards issue has now been fixed.
I now see that this change isnt applied in Hathor. Not sure if that uses an override ?
@brianteeman Yes, I just see Hathor has an override mod_menu/default_enabled.php.
@test I've forgotten Hathor (blush).
Not sure I like this one. In my multilingual test site, the menus which were created one language after the other are now disordered.
Also, the sorting done in this PR is different in mod_menu vs the dropdown in "Menu Manager: Menu items"
In mod_menu all menus starting with a Capital letter are grouped first, not in the dropdown where it it is not case sensitive, i.e.
mod_menu
Mainmenu
Top menu
[...]
my menu
toys menu
Dropdown
Mainmenu
my menu
[...]
Top menu
toys menu
If it was decided to alpha sort the menus, the second solution is much better imho
can be used instead, to solve at least the case sensitive issue (IF we sort alpha)
$menuTypes = JArrayHelper::sortObjects($menuTypes, 'title', $direction = 1, $caseSensitive = false, $locale = true);
or, shorter
$menuTypes = JArrayHelper::sortObjects($menuTypes, 'title', 1, false, true);
we would get
instead of
changing locale to false has apparently no effect here.
I've changed the sorting to be case-insensitive and added the change to Hathor, too. I also first thought I enabled the local-aware sorting, but then noticed that that feature is actually implemented pretty stupidly... I would have to hand in the locale by which to sort and not simply true or false and quite frankly, the amount of code that would have to be written to do this properly is simply not worth the gain we maybe would get. As far as I can see, it would only make sure that letters like o and ö would be grouped next to each other in German for example. However, I think that it already orders via UTF8 and I guess that that takes care of this already anyway... Mind you, that is not based on hard facts, but a hunch.
In any case, I guess this is now ready for final testing/merging, depending on if this is actually a wanted feature. However, if we don't do this, we should remove the ordering in the menu manager filter dropdown to keep this consistent.
I agree it should be consistent, thus why I proposed the code.
@test all works well for me - thanks for this @Hackwar
However, if we don't do this, we should remove the ordering in the menu manager filter dropdown to keep this consistent.
I dont see this filter?
if you go into the list view of a menu in the menu manager, you can switch between the menus that are displayed. That is the dropdown that I'm talking about.
Ah gotcha
On 13 Jan 2015 10:18, "Hannes Papenberg" notifications@github.com wrote:
if you go into the list view of a menu in the menu manager, you can switch
between the menus that are displayed. That is the dropdown that I'm talking
about.—
Reply to this email directly or view it on GitHub
#5683 (comment).
Fine here. Merging. Thanks.
Status | Pending | ⇒ | Closed |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2015-01-14 09:10:51 |
@test Success.
This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/5683.