Remove featured attribute management on admin/tags
This commit is contained in:
@@ -4,7 +4,7 @@ class Admin::TagsController < Admin::BaseController
|
||||
respond_to :html, :js
|
||||
|
||||
def index
|
||||
@tags = ActsAsTaggableOn::Tag.category.order(featured: :desc).page(params[:page])
|
||||
@tags = ActsAsTaggableOn::Tag.category.page(params[:page])
|
||||
@tag = ActsAsTaggableOn::Tag.category.new
|
||||
end
|
||||
|
||||
@@ -13,11 +13,6 @@ class Admin::TagsController < Admin::BaseController
|
||||
redirect_to admin_tags_path
|
||||
end
|
||||
|
||||
def update
|
||||
@tag.update(tag_params)
|
||||
redirect_to admin_tags_path
|
||||
end
|
||||
|
||||
def destroy
|
||||
@tag.destroy
|
||||
redirect_to admin_tags_path
|
||||
@@ -26,7 +21,7 @@ class Admin::TagsController < Admin::BaseController
|
||||
private
|
||||
|
||||
def tag_params
|
||||
params.require(:tag).permit(:featured, :name)
|
||||
params.require(:tag).permit(:name)
|
||||
end
|
||||
|
||||
def find_tag
|
||||
|
||||
@@ -8,12 +8,6 @@
|
||||
<%= f.text_field :name, placeholder: t("admin.tags.name.placeholder"), label: false %>
|
||||
</div>
|
||||
|
||||
<div class="is-featured small-12 medium-6 column">
|
||||
<%= f.label :featured do %>
|
||||
<%= f.check_box :featured, title: t('admin.tags.mark_as_featured'), label: false %>
|
||||
<span class="checkbox"><%= t("admin.tags.mark_as_featured") %></span>
|
||||
<% end %>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<%= f.submit(t("admin.tags.create"), class: "button success") %>
|
||||
@@ -33,13 +27,8 @@
|
||||
|
||||
<span class="float-left text-left">
|
||||
<strong><%= tag.name %></strong>
|
||||
<%= f.label "featured_#{tag.id}" do %>
|
||||
<%= f.check_box :featured, title: t('admin.tags.mark_as_featured'), label: false, id: "tag_featured_#{tag.id}", class: "inline-block" %>
|
||||
<span class="checkbox inline-block"><%= t("admin.tags.mark_as_featured") %></span>
|
||||
<% end %>
|
||||
</span>
|
||||
|
||||
<%= f.submit(t("admin.tags.update"), class: "button hollow on-hover") %>
|
||||
<%= link_to t("admin.tags.destroy"), admin_tag_path(tag), method: :delete, class: "button hollow alert on-hover" %>
|
||||
<% end %>
|
||||
</td>
|
||||
|
||||
Reference in New Issue
Block a user