muck-raker 0.1.20 → 0.1.21
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/VERSION +1 -1
- data/app/helpers/muck_raker_helper.rb +1 -1
- data/app/views/entries/_tag_cloud.html.erb +16 -16
- data/app/views/entries/browse_by_tags.html.erb +7 -7
- data/muck-raker.gemspec +1 -1
- metadata +1 -1
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.1.
|
1
|
+
0.1.21
|
@@ -5,7 +5,7 @@ module MuckRakerHelper
|
|
5
5
|
min = atags.shift.to_f
|
6
6
|
max = atags.shift.to_f
|
7
7
|
range = max - min
|
8
|
-
scale = classes.length.to_f / range.to_f
|
8
|
+
scale = range == 0 ? 1 : classes.length.to_f / range.to_f
|
9
9
|
atags.each_slice(2){|tag,index| yield tag, classes[((index.to_i - min)*scale).to_i]}
|
10
10
|
end
|
11
11
|
|
@@ -1,18 +1,18 @@
|
|
1
1
|
<div id="tag-cloud">
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
2
|
+
<fieldset>
|
3
|
+
<legend><%= @tag_filter.nil? ? (@grain_size == 'course' ? t('muck.raker.courses_tag_cloud_label') : t('muck.raker.resources_tag_cloud_label')) : t('muck.raker.narrow_further') %></legend>
|
4
|
+
<% if @tag_cloud.blank? -%>
|
5
|
+
<%= t('muck.raker.no_tags') %>
|
6
|
+
<% else -%>
|
7
|
+
<% if @tag_filter %>
|
8
|
+
<% tag_cloud @tag_cloud, %w(cloud1 cloud2 cloud3 cloud4 cloud5 cloud6) do |tag, css_class| %>
|
9
|
+
<%= filtered_tag_link(tag, @tag_filter, css_class, @grain_size) %>
|
10
|
+
<% end %>
|
11
|
+
<% else %>
|
12
|
+
<% tag_cloud @tag_cloud, %w(cloud1 cloud2 cloud3 cloud4 cloud5 cloud6) do |tag, css_class| %>
|
13
|
+
<%= tag_link(tag, css_class, @grain_size) %>
|
14
|
+
<% end %>
|
15
|
+
<% end %>
|
16
|
+
<% end -%>
|
17
|
+
</fieldset>
|
18
18
|
</div>
|
@@ -1,14 +1,14 @@
|
|
1
1
|
<div class="block">
|
2
|
-
|
2
|
+
<% if @results.length > 0 %>
|
3
3
|
<%= render(:partial => 'entries/result_status') %>
|
4
4
|
<div class="column span-15">
|
5
|
-
|
6
|
-
|
5
|
+
<%= render(:partial => 'entries/results') %>
|
6
|
+
<div class="results-nav"><%= will_paginate(@paginated_results, :next_label => '<b>' + t('muck.raker.next_label') + ' »</b>', :previous_label => '<b>« ' + t('muck.raker.previous_label') + '</b>') %></div>
|
7
7
|
</div>
|
8
8
|
<div class="column span-9 last">
|
9
|
-
|
9
|
+
<%= render(:partial => 'entries/tag_cloud') %>
|
10
10
|
</div>
|
11
|
-
|
12
|
-
|
13
|
-
|
11
|
+
<% else %>
|
12
|
+
<p><%= @grain_size == 'all' ? t('muck.raker.no_tagged_resources', :tags => @search) : t('muck.raker.no_tagged_courses', :tags => @tag_filter.split('/').join(', ')) %></p>
|
13
|
+
<% end %>
|
14
14
|
</div>
|
data/muck-raker.gemspec
CHANGED