fixes tag listing

This commit is contained in:
albert
2011-10-21 18:16:04 -04:00
parent b69cab11ee
commit 88317bb4c9
2 changed files with 6 additions and 3 deletions

View File

@@ -34,11 +34,12 @@ private
def build_list_item(tag, template, options)
html = ""
html << %{<li class="category-#{categories[tag]}">}
current_query = template.params[:tags] || ""
if CurrentUser.user.is_privileged?
html << %{<a href="/wiki_pages?title=#{u(tag)}">?</a> }
html << %{<a href="#" class="search-inc-tag">+</a> }
html << %{<a href="#" class="search-exl-tag">&ndash;</a> }
html << %{<a href="/posts?tags=#{u(current_query)}+#{u(tag)}" class="search-inc-tag">+</a> }
html << %{<a href="/posts?tags=#{u(current_query)}+-#{u(tag)}" class="search-exl-tag">&ndash;</a> }
end
humanized_tag = tag.tr("_", " ")

View File

@@ -1,5 +1,7 @@
<ul>
<%= resize_image_links(post, CurrentUser.user) %>
<% if post.is_image? %>
<%= resize_image_links(post, CurrentUser.user) %>
<% end %>
<li><%= link_to "Edit", post_path(post), :id => "side-edit-link" %></li>
<% if CurrentUser.is_member? %>
<li><%= link_to "Favorite", favorites_path(:post_id => post.id), :remote => true, :method => :post, :id => "add-to-favorites" %></li>