diff --git a/app/controllers/favorites_controller.rb b/app/controllers/favorites_controller.rb index 193973345..5c7dbb519 100644 --- a/app/controllers/favorites_controller.rb +++ b/app/controllers/favorites_controller.rb @@ -3,7 +3,7 @@ class FavoritesController < ApplicationController def index if params[:tags] - redirect_to(posts_path(:tags => "fav:#{CurrentUser.name} #{params[:tags]}")) + redirect_to(posts_path(:tags => params[:tags])) else @favorite_set = PostSets::Favorite.new(CurrentUser.user, params[:page]) end diff --git a/app/logical/post_sets/favorite.rb b/app/logical/post_sets/favorite.rb index 4fe25548b..a45f9734f 100644 --- a/app/logical/post_sets/favorite.rb +++ b/app/logical/post_sets/favorite.rb @@ -12,7 +12,7 @@ module PostSets end def tag_string - tag_array.join(" ") + tag_array.uniq.join(" ") end def posts diff --git a/app/logical/post_sets/post.rb b/app/logical/post_sets/post.rb index 46f4e017a..e1062ae4b 100644 --- a/app/logical/post_sets/post.rb +++ b/app/logical/post_sets/post.rb @@ -11,7 +11,7 @@ module PostSets end def tag_string - @tag_string ||= tag_array.join(" ") + @tag_string ||= tag_array.uniq.join(" ") end def has_wiki? diff --git a/app/views/wiki_pages/_secondary_links.html.erb b/app/views/wiki_pages/_secondary_links.html.erb index 3d2838196..4cc0e166d 100644 --- a/app/views/wiki_pages/_secondary_links.html.erb +++ b/app/views/wiki_pages/_secondary_links.html.erb @@ -7,16 +7,18 @@
  • |
  • <%= link_to "Posts (#{Post.fast_count(@wiki_page.title)})", posts_path(:tags => @wiki_page.title) %>
  • <%= link_to "History", wiki_page_versions_path(:search => {:wiki_page_id_eq => @wiki_page.id}) %>
  • - <% unless @wiki_page.new_record? %> -
  • <%= link_to "Edit", edit_wiki_page_path(@wiki_page) %>
  • - <% if CurrentUser.is_moderator? %> -
  • <%= link_to "Delete", wiki_page_path(@wiki_page), :remote => true, :method => :delete, :confirm => "Do you want to delete this wiki page?" %>
  • + <% if CurrentUser.is_member? %> + <% unless @wiki_page.new_record? %> +
  • <%= link_to "Edit", edit_wiki_page_path(@wiki_page) %>
  • + <% if CurrentUser.is_moderator? %> +
  • <%= link_to "Delete", wiki_page_path(@wiki_page), :remote => true, :method => :delete, :confirm => "Do you want to delete this wiki page?" %>
  • + <% end %> <% end %> <% end %> <% end %> <% if @wiki_page_version %>
  • |
  • -
  • <%= link_to "Current", wiki_page_path(@wiki_page_version.wiki_page_id) %>
  • +
  • <%= link_to "Newest", wiki_page_path(@wiki_page_version.wiki_page_id) %>
  • <% end %> <% end %> diff --git a/app/views/wiki_pages/show.html.erb b/app/views/wiki_pages/show.html.erb index 4a8157742..b6b6448b3 100644 --- a/app/views/wiki_pages/show.html.erb +++ b/app/views/wiki_pages/show.html.erb @@ -3,7 +3,13 @@ <%= render "sidebar" %>
    -

    <%= @wiki_page.pretty_title %>

    +

    + <%= @wiki_page.pretty_title %> + + <% if @wiki_page.is_locked? %> + (locked) + <% end %> +

    <%= format_text(@wiki_page.body) %>