Call the cloud partial twice

Delete half the partial, and use each of the cloud objects to call it.
This commit is contained in:
Katrina Owen 2013-02-28 22:03:39 -05:00
parent b5868d5c70
commit 2321d1f2a3
2 changed files with 4 additions and 20 deletions

View file

@ -1,6 +1,6 @@
<div class="stats_module">
<h3><%= t('stats.tag_cloud_title') %></h3>
<p><%= t('stats.tag_cloud_description') %></p>
<h3><%= t("stats.tag_cloud#{key}_title") %></h3>
<p><%= t("stats.tag_cloud#{key}_description") %></p>
<p>
<% if tag_cloud.tags.size < 1
@ -15,20 +15,3 @@
end-%>
</p>
</div>
<div class="stats_module">
<h3><%= t('stats.tag_cloud_90days_title') %></h3>
<p><%= t('stats.tag_cloud_90days_description') %></p>
<p>
<% if tag_cloud_90days.tags.size < 1
t('stats.no_tags_available')
else
tag_cloud_90days.tags.each do |t| %>
<%= link_to t.name, tag_path(t.name), {
:style => "font-size: " + (9 + 2*(t.count.to_i-tag_cloud_90days.min)/tag_cloud_90days.divisor).to_s + "pt",
:title => t.count.to_s+" #{t('common.actions_midsentence', :count => t.count)}"}
-%> <%
end
end-%>
</p>
</div>

View file

@ -15,7 +15,8 @@
<%= render :partial => 'projects' -%>
<h2><%= t('stats.tags') %></h2>
<%= render :partial => 'tags', :locals => {:tag_cloud => @tag_cloud, :tag_cloud_90days => @tag_cloud_90days} -%>
<%= render :partial => 'tags', :locals => {:tag_cloud => @tag_cloud, :key => ''} -%>
<%= render :partial => 'tags', :locals => {:tag_cloud => @tag_cloud_90days, :key => '_90days'} -%>
<% else -%>