Skip to content

Commit

Permalink
Merge branch 'dev' of github.com:berkmancenter/tagteam into dev
Browse files Browse the repository at this point in the history
  • Loading branch information
bgadoury committed Jan 23, 2014
2 parents ebd9b04 + fc5e9c5 commit 752def8
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion .gitignore
Expand Up @@ -18,7 +18,7 @@ pgsql/
redis/
solr/data/*
solr/pids/
tags
./tags
tmp/
var/
redis/
Expand Down
4 changes: 2 additions & 2 deletions app/helpers/application_helper.rb
Expand Up @@ -51,15 +51,15 @@ def tag_display(tag, options = {})
end

if ! options[:show_count].blank?
tag_count = hub_id.nil? ? tag.count : tag.count_by_hub(Hub.find(hub_id))
tag_count = options[:use_count] ? tag.count : tag.count_by_hub(Hub.find(hub_id))
tag_text = tag.name + " (#{tag_count})"
options.merge!({"data-tag-frequency" => tag_count})
options.delete(:show_count)
else
tag_text = tag.name
end

link_to(tag_text, hub_tag_show_path(hub_id,u(tag.name)), options)
link_to(tag_text, hub_tag_show_path(hub_id, u(tag.name)), options)
end

def insert_social_links(url, options = {})
Expand Down
2 changes: 1 addition & 1 deletion app/views/tags/index.html.erb
Expand Up @@ -32,7 +32,7 @@

<div id="tag_cloud" data-hub-id="<%= @hub.id %>">
<% tag_cloud(@tags, %w(s1 s2 s3 s4 s5 s6 s7 s8 s9 s10)) do |tag, css_class| %>
<%= tag_display(tag, :show_count => true, :hub => @hub, :hub_feed => @hub_feed, :class => css_class) %>
<%= tag_display(tag, :use_count => true, :show_count => true, :hub => @hub, :hub_feed => @hub_feed, :class => css_class) %>
<% end %>
</div>

Expand Down

0 comments on commit 752def8

Please sign in to comment.