Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sort Template positions in module template positions dropdown #5682

Merged
merged 1 commit into from Jan 15, 2015

Conversation

Hackwar
Copy link
Member

@Hackwar Hackwar commented Jan 12, 2015

This PR sorts the template positions in the module manager when selecting the position for the template by template and then by position. It also takes into account the translated name of the position.

How to test

  1. Go into the module manager, edit a module, see that the positions are not in alphabetical order.
  2. Apply patch
  3. See that the positions are ordered (and grouped) by template first and then in the respective template group, ordered alphabetically by position.

@brianteeman
Copy link
Contributor

Aren't they in the order that they are listed in the templateDetails.xml
file

A template creator may have placed them in specific order and this will
change that for example I might have grouped the positions in an order that
they are displayed moving down the page

  • Header
  • Menu
  • Top
  • Left
  • Right
  • Footer

On 12 January 2015 at 12:22, Hannes Papenberg notifications@github.com
wrote:

This PR sorts the template positions in the module manager when selecting
the position for the template by template and then by position. It also
takes into account the translated name of the position.
How to test

  1. Go into the module manager, edit a module, see that the positions
    are not in alphabetical order.
  2. Apply patch
  3. See that the positions are ordered (and grouped) by template first
    and then in the respective template group, ordered alphabetically by
    position.

You can merge this Pull Request by running

git pull https://github.com/Hackwar/joomla-cms modulepositionordering

Or view, comment on, or merge it at:

#5682
Commit Summary

  • Sort Template positions in drop down

File Changes

Patch Links:


Reply to this email directly or view it on GitHub
#5682.

Brian Teeman
Co-founder Joomla! and OpenSourceMatters Inc.
http://brian.teeman.net/

@Hackwar
Copy link
Member Author

Hackwar commented Jan 12, 2015

Yes, they are displayed in the order that they are in the XML. And yes, it might be in the order that they appear in the template. I would however argue that it is a lot simpler for the user when the positions are in alphabetical order. Especially for a user that already knows which position he wants, which I would argue is the case in 90% of the cases, it's quicker to look out for the alphabetical order than the other way around. When I know I want "Right", its quicker for me to find the position under R, than to remember that it is below "heading" and "left", but above "content-top".

That would also assume that all template developers consciously order/group the positions in the XML.

@brianteeman
Copy link
Contributor

I am not saying its wrong to change to alphasort. Personally I add
positions to my xml as i create them so they are ordered - maybe others
don't. Maybe it is better to have them alphasorted. I am just pointing out
that there is a legitimate use case for them not being alphasorted

On 12 January 2015 at 12:56, Hannes Papenberg notifications@github.com
wrote:

Yes, they are displayed in the order that they are in the XML. And yes, it
might be in the order that they appear in the template. I would however
argue that it is a lot simpler for the user when the positions are in
alphabetical order. Especially for a user that already knows which position
he wants, which I would argue is the case in 90% of the cases, it's quicker
to look out for the alphabetical order than the other way around. When I
know I want "Right", its quicker for me to find the position under R, than
to remember that it is below "heading" and "left", but above "content-top".

That would also assume that all template developers consciously
order/group the positions in the XML.


Reply to this email directly or view it on GitHub
#5682 (comment).

Brian Teeman
Co-founder Joomla! and OpenSourceMatters Inc.
http://brian.teeman.net/

@richard67
Copy link
Member

@test Success.
screen shot 2015-01-12 at 14 30 48
... And no PHP warning, too ;-)


This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/5682.

@waader
Copy link
Contributor

waader commented Jan 14, 2015

@test works!

@zero-24
Copy link
Member

zero-24 commented Jan 14, 2015

Moving to RTC Thanks to all!


This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/5682.

@brianteeman brianteeman added the RTC This Pull Request is Ready To Commit label Jan 14, 2015
@rdeutz rdeutz added this to the Joomla! 3.4.0 milestone Jan 15, 2015
rdeutz added a commit that referenced this pull request Jan 15, 2015
Sort Template positions in module template positions dropdown

Thanks all :-)
@rdeutz rdeutz merged commit a14caed into joomla:staging Jan 15, 2015
@Hackwar Hackwar deleted the modulepositionordering branch January 15, 2015 22:09
@zero-24 zero-24 removed the RTC This Pull Request is Ready To Commit label Oct 14, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

7 participants