User tests: Successful: Unsuccessful:
This patch creates in "Category Manager: Banners" 4 new columns with the number of banners per category. It contains a helper file for com_banners that is used in com_categories to calculate the number of banner items (published, unpublished, archived, and trashed) in each category.
The Category Manager: Banners (Components > Banners > Categories) does not display the number of banners in each category.
Create some new banners that are unpublished, trashed & archived (tip: name the unpublished banner "Unpublished Banner" to test if the calculations are correct).
Note This patch works only in combination with #6916. Install both #6916 and this patch (the order of installation does not matter, you just need both).
After installing the patch, The Category Manager: Banners (Components > Banners > Categories) should displays 4 new columns.
In Extensions > Template Manager > Select Hathor
Before the patch:
Labels |
Added:
?
|
Labels |
Added:
?
|
Status | New | ⇒ | Pending |
Rel_Number | 0 | ⇒ | 6916 |
Relation Type | ⇒ | Not before | |
Easy | No | ⇒ | Yes |
Category | ⇒ | Administration UI/UX |
Labels |
Added:
?
|
on issue #6934 (count for BANNERS), I noticed that clicking on "zeros" would still show all banners of the category, no matter their "status".
But apparently, this little bug only occurs for com_banners (works fine for the current com_content, for com_contact and com_newsfeed)
Thank you both for testing. I've analysed & reproduced the problem: The status filter of the com_banners component works differently from other components.
The category manager com_categories creates number counters with hyperlinks with status filter &filter[published]=. All components listen for the "Select Status" filter to &filter[published]= (and expect a statuscode of 0,1,2 and -2).
However the banner component listens to &filter[state]=.
What's the best way to "catch" the variable filter[published] and set the filter[state]?
Hi Peter,
Your question is a bit too technical for me.
Good sense would say : if the Banner Component is the only one to use [state] instead of [published], maybe we should fix the Banner Component instead of changing "state" by "published" on the fly ?
But maybe this is a stupid suggestion, I am not a developer :-)
I've changed the 'state' field to 'published' in the filter administrator/components/com_banners/models/forms/filter_banners.xml and in the banners model.
Now this PR (in combination with PR #6916) displays a working "banner item counts" in the Category Manager: Banners that are hyperlinked correctly to ** Banner Manager: Banners** with filtered items on published & category filter.
Hi Peter,
I have just tested.
I confirm : the filters do now work perfectly also for Banner Component
Txs
Status | Pending | ⇒ | Ready to Commit |
Labels |
Added:
?
|
Milestone |
Added: |
Status | Ready to Commit | ⇒ | Closed |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2015-06-03 14:03:32 |
Closed_By | ⇒ | Bakual |
Labels |
Removed:
?
|
Thanks @losedk !
I've corrected it and uploaded a new patch.