muck-raker 0.1.4 → 0.1.5
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/Rakefile +1 -0
- data/VERSION +1 -1
- data/app/controllers/recommender/entries_controller.rb +5 -5
- data/app/models/tag_cloud.rb +8 -0
- data/app/views/entries/_result_navigation.html.erb +5 -0
- data/app/views/entries/_result_status.html.erb +14 -0
- data/app/views/entries/_results.html.erb +3 -0
- data/app/views/entries/_tag_cloud.html.erb +11 -3
- data/app/views/entries/browse_by_tags.html.erb +13 -32
- data/app/views/entries/index.html.erb +1 -6
- data/app/views/entries/search.html.erb +10 -20
- data/db/bootstrap/feeds.yml +388 -388
- data/db/migrate/20090602191243_create_muck_raker.rb +3 -0
- data/db/migrate/20090619211125_create_tag_clouds.rb +19 -0
- data/db/migrate/20090623181458_add_grain_size_to_entries.rb +16 -0
- data/muck-raker.gemspec +18 -8
- data/raker/lib/aggregatord.jar +0 -0
- data/raker/lib/recommenderd.jar +0 -0
- data/rdoc/created.rid +1 -1
- metadata +8 -5
- data/app/models/cloud_cache.rb +0 -9
- data/app/views/entries/_cloud_type_selector.html.erb +0 -9
- data/app/views/entries/_tags.html.erb +0 -7
data/Rakefile
CHANGED
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.1.
|
1
|
+
0.1.5
|
@@ -5,16 +5,16 @@ class Recommender::EntriesController < ApplicationController
|
|
5
5
|
end
|
6
6
|
|
7
7
|
def index
|
8
|
-
@
|
8
|
+
@tag_cloud = TagCloud.language_tags(Language.locale_id) unless fragment_exist?({:controller => 'entries', :action => 'index', :language => Language.locale_id})
|
9
9
|
respond_to do |format|
|
10
10
|
format.html { render :template => 'entries/index' }
|
11
11
|
end
|
12
12
|
end
|
13
13
|
|
14
14
|
def browse_by_tags
|
15
|
-
@
|
16
|
-
@
|
17
|
-
@
|
15
|
+
@tag_filter = params[:tags]
|
16
|
+
@search = @tag_filter.join(' ') if (!@tag_filter.nil? && !@tag_filter.empty?)
|
17
|
+
@tag_cloud = TagCloud.language_tags(Language.locale_id, @tag_filter) unless fragment_exist?({:controller => 'entries', :action => 'index', :language => Language.locale_id, :filter => @tag_filter})
|
18
18
|
_search
|
19
19
|
respond_to do |format|
|
20
20
|
format.html { render :template => 'entries/browse_by_tags' }
|
@@ -34,7 +34,7 @@ class Recommender::EntriesController < ApplicationController
|
|
34
34
|
@limit = (params[:limit] || 10).to_i
|
35
35
|
@term_list = URI.escape(@search) if !@search.nil?
|
36
36
|
if !@search.nil?
|
37
|
-
results = Entry.search(@search,
|
37
|
+
results = Entry.search(@search, I18n.locale.to_s, @limit, @offset)
|
38
38
|
@results = results.results
|
39
39
|
@hit_count = results.total
|
40
40
|
end
|
@@ -0,0 +1,5 @@
|
|
1
|
+
<div>
|
2
|
+
<b><%= (link_to(t('muck.raker.previous'), {:action => :browse_by_tags, :tags => URI.unescape(@term_list), :locale => @language, :limit => @limit, :offset => @offset - @limit}, :rel => "nofollow") + " ") if @offset > 0 %>
|
3
|
+
<%= (link_to(t('muck.raker.next'), {:action => :browse_by_tags, :tags => URI.unescape(@term_list), :locale => @language,:limit => @limit, :offset => @offset + @limit}, :rel => "nofollow") if @results.size >= @limit )%>
|
4
|
+
</b>
|
5
|
+
</div>
|
@@ -0,0 +1,14 @@
|
|
1
|
+
<div id="results-description" class="block">
|
2
|
+
<div class="column span-5">
|
3
|
+
<input type="radio" name="scope" value="all" checked/><%= t('folksemantic.all_resources') %>  
|
4
|
+
<input type="radio" name="scope" value="ocws"/><%= t('folksemantic.just_ocws') %><br/>
|
5
|
+
</div>
|
6
|
+
<div class="column span-19 align-right">
|
7
|
+
<%= t('muck.raker.results') %>
|
8
|
+
<b><%= (@offset+1) %> - <%= (@offset + @limit) < @hit_count ? (@offset + @limit) : @hit_count %></b>
|
9
|
+
<%= t('muck.raker.of') %>
|
10
|
+
<b><%= @hit_count %></b>
|
11
|
+
<%= t('muck.raker.for') %>
|
12
|
+
<b><%= URI.unescape(@term_list) %></b></p>
|
13
|
+
</div>
|
14
|
+
</div>
|
@@ -1,4 +1,12 @@
|
|
1
1
|
<div id="tag-cloud">
|
2
|
-
|
3
|
-
|
4
|
-
|
2
|
+
<fieldset>
|
3
|
+
<legend><%= t('folksemantic.tag_cloud_legend') %></legend>
|
4
|
+
<% if @tag_cloud.blank? -%>
|
5
|
+
<%= t('folksemantic.no_tags') %>
|
6
|
+
<% else -%>
|
7
|
+
<% tag_cloud @tag_cloud, %w(cloud1 cloud2 cloud3 cloud4 cloud5 cloud6) do |tag, css_class| %>
|
8
|
+
<%= link_to tag, { :action => :browse_by_tags, :tags => tag }, :class => css_class %>
|
9
|
+
<% end %>
|
10
|
+
<% end -%>
|
11
|
+
</fieldset>
|
12
|
+
</div>
|
@@ -1,33 +1,14 @@
|
|
1
|
-
<div
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
<div class="left" style="width:480px; margin-left:20px; margin-top:10px;">
|
15
|
-
|
16
|
-
<% if @results.length > 0 %>
|
17
|
-
|
18
|
-
<p><%= t('muck.raker.results') %> <b><%= (@offset+1) %> - <%= (@offset + @limit) < @hit_count ? (@offset + @limit) : @hit_count %></b> <%= t('muck.raker.of') %> <b><%= @hit_count %></b> <%= t('muck.raker.for') %> <b><%= @terms %></b></p>
|
19
|
-
<div id="results">
|
20
|
-
<%= render(:partial => 'entries/result', :collection => @results) %>
|
21
|
-
</div>
|
22
|
-
|
23
|
-
<div>
|
24
|
-
<b><%= (link_to(t('muck.raker.previous'), {:action => :browse_by_tags, :tags => URI.unescape(@term_list), :locale => @language, :limit => @limit, :offset => @offset - @limit}, :rel => "nofollow") + " ") if @offset > 0 %>
|
25
|
-
<%= (link_to(t('muck.raker.next'), {:action => :browse_by_tags, :tags => URI.unescape(@term_list), :locale => @language,:limit => @limit, :offset => @offset + @limit}, :rel => "nofollow") if @results.size >= @limit )%>
|
26
|
-
</b>
|
27
|
-
</div>
|
28
|
-
|
29
|
-
<% else %>
|
30
|
-
<p><%= t(:no_hits) %></p>
|
31
|
-
<% end %>
|
32
|
-
|
1
|
+
<div class="block">
|
2
|
+
<% if @results.length > 0 %>
|
3
|
+
<%= render(:partial => 'entries/result_status') %>
|
4
|
+
<div class="column span-15">
|
5
|
+
<%= render(:partial => 'entries/results') %>
|
6
|
+
<%= render(:partial => 'entries/result_navigation') %>
|
7
|
+
</div>
|
8
|
+
<div class="column span-9 last">
|
9
|
+
<%= render(:partial => 'entries/tag_cloud') %>
|
10
|
+
</div>
|
11
|
+
<% else %>
|
12
|
+
<p><%= t(:no_hits) %></p>
|
13
|
+
<% end %>
|
33
14
|
</div>
|
@@ -1,8 +1,3 @@
|
|
1
|
-
<% cache do %>
|
2
1
|
<div align="center">
|
3
|
-
|
4
|
-
<legend style="font-size:12px; color:#555;">browse resources using tags</legend>
|
5
|
-
<%= render :partial => 'entries/tags', :object => @tags %>
|
6
|
-
</fieldset>
|
2
|
+
<%= render :partial => 'entries/tag_cloud' %>
|
7
3
|
</div>
|
8
|
-
<% end %>
|
@@ -1,21 +1,11 @@
|
|
1
|
-
<div id="
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
<div>
|
12
|
-
<b><%= (link_to(t('muck.raker.previous'), {:action => :browse_by_tags, :tags => @term_list, :locale => @language, :limit => @limit, :offset => @offset - @limit}, :rel => "nofollow") + " ") if @offset > 0 %>
|
13
|
-
<%= (link_to(t('muck.raker.next'), {:action => :browse_by_tags, :tags => @term_list, :locale => @language,:limit => @limit, :offset => @offset + @limit}, :rel => "nofollow") if @results.size >= @limit )%>
|
14
|
-
</b>
|
15
|
-
</div>
|
16
|
-
|
17
|
-
<% else %>
|
18
|
-
<p><%= t('muck.raker.no_hits') %></p>
|
19
|
-
<% end %>
|
20
|
-
|
1
|
+
<div id="search-results">
|
2
|
+
<% if @results.length > 0 %>
|
3
|
+
<div class="left">
|
4
|
+
<%= render(:partial => 'entries/result_status') %>
|
5
|
+
<%= render(:partial => 'entries/results') %>
|
6
|
+
<%= render(:partial => 'entries/result_navigation') %>
|
7
|
+
</div>
|
8
|
+
<% else %>
|
9
|
+
<p><%= t(:no_hits) %></p>
|
10
|
+
<% end %>
|
21
11
|
</div>
|