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
Labels |
Added:
?
|
Not only the sort, but also the language filter in searchtools should not display.
so can we remove the language filter in the searchtools??
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')
+ );
+ }
}
}
Ok, found how to solve this, including sorting.
Making a PR now.
Status | New | ⇒ | Closed |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2017-03-19 17:52:33 |
Closed_By | ⇒ | infograf768 |
Set to "closed" on behalf of @infograf768 by The JTracker Application at issues.joomla.org/joomla-cms/14655
Closed as we have a patch #14786
Paging @izharaazmi