From 2321d1f2a3eb60e42ce57e87215fd9995f0b2c3f Mon Sep 17 00:00:00 2001 From: Katrina Owen Date: Thu, 28 Feb 2013 22:03:39 -0500 Subject: [PATCH] Call the cloud partial twice Delete half the partial, and use each of the cloud objects to call it. --- app/views/stats/_tags.html.erb | 21 ++------------------- app/views/stats/index.html.erb | 3 ++- 2 files changed, 4 insertions(+), 20 deletions(-) diff --git a/app/views/stats/_tags.html.erb b/app/views/stats/_tags.html.erb index 7025e118..df4c763b 100755 --- a/app/views/stats/_tags.html.erb +++ b/app/views/stats/_tags.html.erb @@ -1,6 +1,6 @@
-

<%= t('stats.tag_cloud_title') %>

-

<%= t('stats.tag_cloud_description') %>

+

<%= t("stats.tag_cloud#{key}_title") %>

+

<%= t("stats.tag_cloud#{key}_description") %>

<% if tag_cloud.tags.size < 1 @@ -15,20 +15,3 @@ end-%>

- -
-

<%= t('stats.tag_cloud_90days_title') %>

-

<%= t('stats.tag_cloud_90days_description') %>

-

- <% 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-%> -

-
diff --git a/app/views/stats/index.html.erb b/app/views/stats/index.html.erb index d54b0219..0f44f2c3 100755 --- a/app/views/stats/index.html.erb +++ b/app/views/stats/index.html.erb @@ -15,7 +15,8 @@ <%= render :partial => 'projects' -%>

<%= t('stats.tags') %>

- <%= 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 -%>