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
Added Article count (published, unpublished, trashed) to Category Man… #6916
Conversation
…ager for com_content component.
Doesnt this require an update for the hathor template overrided On 10 May 2015 at 12:46, Peter Martin notifications@github.com wrote:
Brian Teeman |
Yes, thanks, you are right about that. Could you please test this PR with the default Isis template? If there are no errors then I will write and add a fix for the Hathor template override. This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/6916. |
@pe7er can you try to fix the Travis errors?
and agline the new code into the views? If you would i can do a PR against yours 😄 |
Oops... Thanks, I'll do that later... (reminder to myself: reconfigure PHPStorm to use real tabs) This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/6916. |
I would prefer them all to be left aligned. BUT whatever you do it should On 10 May 2015 at 13:26, zero-24 notifications@github.com wrote:
Brian Teeman |
Not sure I understand why
On 10 May 2015 at 13:29, zero-24 notifications@github.com wrote:
Brian Teeman |
Thank you both for all feedback!
|
Really?
|
I don't like com_content specific checks in com_categories. There is already a category helper which defines the respective table and state field for a component. Maybe that could be used to get the counts? |
Also you may want to check the space used for that information. There is a lengthy title for only a number, which in the end cuts down space for the (much more important) title. Maybe just the icon as title would be sufficient? Or some UI guy has a clever idea? |
Yeah, change This feature is very nice and can be used in your own custom components!!! This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/6916. |
I like this change. About a possible lengthy title: One solution could be, the that holds the title to have two lines so the information Alias span to a new line. Also |
I'm working on all the feedback and will even implement some extra functionality + better layout very soon... This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/6916. |
Actually you cant create them as there is no ability ti save the category ;) |
Sorry, why? Just because you don't use this status? ;-)
Yes, but just because you cannot archive menu items. |
I've made some changes in the Category Manager: This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/6916. |
change line 159 to p Alias can be as lengthy as the title and for languages like German with very long words this can be a problem. |
Ok, makes sense about "Archive.
|
@dgt41 Thanks for your feedback. I agree about the aliases. However, in your screenshot there are no multiple level sub categories. I've to check how it looks to put the alias on the next line with the sub categories. This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/6916. |
@Bakual I agree with you that it's not so nice to have com_content specific checks in com_categories. If (3rd party) components would be able to add their own count using a helper file that works together with com_categories, then it would be much better... I'll check out your suggestion some other time soon. This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/6916. |
Mhh. sorry Travis... my code failed :-( I'll correct it soon, but some other time. This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/6916. |
I've fixed the undefined constant notice + footer td colspan. |
The query
works excellent, @Bakual! It gives all catids + state (or use published if your table uses that) + number of items. We need to display the numbers in the Categories View. It can be accomplished with some lookup in an array/object for each td field (and if not present, display a 0). As I need the numbers (including 0) in the records of the categories anyway, I think that my SQL is easier. E.g. if a table (eg com_content) does not have any Archived items, the column with "0" values will be displayed. However, if your SQL improves the performance (and lookup in the object is faster) then I think we should change that SQL to your suggestion. |
…space after comma in function call for Travis
Ok, thank you all for all feedback! I have got rid of the extra helper file and moved the SQL to the existing helper file of the component that uses the Category Manager to list its Categories (Thanks @roland-d for your help!) I've also created/updated separate PRs for |
I'd say a group by should be faster than four joins. But I would have to test it to really verify.
That's a good point. Could be tricky to detect which states the extension uses. Your solution is indeed easier for that. |
@test succes Tested both desktop and mobile. |
On I have tested further : indeed, on issue #6934 (count for BANNERS), I noticed that clicking on "zeros" would still show all banners of the category, no matter their "status". This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/6916. |
tested successfully. #jab15 This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/6916. |
Merged with c57e644 into Thanks! |
@pe7er @Bakual This needs correcting or going back in Hathor to the former display. |
Found the culprit, now making a PR |
See PR here: #8254 |
The site of about 85,000 materials and 100 categories. In the transition to the category management page opens a minute. There is possible to disable counting? |
@Wertos There is no clean way at the moment to disable the counting but a quick hack would be to change the name countItems in administrator/components/com_content/helpers/content.php to something else. This is a core-hack and not recommended. @pe7er Perhaps we should add a switch for turning it on/off or find out why it takes so long? Are we missing an index? |
I am in the process of building a site with 80,000 in over 1000 categories On 14 March 2016 at 11:58, Peter Martin notifications@github.com wrote:
Brian Teeman |
@pe7er @Wertos @roland-d please see #9420 and continue the discussion there and not on this closed issue This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/6916. |
…ager for com_content component.
In Joomla 1.5 the Category Manager showed the number of published, unpublished and trashed articles per category. Since than the Category Manager has been improved to be more generic and is used in all core components. You can even use it in your own component. However, because it's more generic, it does not show the counter anymore.
This PR adds the number of published, unpublished and trashed articles in the Category Manager for the Articles only.
Testing instruction
Test before Patch
The Category Manager shows the Categories but does not show number of articles in those categories.
(in back-end: Content > Category Manager)
Test after applying Patch
Install the patch via Patch Tester Component. In Article Manager, unpublish a couple of articles & trash a couple of articles. Go to Category Manager (Content > Category Manager). The Category Manager should show 3 new columns with the numbers of published, unpublished and trashed articles per category.
Test the Category Manager with other core components
The Category Manager should not show those columns & numbers for other components. Eg. check the "Category Manager: Contacts" (Components > Contacts > Categories)