From e578be0111cd396f26d025cd0bc972a0ee7c91fb Mon Sep 17 00:00:00 2001 From: albert Date: Wed, 14 Sep 2011 12:40:29 -0400 Subject: [PATCH] removed restraints on editing tag category, implemented tag/edit --- app/models/tag.rb | 2 +- app/views/tags/_secondary_links.html.erb | 6 +++++- app/views/tags/show.html.erb | 5 +++++ 3 files changed, 11 insertions(+), 2 deletions(-) diff --git a/app/models/tag.rb b/app/models/tag.rb index ffe2bb380..0e27d4e6f 100644 --- a/app/models/tag.rb +++ b/app/models/tag.rb @@ -87,7 +87,7 @@ class Tag < ActiveRecord::Base tag = find_by_name(name) if tag - if category > 0 && !(options[:user] && !options[:user].is_privileged? && tag.post_count > 10) + if category > 0 tag.update_column(:category, category) end diff --git a/app/views/tags/_secondary_links.html.erb b/app/views/tags/_secondary_links.html.erb index 6f226f6af..fcfd38b13 100644 --- a/app/views/tags/_secondary_links.html.erb +++ b/app/views/tags/_secondary_links.html.erb @@ -2,6 +2,10 @@
  • <%= link_to "Listing", tags_path %>
  • <%= link_to "Search", search_tags_path %>
  • -
  • <%= link_to "Help", wiki_pages_path(:search => {:title_equals => "help:tags"}) %>
  • +
  • <%= link_to "Help", wiki_pages_path(:search => {:title_equals => "help:tags"}) %>
  • + <% if @tag %> +
  • |
  • +
  • <%= link_to "Edit", edit_tag_path(@tag) %>
  • + <% end %>
    <% end %> diff --git a/app/views/tags/show.html.erb b/app/views/tags/show.html.erb index f7b323682..bdf86d876 100644 --- a/app/views/tags/show.html.erb +++ b/app/views/tags/show.html.erb @@ -1,6 +1,11 @@

    Tag: <%= @tag.name %>

    + +
      +
    • Count: <%= @tag.post_count %>
    • +
    • Category: <%= @tag.category_name %>
    • +