Noosfero/noosfero

View on GitHub
app/views/profile/content_tagged.html.erb

Summary

Maintainability
Test Coverage
<% escaped_tag = CGI.escapeHTML(@tag) %>

<% add_rss_feed_to_head(_("%s's contents tagged with \"%s\"") % [profile.name, escaped_tag], tags_profile_path(profile.identifier, @tag)) %>

<h1><%= _('Content tagged with "%s"') % escaped_tag %></h1>

<p>
<%= link_to image_tag('/images/icons-mime/rss-feed.png', :alt => _('Feed for this tag'), :title => _('Feed for this tag')), tags_profile_path(profile.identifier, @tag), :class => 'blog-feed-link'%>
</p>

<% cache_timeout(@tag_cache_key, 4.hour) do %>
  <div class='search-tagged-items'>
    <ul>
    <% for doc in @tagged %>
      <li><%= link_to doc.title, doc.url %></li>
    <% end %>
    </ul>
  </div>

  <%= pagination_links @tagged, :param_name => 'npage' %>

  <div>
    <%= link_to (_('See content tagged with "%s" in the entire site') % escaped_tag).html_safe, :controller => 'search', :action => 'tag', :tag => @tag %>
  </div>
<% end %>