? ? Pending

User tests: Successful: Unsuccessful:

avatar brianteeman
brianteeman
13 Mar 2017

We can now create admin and site menus and they are sperated in the dropdown menu by a line - but there is no way to tell which group are site and which group are administrator menu items

This PR adds a Title to each group
The Administrator menu title will not display if there are no admin menus created

After

screenshotr14-05-31

avatar brianteeman brianteeman - open - 13 Mar 2017
avatar brianteeman brianteeman - change - 13 Mar 2017
Status New Pending
avatar joomla-cms-bot joomla-cms-bot - change - 13 Mar 2017
Category Administration Language & Strings Modules
avatar wilsonge
wilsonge - comment - 13 Mar 2017

Just to put it out there. To stop this list getting too long is it worth having site and admin as the only top level items in the menu's tab and then having the actual menus as a child (as we can't have 3rd level children we'd have to remove the create menu item i guess)

avatar brianteeman
brianteeman - comment - 13 Mar 2017

Yes that would be useful especially on multilingual sites with lots of
menus BUT thats a much bigger code task (I think) and would be better to
wait until 3.7+ instead of adding it in at this late stage

http://www.avg.com/email-signature?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=webmail
Virus-free.
www.avg.com
http://www.avg.com/email-signature?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=webmail
<#DAB4FAD8-2DD7-40BB-A1B8-4E2AA1F9FDF2>

On 13 March 2017 at 14:54, George Wilson notifications@github.com wrote:

Just to put it out there. To stop this list getting too long is it worth
having site and admin as the only top level items in the menu's tab and
then having the actual menus as a child (as we can't have 3rd level
children we'd have to remove the create menu item i guess)


You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
#14578 (comment),
or mute the thread
https://github.com/notifications/unsubscribe-auth/ABPH8XQffXdhUeDPLPaF3alyM81kuKczks5rlVivgaJpZM4MbTMb
.

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

avatar brianteeman
brianteeman - comment - 13 Mar 2017

@wilsonge it might not make too much sense though on a site with only Site menus

avatar wilsonge
wilsonge - comment - 13 Mar 2017

Fair point. This seems like a good step in the right direction tho :)

avatar brianteeman
brianteeman - comment - 13 Mar 2017

ofc

avatar infograf768
infograf768 - comment - 14 Mar 2017

Not sure about this change: a module does not display a module

-MOD_MENU_XML_DESCRIPTION="This module displays an administrator menu module."
+MOD_MENU_XML_DESCRIPTION="This module shows the main administrator navigation module."

For Frontend, we use
This module displays a menu on the Frontend.

Suggestion:
MOD_MENU_XML_DESCRIPTION="This module displays a main administrator navigation in the backend."

I used a anyway instead of the as there can be multiple admin menus.

avatar infograf768
infograf768 - comment - 14 Mar 2017

Also, I suggest to bold these new type of separators.
I.e.
use
$this->addChild(new JMenuNode('<strong>' . JText::_('MOD_MENU_MENU_MANAGER_SITE_MENUS') . '</strong>', null, null, false));

and
$this->addChild(new JMenuNode('<strong>' . JText::_('MOD_MENU_MENU_MANAGER_ADMIN_MENUS') . '</strong>', null, null, false));

which gives
screen shot 2017-03-14 at 09 42 19

This will differentiate with normal menu items

In this case, we could simply use JSITE and JADMINISTRATOR as it is obvious that we are in Menus

Could not find a way for these to not be highlighted, as this is also a bit confusing.

avatar brianteeman
brianteeman - comment - 14 Mar 2017

I agree they should be bold - I will update that soon - I was looking for a clever way and didnt find it - didnt think about just using strong

avatar brianteeman
brianteeman - comment - 14 Mar 2017

Not sure why I updated the xml description - you are correct that this is wrong. I will update that as well

avatar brianteeman brianteeman - change - 14 Mar 2017
Labels Added: ? ?
avatar infograf768
infograf768 - comment - 14 Mar 2017

I found a way to not highlight these new types of separator:

menushightlight

I added:

diff --git a/administrator/modules/mod_menu/menu.php b/administrator/modules/mod_menu/menu.php
index 7233c28..a1fe179 100644
--- a/administrator/modules/mod_menu/menu.php
+++ b/administrator/modules/mod_menu/menu.php
@@ -223,5 +223,9 @@
 		$linkClass = ' class="' . implode(' ', $linkClass) . '"';
 
-		if ($this->_current->link != null && $this->_current->target != null)
+		if ($this->_current->link == null && $this->_current->title =! null)
+		{
+			echo '<span>' . $this->_current->title . '</span>';
+		}
+		elseif ($this->_current->link != null && $this->_current->target != null)
 		{
 			echo '<a' . $linkClass . ' ' . $dataToggle . ' href="' . $this->_current->link . '" target="' . $this->_current->target . '">'

Could someone check if that would have unwanted consequences?

avatar infograf768
infograf768 - comment - 14 Mar 2017
avatar infograf768
infograf768 - comment - 14 Mar 2017

shall i make a pr towards your branch?

avatar brianteeman
brianteeman - comment - 14 Mar 2017

@infograf768 another option would be to create a method similar to

public function addSeparator()

eg public function addSeperatorTitle()

avatar izharaazmi
izharaazmi - comment - 14 Mar 2017

I'd rather add an optional title attribute to the existing separator.

avatar izharaazmi
izharaazmi - comment - 14 Mar 2017

Or maybe just add another level for [All Site Menu Items] > [each as submenu item] and similar for administrator ones.

Both ways are equally appropriate IMO.

avatar brianteeman
brianteeman - comment - 14 Mar 2017

If you can do the program then I am all for it

avatar izharaazmi
izharaazmi - comment - 14 Mar 2017

Which one do you prefer, if any?

avatar brianteeman
brianteeman - comment - 14 Mar 2017

My preference would be the heading option rather than the submenu as that
will have less impact on a site with few menus

On 14 Mar 2017 9:12 p.m., "Izhar Aazmi" notifications@github.com wrote:

Which one do you prefer, if any?


You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
#14578 (comment),
or mute the thread
https://github.com/notifications/unsubscribe-auth/ABPH8Q7bfanuZWBzGOgLA1pkguTrO7x2ks5rlwK4gaJpZM4MbTMb
.

avatar izharaazmi
izharaazmi - comment - 14 Mar 2017

I'll do that. Right now is 3 AM. Good Night folks ?

avatar brianteeman
brianteeman - comment - 29 Mar 2017

@izharaazmi did you get anywhere with this?

avatar izharaazmi
izharaazmi - comment - 30 Mar 2017

I'll look at this today.

avatar izharaazmi
izharaazmi - comment - 30 Mar 2017

Please see #15002.

avatar zero-24
zero-24 - comment - 30 Mar 2017

Closing as we have a PR thanks @izharaazmi

avatar zero-24 zero-24 - change - 30 Mar 2017
Status Pending Closed
Closed_Date 0000-00-00 00:00:00 2017-03-30 13:43:17
Closed_By zero-24
avatar zero-24 zero-24 - close - 30 Mar 2017

Add a Comment

Login with GitHub to post a comment