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

Add Count to Tags Overview #23562

Closed
wants to merge 5 commits into from
Closed

Add Count to Tags Overview #23562

wants to merge 5 commits into from

Conversation

pe7er
Copy link
Contributor

@pe7er pe7er commented Jan 16, 2019

Pull Request to improve the information about the used Tags in the website by adding a new Tagged Items column. The Tagged Items column shows a counter of the amount of items that use that tag. It's sortable so you can easily get an overview about the most or less used tags.

Summary of Changes

In the Back-end under Components > Tags you'll see an overview of all created Tags.

tags-before

Testing Instructions

  • Add some tags to some items (Articles or other items).
  • Check the Components > Tags overview
  • Install the patch
  • Check again the Components > Tags overview

Expected result

A new column "Tagged Items" is available. You can click on the "Tagged Items" header to order the column. You can select the order also via the "Sort Table By:" dropdown on the top right.

tags-after

@joomla-cms-bot joomla-cms-bot added Language Change This is for Translators PR-staging labels Jan 16, 2019
@pe7er
Copy link
Contributor Author

pe7er commented Jan 17, 2019

Thank you @Quy and @chmst! I have implemented your suggestions.

@@ -248,8 +251,11 @@
</td>
<?php endif; ?>



<td>
Copy link
Contributor

Choose a reason for hiding this comment

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

I assume you want this column to be hidden on a phone also?

->select('COUNT(' . $db->quoteName('tag_map.content_item_id') . ')')
->from($db->quoteName('#__contentitem_tag_map', 'tag_map'))
->where($db->quoteName('tag_map.tag_id') . '= ' . $db->quoteName('a.id'));
$query->select('(' . $subQueryCountTaggedItems->__toString() . ') AS countTaggedItems ');
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
$query->select('(' . $subQueryCountTaggedItems->__toString() . ') AS countTaggedItems ');
$query->select('(' . $subQueryCountTaggedItems->__toString() . ') AS countTaggedItems');

@kofaysi
Copy link
Contributor

kofaysi commented Jan 18, 2019

I have tested this item ✅ successfully on 2f9988f

The patch displays counts of published items with tags. Tested for EN, CZ and HU language environments.


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

@viocassel
Copy link
Contributor

I have tested this item ✅ successfully on 2f9988f


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

@fabpacheco
Copy link

@franz-wohlkoenig @Quy this has 2 successful tests. Shouldn't it be RTC?

On the other hand since its a new feature it needs to be rebased for 4.0

@Quy
Copy link
Contributor

Quy commented Apr 1, 2019

@fabpacheco There are requested changes to be done.

@HLeithner
Copy link
Member

@pe7er sorry no new features for 3.9.x series please rebase on 4.0

@pe7er
Copy link
Contributor Author

pe7er commented Apr 1, 2019

@HLeithner Thanks, I understand.
I hope to make some time soon to rebase it to 4.0

@ghost ghost added J3 Issue and removed J3 Issue labels Apr 5, 2019
@ghost ghost removed the J3 Issue label Apr 19, 2019
@pe7er
Copy link
Contributor Author

pe7er commented Apr 21, 2019

Thank you all for testing + your comments @Quy @chmst @kofaysi @viocassel @viocassel @fabpacheco @HLeithner
I've re-done this PR for Joomla 4: #24663

@ghost
Copy link

ghost commented Apr 21, 2019

@pe7er should this PR be closed in favor of #24663 as new Features goes only on J4?

@joomla-cms-bot
Copy link

Set to "closed" on behalf of @Quy by The JTracker Application at issues.joomla.org/joomla-cms/23562

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.

8 participants