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

Projects
None yet
9 participants
@brianteeman
Contributor

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

Create custom admin article menus
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
@tonypartridge

This comment has been minimized.

Contributor

tonypartridge commented Jun 27, 2018

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"

This comment has been minimized.

@Quy

Quy Jun 27, 2018

Contributor

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"

This comment has been minimized.

@Quy

Quy Jun 27, 2018

Contributor

Lowercase C and add a period.

brianteeman added some commits Jun 27, 2018

@carlitorweb

This comment has been minimized.

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

This comment has been minimized.

Contributor

brianteeman commented Jun 27, 2018

Sorry I don't understand

</field>
<field
name="filter_tag"

This comment has been minimized.

@carlitorweb

carlitorweb Jun 27, 2018

Contributor

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

@tonypartridge

This comment has been minimized.

Contributor

tonypartridge commented Jun 27, 2018

@mbabker

This comment has been minimized.

Member

mbabker commented Jun 27, 2018

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

@tonypartridge

This comment has been minimized.

Contributor

tonypartridge commented Jun 27, 2018

@mbabker

This comment has been minimized.

Member

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

This comment has been minimized.

Contributor

tonypartridge commented Jun 27, 2018

@carlitorweb

This comment has been minimized.

Contributor

carlitorweb commented Jun 27, 2018

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

@brianteeman

This comment has been minimized.

Contributor

brianteeman commented Jun 27, 2018

Gotya. Will update.

@brianteeman

This comment has been minimized.

Contributor

brianteeman commented Jun 27, 2018

@SharkyKZ can you check the filters please

@carlitorweb

This comment has been minimized.

Contributor

carlitorweb commented Jun 27, 2018

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

This comment has been minimized.

Contributor

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

This comment has been minimized.

Contributor

carlitorweb commented Jun 27, 2018

Roger that. So, this work perfect!

@carlitorweb

This comment has been minimized.

Contributor

carlitorweb commented Jun 27, 2018

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

This comment has been minimized.

Contributor

SharkyKZ commented Jun 27, 2018

Filters OK.

@tonypartridge

This comment has been minimized.

Contributor

tonypartridge commented Jun 28, 2018

@brianteeman

This comment has been minimized.

Contributor

brianteeman commented Jun 28, 2018

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

@carlitorweb

This comment has been minimized.

Contributor

carlitorweb commented Jul 6, 2018

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>

This comment has been minimized.

@Quy

Quy Jul 6, 2018

Contributor

Remove trailing tabs

description="COM_MENUS_ADMIN_ACCESS_DESC"
multiple="true"
filter="int_array"
/>

This comment has been minimized.

@Quy

Quy Jul 6, 2018

Contributor

Remove trailing tab

brianteeman added some commits Jul 6, 2018

@Quy

This comment has been minimized.

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

This comment has been minimized.

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 label Jul 6, 2018

@mbabker mbabker changed the base branch from staging to 3.9-dev Jul 7, 2018

@mbabker mbabker added PR-3.9-dev and removed PR-staging labels Jul 7, 2018

@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

4 of 5 checks passed

JTracker/HumanTestResults Human Test Results: 1 Successful 0 Failed.
Details
Hound No violations found. Woof!
continuous-integration/appveyor/pr AppVeyor build succeeded
Details
continuous-integration/drone/pr the build was successful
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details

@joomla-cms-bot joomla-cms-bot removed the RTC label Jul 7, 2018

@brianteeman

This comment has been minimized.

Contributor

brianteeman commented Jul 7, 2018

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

@brianteeman brianteeman deleted the brianteeman:custom_admin_menu branch Jul 7, 2018

@helpwise

This comment has been minimized.

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.. ?

@franz-wohlkoenig

This comment has been minimized.

franz-wohlkoenig 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

This comment has been minimized.

helpwise commented Aug 30, 2018

Oh - yes - sorry! :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment