This commit is contained in:
albert
2013-03-21 17:08:46 -07:00
parent 8f6fdc73af
commit 65b5159197
3 changed files with 7 additions and 5 deletions

View File

@@ -1,5 +1,5 @@
class TagCorrectionsController < ApplicationController class TagCorrectionsController < ApplicationController
before_filter :member_only before_filter :builder_only
def new def new
@correction = TagCorrection.new(params[:tag_id]) @correction = TagCorrection.new(params[:tag_id])

View File

@@ -1,5 +1,5 @@
class TagsController < ApplicationController class TagsController < ApplicationController
before_filter :member_only, :only => [:edit, :update] before_filter :builder_only, :only => [:edit, :update]
respond_to :html, :xml, :json respond_to :html, :xml, :json
def edit def edit

View File

@@ -17,9 +17,11 @@
<%= link_to(tag.name, posts_path(:tags => tag.name)) %> <%= link_to(tag.name, posts_path(:tags => tag.name)) %>
</td> </td>
<td> <td>
<%= link_to "edit", edit_tag_path(tag) %> <% if CurrentUser.is_builder? %>
<% if tag.post_count < 1_000 %> <%= link_to "edit", edit_tag_path(tag) %>
| <%= link_to "fix", new_tag_correction_path(:tag_id => tag.id) %> <% if tag.post_count < 1_000 %>
| <%= link_to "fix", new_tag_correction_path(:tag_id => tag.id) %>
<% end %>
<% end %> <% end %>
</td> </td>
</tr> </tr>