?
avatar brianteeman
brianteeman
15 Mar 2017

The new ability to create admin menus is awesome.
When you have created an admin menu etc then you can see a list of the admin menu items that you have created.
The Available Sort orders in the select box are the same ones that are used for the frontend menu items - this is not correct as admin menu items do not have as many fields to sort by

screenshotr22-03-50

avatar brianteeman brianteeman - open - 15 Mar 2017
avatar joomla-cms-bot joomla-cms-bot - change - 15 Mar 2017
Labels Added: ?
avatar joomla-cms-bot joomla-cms-bot - labeled - 15 Mar 2017
avatar brianteeman
brianteeman - comment - 15 Mar 2017

Paging @izharaazmi

avatar infograf768
infograf768 - comment - 18 Mar 2017

Not only the sort, but also the language filter in searchtools should not display.


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

avatar yasirunilan
yasirunilan - comment - 18 Mar 2017

so can we remove the language filter in the searchtools??

avatar infograf768
infograf768 - comment - 18 Mar 2017

Here is patch that will remove for admin_menus language and access filters, which are not used.
It does not solve fully the sorting list.

diff --git a/administrator/components/com_menus/views/items/view.html.php b/administrator/components/com_menus/views/items/view.html.php
index a8b499f..2d94a20 100644
--- a/administrator/components/com_menus/views/items/view.html.php
+++ b/administrator/components/com_menus/views/items/view.html.php
@@ -249,4 +249,13 @@
 		}
 
+		if ($this->state->get('filter.client_id') == 1)
+		{
+			unset($this->activeFilters['language']);
+			$this->filterForm->removeField('language', 'filter');
+
+			unset($this->activeFilters['access']);
+			$this->filterForm->removeField('access', 'filter');
+		}
+
 		// Allow a system plugin to insert dynamic menu types to the list shown in menus:
 		JEventDispatcher::getInstance()->trigger('onBeforeRenderMenuItems', array($this));
@@ -358,14 +367,28 @@
 	protected function getSortFields()
 	{
-		return array(
-			'a.lft'       => JText::_('JGRID_HEADING_ORDERING'),
-			'a.published' => JText::_('JSTATUS'),
-			'a.title'     => JText::_('JGLOBAL_TITLE'),
-			'a.home'      => JText::_('COM_MENUS_HEADING_HOME'),
-			'a.access'    => JText::_('JGRID_HEADING_ACCESS'),
-			'association' => JText::_('COM_MENUS_HEADING_ASSOCIATION'),
-			'language'    => JText::_('JGRID_HEADING_LANGUAGE'),
-			'a.id'        => JText::_('JGRID_HEADING_ID')
-		);
+		$this->state = $this->get('State');
+
+		if ($this->state->get('filter.client_id') == 0)
+		{
+			return array(
+				'a.lft'       => JText::_('JGRID_HEADING_ORDERING'),
+				'a.published' => JText::_('JSTATUS'),
+				'a.title'     => JText::_('JGLOBAL_TITLE'),
+				'a.home'      => JText::_('COM_MENUS_HEADING_HOME'),
+				'a.access'    => JText::_('JGRID_HEADING_ACCESS'),
+				'association' => JText::_('COM_MENUS_HEADING_ASSOCIATION'),
+				'language'    => JText::_('JGRID_HEADING_LANGUAGE'),
+				'a.id'        => JText::_('JGRID_HEADING_ID')
+			);
+		}
+		else
+		{
+			return array(
+				'a.lft'       => JText::_('JGRID_HEADING_ORDERING'),
+				'a.published' => JText::_('JSTATUS'),
+				'a.title'     => JText::_('JGLOBAL_TITLE'),
+				'a.id'        => JText::_('JGRID_HEADING_ID')
+			);
+		}
 	}
 }

It gives:
screen shot 2017-03-18 at 18 35 14

avatar infograf768
infograf768 - comment - 19 Mar 2017

Ok, found how to solve this, including sorting.
Making a PR now.

avatar infograf768 infograf768 - change - 19 Mar 2017
Status New Closed
Closed_Date 0000-00-00 00:00:00 2017-03-19 17:52:33
Closed_By infograf768
avatar joomla-cms-bot joomla-cms-bot - close - 19 Mar 2017
avatar joomla-cms-bot
joomla-cms-bot - comment - 19 Mar 2017
avatar infograf768
infograf768 - comment - 19 Mar 2017

Closed as we have a patch #14786


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

Add a Comment

Login with GitHub to post a comment