Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create custom admin article menus #20890

Merged
merged 7 commits into from Jul 7, 2018

Conversation

brianteeman
Copy link
Contributor

@brianteeman brianteeman commented Jun 27, 2018

See #20233 for detailed explanation of the use case

Test Instructions

Create and enable an admin menu with the "Joomla preset"

Create a new admin menu item of type article list and you can see you now have a full set of filters that you can apply.

For example you can now create menu items in the admin to each category.

If approved I will create the same option for other components

This does not resolve everything on #20233 as it still needs field categories to be implemented for that

Thanks to @tonypartridge for his help

See joomla#20233 for detailed explanation of the use case

### Test Instructions

Create and enable an admin menu with the "Joomla preset"

Create a new admin menu item of type article list and you can see you now have a full set of filters that you can apply.

For example you can now create menu items in the admin to each category.

If approved I will create the same option for other components

This does not resolve everything on joomla#20233 as it still needs field categories to be implemented for that
@joomla-cms-bot joomla-cms-bot added Language Change This is for Translators PR-staging labels Jun 27, 2018
@tonypartridge
Copy link
Contributor

love it, will give it a test soon 👌

name="filter_language"
type="contentlanguage"
label="COM_MENUS_ADMIN_LANGUAGE_LABEL"
description="COM_MENUS_ADMIN_LANGUAGE_LABEL"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Change to COM_MENUS_ADMIN_LANGUAGE_DESC

@@ -9,6 +9,18 @@ COM_MENUS_ACTION_DESELECT="Deselect"
COM_MENUS_ACTION_EXPAND="Expand"
COM_MENUS_ACTION_SELECT="Select"
COM_MENUS_ADD_MENU_MODULE="Add a module for this menu"
COM_MENUS_ADMIN_AUTHOR_DESC="Filter by author."
COM_MENUS_ADMIN_AUTHOR_LABEL="Author"
COM_MENUS_ADMIN_CATEGORY_DESC="Filter by Category"
Copy link
Contributor

@Quy Quy Jun 27, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Lowercase C and add a period.

@carlitorweb
Copy link
Contributor

carlitorweb commented Jun 27, 2018

Can add filters to the new fields, or in this case is not necessary? following what doing in others PRs

@brianteeman
Copy link
Contributor Author

Sorry I don't understand

</field>

<field
name="filter_tag"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

for example, add to this field the filter="int_array"

@tonypartridge
Copy link
Contributor

tonypartridge commented Jun 27, 2018 via email

@mbabker
Copy link
Contributor

mbabker commented Jun 27, 2018

He's talking about input filters (essentially JFactory::getApplication()->input->get('foo', 'default', $filter);, not the UI filters.

@tonypartridge
Copy link
Contributor

tonypartridge commented Jun 27, 2018 via email

@mbabker
Copy link
Contributor

mbabker commented Jun 27, 2018

You're still missing the point here I'm afraid.

The filter="whatever" attribute sets what data type something is filtered/validated as when it is read from the request in the JForm API when filtering/validating data. So if you set filter="int" on a field, then when the field's data is read from the request it is filtered/validated as an integer.

@tonypartridge
Copy link
Contributor

tonypartridge commented Jun 27, 2018 via email

@carlitorweb
Copy link
Contributor

@tonypartridge Sorry for no explain well when i ask about this. Thank you @mbabker

@brianteeman
Copy link
Contributor Author

Gotya. Will update.

@brianteeman
Copy link
Contributor Author

@SharkyKZ can you check the filters please

@carlitorweb
Copy link
Contributor

When you create an admin menu item to display a list of all articles there is no option to select a filter so the article list displays all the articles.

So, this is well covered in this PR. Except, not for the Statue and Access levels. Also, will be good do the same with the featured articles view

@brianteeman
Copy link
Contributor Author

brianteeman commented Jun 27, 2018

I did think about status and access but there is no point. A users ACL addresses the access and I don't want to pre-filter on status - thats not a good idea.

As for the featured view thats a special type of thing and it doesnt match the use case for this - my 2c

@carlitorweb
Copy link
Contributor

Roger that. So, this work perfect!

@carlitorweb
Copy link
Contributor

I have tested this item ✅ successfully on 921f0e1


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

@SharkyKZ
Copy link
Contributor

Filters OK.

@tonypartridge
Copy link
Contributor

tonypartridge commented Jun 28, 2018 via email

@brianteeman
Copy link
Contributor Author

@tonypartridge ah - I was thinking of ACL and not access levels - i will add it

@carlitorweb
Copy link
Contributor

I have tested this item ✅ successfully on 8284fd0


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

filter="int_array"
>
<option value="0">JNONE</option>
</field>
Copy link
Contributor

@Quy Quy Jul 6, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove trailing tabs

description="COM_MENUS_ADMIN_ACCESS_DESC"
multiple="true"
filter="int_array"
/>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove trailing tab

@Quy
Copy link
Contributor

Quy commented Jul 6, 2018

I have tested this item ✅ successfully on aa76e5b

RTC


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

@Quy
Copy link
Contributor

Quy commented Jul 6, 2018

RTC


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

@joomla-cms-bot joomla-cms-bot added the RTC This Pull Request is Ready To Commit label Jul 6, 2018
@mbabker mbabker changed the base branch from staging to 3.9-dev July 7, 2018 16:32
@mbabker mbabker added this to the Joomla 3.9.0 milestone Jul 7, 2018
@mbabker mbabker merged commit 3ddbac5 into joomla:3.9-dev Jul 7, 2018
@joomla-cms-bot joomla-cms-bot removed the RTC This Pull Request is Ready To Commit label Jul 7, 2018
@brianteeman
Copy link
Contributor Author

Thanks for merging. I will add the same for other components now.

@helpwise
Copy link

helpwise commented Aug 30, 2018

Thanks for this effort Brian et al,.. to make this thing really sing, is it possible to add 'Category Template Layout' selector to the new category menu item ?

The Category Menu already has 'template selector', but it only works on single articles and not the category list/blog files (because the list/blog is inherently the category template via an XML file ).
#19613

Perhaps create a new menu item called "Category (templateable)" so all the old stuff is compatible, and then allow it to properly override both the category and article layouts.. ?

@ghost
Copy link

ghost commented Aug 30, 2018

@helpwise can you please open a new Issue (and Link to this PR) as Comments on closed Issues didn't get much Notice?

@helpwise
Copy link

Oh - yes - sorry! :)

@brianteeman brianteeman mentioned this pull request Jan 15, 2023
4 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Language Change This is for Translators
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

8 participants