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 CHANGED
@@ -1 +1 @@
1
- 0.1.20
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
- <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>
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
- <% if @results.length > 0 %>
2
+ <% if @results.length > 0 %>
3
3
  <%= render(:partial => 'entries/result_status') %>
4
4
  <div class="column span-15">
5
- <%= render(:partial => 'entries/results') %>
6
- <div class="results-nav"><%= will_paginate(@paginated_results, :next_label => '<b>' + t('muck.raker.next_label') + ' &raquo;</b>', :previous_label => '<b>&laquo; ' + t('muck.raker.previous_label') + '</b>') %></div>
5
+ <%= render(:partial => 'entries/results') %>
6
+ <div class="results-nav"><%= will_paginate(@paginated_results, :next_label => '<b>' + t('muck.raker.next_label') + ' &raquo;</b>', :previous_label => '<b>&laquo; ' + t('muck.raker.previous_label') + '</b>') %></div>
7
7
  </div>
8
8
  <div class="column span-9 last">
9
- <%= render(:partial => 'entries/tag_cloud') %>
9
+ <%= render(:partial => 'entries/tag_cloud') %>
10
10
  </div>
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 %>
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
@@ -2,7 +2,7 @@
2
2
 
3
3
  Gem::Specification.new do |s|
4
4
  s.name = %q{muck-raker}
5
- s.version = "0.1.20"
5
+ s.version = "0.1.21"
6
6
 
7
7
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
8
8
  s.authors = ["Joel Duffin Justin Ball"]
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: muck-raker
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.20
4
+ version: 0.1.21
5
5
  platform: ruby
6
6
  authors:
7
7
  - Joel Duffin Justin Ball