Index: app/views/search/index.rhtml
===================================================================
--- app/views/search/index.rhtml (revision 2245)
+++ app/views/search/index.rhtml (working copy)
@@ -26,7 +26,15 @@
<%= l(:label_result_plural) %> (<%= @results_by_type.values.sum %>)
<% @results.each do |e| %>
- - <%= content_tag('span', h(e.project), :class => 'project') unless @project == e.project %> <%= link_to highlight_tokens(truncate(e.event_title, 255), @tokens), e.event_url %>
+ -
+ <% if @project != e.project -%>
+
+ <%= link_to(h(e.project), { :action => :show, :id => e.project } ) %>
+ <%= content_tag('span', link_to(l(:label_filter).downcase, params.merge(:id => e.project, :scope => 'subprojects')), { :class => 'filter' }) %>
+
+ <% end -%>
+ <%= link_to highlight_tokens(truncate(e.event_title, 255), @tokens), e.event_url %>
+
- <%= highlight_tokens(e.event_description, @tokens) %>
<%= format_time(e.event_datetime) %>
<% end %>
Index: app/views/projects/activity.rhtml
===================================================================
--- app/views/projects/activity.rhtml (revision 2245)
+++ app/views/projects/activity.rhtml (working copy)
@@ -9,10 +9,20 @@
-
<%= avatar(e.event_author, :size => "24") if e.respond_to?(:event_author) %>
<%= format_time(e.event_datetime, false) %>
- <%= content_tag('span', h(e.project), :class => 'project') if @project.nil? || @project != e.project %>
+ <% if @project.nil? || @project != e.project -%>
+
+ <%= link_to(h(e.project), { :action => :show, :id => e.project } ) %>
+ <%= content_tag('span', link_to(l(:label_filter).downcase, params.merge(:id => e.project)), { :class => 'filter' }) %>
+
+ <% end -%>
<%= link_to format_activity_title(e.event_title), e.event_url %>
- <%= format_activity_description(e.event_description) %>
- <%= e.event_author if e.respond_to?(:event_author) %>
+
+ <% if e.respond_to?(:event_author) -%>
+ <%= link_to(e.event_author, :controller => :account, :action => :show, :id => e.event_author) %>
+ <%= content_tag('span', link_to(l(:label_filter).downcase, params.merge(:user_id => e.event_author)), { :class => 'filter' }) %>
+ <% end %>
+
<% end -%>
<% end -%>
Index: lang/en.yml
===================================================================
--- lang/en.yml (revision 2245)
+++ lang/en.yml (working copy)
@@ -304,6 +304,7 @@
label_document_new: New document
label_document_plural: Documents
label_document_added: Document added
+label_filter: Filter
label_role: Role
label_role_plural: Roles
label_role_new: New role
Index: public/stylesheets/application.css
===================================================================
--- public/stylesheets/application.css (revision 2245)
+++ public/stylesheets/application.css (working copy)
@@ -192,6 +192,14 @@
div#activity dt .time { color: #777; font-size: 80%; }
div#activity dd .description, #search-results dd .description { font-style: italic; }
div#activity span.project:after, #search-results span.project:after { content: " -"; }
+div#activity span.filter:before, #search-results span.filter:before { content: "("; }
+div#activity span.filter:after, #search-results span.filter:after { content: ")"; }
+div#activity span.filter:hover a, #search-results span.filter:hover a,
+div#activity span.filter:hover:before, #search-results span.filter:hover:before,
+div#activity span.filter:hover:after, #search-results span.filter:hover:after { text-decoration: underline; }
+div#activity span.filter a, #search-results span.filter a,
+div#activity span.filter:before, #search-results span.filter:before,
+div#activity span.filter:after, #search-results span.filter:after { color: #777; font-size: 85%; }
div#activity dd span.description, #search-results dd span.description { display:block; }
#search-results dd { margin-bottom: 1em; padding-left: 20px; margin-left:0px; }