Menu items list parent filter#17060
Conversation
| <option value="">JOPTION_SELECT_MAX_LEVELS</option> | ||
| </field> | ||
| <field | ||
| name="parent_id" |
There was a problem hiding this comment.
It's late.. and drone didn't fail! :/ now fixed. Thanks!
There was a problem hiding this comment.
Drone is JS tests...don't be blaming drone :P
| COM_MENUS_XML_DESCRIPTION="Component for creating menus." | ||
| JLIB_RULES_SETTING_NOTES="Changes apply to this component only.<br /><em><strong>Inherited</strong></em> - a Global Configuration setting or higher level setting is applied.<br /><em><strong>Denied</strong></em> always wins - whatever is set at the Global or higher level and applies to all child elements.<br /><em><strong>Allowed</strong></em> will enable the action for this component unless it is overruled by a Global Configuration setting." | ||
| COM_MENUS_FILTER_SELECT_PARENT_MENU_ITEM="- Select Parent Menu Item -" | ||
| COM_MENUS_FILTER_PARENT_MENU_ITEM="Parent Menu Item" |
There was a problem hiding this comment.
COM_MENUS_FILTER_PARENT_MENU_ITEM_LABEL please
|
Cool thank you :) Will test it asap |
|
Test failed :( Select 'Site Map' as parent_id and the list does indeed filter to show the correct subitems but the 'search tools disappear' - you need to add parent_id and a.parent_id to $config['filter_fields'] in the model constructor otherwise the 'search tools' disappear when you select a parent filter (with no other filters enabled). Additionally it would be good for the parent item list to be filtered based on the main 'menu filter'. |
|
@GeraintEdwards i altered your unsuccessfully Test at issue Tracker. |
|
Thanks @GeraintEdwards now resolved. |
|
I have tested this item ✅ successfully on ad24cdb This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/17060. |
…Menu Type if is filtered by Menu Type.
|
Now updated @coolcat-creations @GeraintEdwards to include a custom field type which dynamically filters the menu items by menu type if the menu items in the list are already filter by type. |
|
@rdeutz jenkis php70 docker isn't connecting? |
|
I have tested this item ✅ successfully on 0b3ed6f This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/17060. |
|
@GeraintEdwards can you please retest? |
|
I have tested this item ✅ successfully on 0b3ed6f This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/17060. |
|
RTC after two successful tests. |
|
@tonypartridge you don't need to care about the new jenkins setup, we are still in testing mode |
|
That's fine, just didn't think it gets accepted unless all tests are passed.
Thanks!
…On 12 Jul 2017, 10:45 +0100, Robert Deutz ***@***.***>, wrote:
@tonypartridge you don't need to care about the new jenkins setup, we are still in testing mode
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub, or mute the thread.
|
|
travis and drone are required |
| // Build the options array. | ||
| foreach ($items as $key => $link) | ||
| { | ||
|
|
There was a problem hiding this comment.
This is standard from the original menuitem.php file
| COM_MENUS_VIEW_NEW_MENU_TITLE="Menus: Add" | ||
| COM_MENUS_XML_DESCRIPTION="Component for creating menus." | ||
| JLIB_RULES_SETTING_NOTES="Changes apply to this component only.<br /><em><strong>Inherited</strong></em> - a Global Configuration setting or higher level setting is applied.<br /><em><strong>Denied</strong></em> always wins - whatever is set at the Global or higher level and applies to all child elements.<br /><em><strong>Allowed</strong></em> will enable the action for this component unless it is overruled by a Global Configuration setting." | ||
| COM_MENUS_FILTER_SELECT_PARENT_MENU_ITEM="- Select Parent Menu Item -" |
|
Made some slight changes as per @Quy 's request. Should not need retesting, nothing has changed apart from code style. |
|
Actually, the lines should be moved after line 39. |
| name="parent_id" | ||
| type="menuitembytype" | ||
| label="COM_MENUS_FILTER_PARENT_MENU_ITEM_LABEL" | ||
| description="COM_MENUS__FILTER_PARENT_MENU_DESC" |
There was a problem hiding this comment.
Fix typo. Use COM_MENUS_FILTER_PARENT_MENU_ITEM_DESC
| COM_MENUS_FIELD_VALUE_NEW_WITHOUT_NAV="New Without Navigation" | ||
| COM_MENUS_FIELD_VALUE_PARENT="Parent" | ||
| COM_MENUS_FIELDSET_RULES="Permissions" | ||
| COM_MENUS_FILTER_SELECT_PARENT_MENU_ITEM="- Select Parent Menu Item -" |
There was a problem hiding this comment.
These have to be in alpha order.
COM_MENUS_FILTER_PARENT_MENU_ITEM_DESC
COM_MENUS_FILTER_PARENT_MENU_ITEM_LABEL
COM_MENUS_FILTER_SELECT_PARENT_MENU_ITEM
|
@tonypartridge it's nothing you can really count on, if they have failed I look into it and most of the time it is simply a wrong test result |
| JFormHelper::loadFieldClass('groupedlist'); | ||
|
|
||
| // Import the com_menus helper. | ||
| require_once realpath(JPATH_ADMINISTRATOR . '/components/com_menus/helpers/menus.php'); |
There was a problem hiding this comment.
Use JLoader::register() here.
| */ | ||
| public function setup(SimpleXMLElement $element, $value, $group = null) | ||
| { | ||
| $app = JFactory::getApplication('administrator'); |
There was a problem hiding this comment.
You can move this line down to inside the if (!$menuType) as you aren't always using the app.
| } | ||
|
|
||
| $groups[$menu->title][] = JHtml::_('select.option', | ||
| $link->value, $levelPrefix . $link->text . $lang, |
There was a problem hiding this comment.
If you're going to split the parameters across multiple lines, there should be one parameter per line (this line has two)
|
I’ve just copied the core Joomla! Menuitem.php type……..
…On 19 Jul 2017, 13:14 +0100, Michael Babker ***@***.***>, wrote:
@mbabker commented on this pull request.
In administrator/components/com_menus/models/fields/menuitembytype.php:
> + foreach ($menu->links as $link)
+ {
+ $levelPrefix = str_repeat('- ', $link->level - 1);
+
+ // Displays language code if not set to All
+ if ($link->language !== '*')
+ {
+ $lang = ' (' . $link->language . ')';
+ }
+ else
+ {
+ $lang = '';
+ }
+
+ $groups[$menu->title][] = JHtml::_('select.option',
+ $link->value, $levelPrefix . $link->text . $lang,
If you're going to split the parameters across multiple lines, there should be one parameter per line (this line has two)
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub, or mute the thread.
|
* staging: (274 commits) Add JCryptCipherSodium to support libsodium (joomla#16754) Performance 2 (libraries/legacy) (joomla#12220) Performance 6 (templates) (joomla#12233) Fixed typehint (joomla#16425) Fix for: Repeatable field is no longer rendered with Chosen layout (joomla#16471) Fix the path for the ajax-loader.gif (joomla#16701) Menu items list parent filter (joomla#17060) Text Filters layout (joomla#17113) mod_login showon option (joomla#17153) com_banners incorret tooltip (joomla#17157) fix joomla.content.options_default (joomla#17123) remove the never working limitstart call (joomla#17184) Update phpDocumentor build set 3.8.0 Dev State Prepare 3.7.4 Stable Release fixed a logic change in joomla#12294, thanks @Hoffi1 Update sv-SE.ini Update pt-BR.ini Update lv-LV.ini Update fa-IR.ini ...
Pull Request for Issue #16882 .
Summary of Changes
Removes duplicate state filter
Added parent_id filtering
Testing Instructions
Install patch, view list of menu items. Select search tools to show more search options and a new filter is on the right. called '- Select Parent Menu Item -'.