? ? Pending

User tests: Successful: Unsuccessful:

avatar izharaazmi
izharaazmi
12 Aug 2017

Pull Request for Issue #17406 .

Summary of Changes

Admin Menus:
Show language icons for menus which contain home menu items for a language. And home icon which contains global home page.

For details please refer to the mentioned issue #17406

Testing Instructions

Create menu items under different menus and set some menu items as default for different languages in each menu type.

Expected result

Respective language flags should be displayed in admin menu "Menu" dropdown.

Documentation Changes Required

None

avatar joomla-cms-bot joomla-cms-bot - change - 12 Aug 2017
Category Administration com_menus Modules Libraries
avatar izharaazmi izharaazmi - open - 12 Aug 2017
avatar izharaazmi izharaazmi - change - 12 Aug 2017
Status New Pending
avatar izharaazmi
izharaazmi - comment - 12 Aug 2017

@infograf768 Please test this one.

avatar brianteeman
brianteeman - comment - 12 Aug 2017

Why is this introducing a css file instead of using the images as before?

Its a little more complex as a result as if we add a language or flag then the css will need to be updated as well

avatar izharaazmi
izharaazmi - comment - 12 Aug 2017

I am adding this to make it reusable at other places (core or custom
extensions) with a simple icon class instead of full IMG tag. That's why I
left it within the mod_languages context instead of adding in mod_menu.
Updating CSS should not be an issue IMHO.

avatar brianteeman
brianteeman - comment - 12 Aug 2017

for me that change is beyond the scope of this PR.

avatar izharaazmi izharaazmi - change - 12 Aug 2017
Labels Added: ?
avatar izharaazmi
izharaazmi - comment - 12 Aug 2017

@brianteeman Please have a look at this now. I have removed the CSS definitions and usage.

avatar franz-wohlkoenig franz-wohlkoenig - test_item - 13 Aug 2017 - Tested successfully
avatar franz-wohlkoenig
franz-wohlkoenig - comment - 13 Aug 2017

I have tested this item successfully on c7b9352


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

avatar infograf768
infograf768 - comment - 13 Aug 2017

@izharaazmi
Works fine here and I set my test OK.

I suggest to make another PR (or add in this one) to take care of the situation where, by mistake or db corruption, 2 or more Home pages exist in a single menuType.
This was taken care of previously when we had

elseif ($menuType->home > 1)
		{
			$titleicon = ' <span>'
				. JHtml::_('image', 'mod_languages/icon-16-language.png', $menuType->home, array('title' => JText::_('MOD_MENU_HOME_MULTIPLE')), true)
				. '</span>';
		}

with the existing string
MOD_MENU_HOME_MULTIPLE="Warning! Multiple homes!"

To test this, create a multilang site as usual, define a flag/icon for a content language then in the db, set to home another menu item than the usual home for that language in the same menu type.
We will get correctly the generic icon in the menu. Here for German main menu:

screen shot 2017-08-13 at 08 37 51

But I think we should also display a warning in the Menu items Manager and modify the value of this lang string to include the name of the menutype with a sprintf.

Can do?

avatar infograf768 infograf768 - test_item - 13 Aug 2017 - Tested successfully
avatar infograf768
infograf768 - comment - 13 Aug 2017

I have tested this item successfully on c7b9352


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

avatar franz-wohlkoenig franz-wohlkoenig - change - 13 Aug 2017
Status Pending Ready to Commit
avatar franz-wohlkoenig
franz-wohlkoenig - comment - 13 Aug 2017

RTC after two successful tests.

avatar izharaazmi
izharaazmi - comment - 13 Aug 2017

@infograf768 It's already taken care of. Please let me know if it's failing.

avatar izharaazmi
izharaazmi - comment - 13 Aug 2017

Though the warning is not displayed. We can do that in another PR.

avatar infograf768
infograf768 - comment - 13 Aug 2017

@izharaazmi
Ok for another PR. ? This one can go in in the meanwhile. Thanks

avatar mbabker mbabker - change - 13 Aug 2017
Status Ready to Commit Fixed in Code Base
Closed_Date 0000-00-00 00:00:00 2017-08-13 15:38:40
Closed_By mbabker
Labels Added: ?
avatar mbabker mbabker - close - 13 Aug 2017
avatar mbabker mbabker - merge - 13 Aug 2017

Add a Comment

Login with GitHub to post a comment