removed restraints on editing tag category, implemented tag/edit

This commit is contained in:
albert
2011-09-14 12:40:29 -04:00
parent 662bc744c7
commit e578be0111
3 changed files with 11 additions and 2 deletions

View File

@@ -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

View File

@@ -2,6 +2,10 @@
<menu>
<li><%= link_to "Listing", tags_path %></li>
<li><%= link_to "Search", search_tags_path %></li>
<li><%= link_to "Help", wiki_pages_path(:search => {:title_equals => "help:tags"}) %></li>
<li><%= link_to "Help", wiki_pages_path(:search => {:title_equals => "help:tags"}) %></li>
<% if @tag %>
<li>|</li>
<li><%= link_to "Edit", edit_tag_path(@tag) %></li>
<% end %>
</menu>
<% end %>

View File

@@ -1,6 +1,11 @@
<div id="c-tags">
<div id="a-show">
<h1>Tag: <%= @tag.name %></h1>
<ul>
<li>Count: <%= @tag.post_count %></li>
<li>Category: <%= @tag.category_name %></li>
</ul>
</div>
</div>