[Git][noosfero/noosfero][master] 2 commits: Adds count data attribute to tag item

Gabriel Silva gitlab at mg.gitlab.com
Mon Jan 14 16:05:32 BRST 2019


Gabriel Silva pushed to branch master at Noosfero / noosfero


Commits:
08d04bf2 by MatheusRich at 2018-12-13T18:07:57Z
Adds count data attribute to tag item

- - - - -
80319c67 by Gabriel Silva at 2019-01-14T18:05:29Z
Merge branch 'add-count-to-tags-cloud' into 'master'

Adds count data attribute to tag item

See merge request noosfero/noosfero!1654
- - - - -


1 changed file:

- app/helpers/tags_helper.rb


Changes:

=====================================
app/helpers/tags_helper.rb
=====================================
@@ -51,11 +51,11 @@ module TagsHelper
       if options[:show_count]
         display_count = options[:show_count] ? "<small><sup>(#{count})</sup></small>" : ""
         link_to (tag + display_count).html_safe, destination,
-                 :class => 'tag-cloud-item'
+                 {:class => 'tag-cloud-item', :data => { :items => count }}
       else
         link_to h(tag) , destination,
-          :title => n_( 'one item', '%d items', count ) % count,
-          :class => 'tag-cloud-item'
+          { :title => n_( 'one item', '%d items', count ) % count,
+            :class => 'tag-cloud-item', :data => { :items => count }}
       end
 
     end.join("\n").html_safe



View it on GitLab: https://gitlab.com/noosfero/noosfero/compare/bdec75540593068063e0f0490476307c7e93dc79...80319c67ba62034073e8a807b9da1295f153415a

-- 
View it on GitLab: https://gitlab.com/noosfero/noosfero/compare/bdec75540593068063e0f0490476307c7e93dc79...80319c67ba62034073e8a807b9da1295f153415a
You're receiving this email because of your account on gitlab.com.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listas.softwarelivre.org/pipermail/noosfero-dev/attachments/20190114/d1045b87/attachment-0001.html>


More information about the Noosfero-dev mailing list