diff --git a/app/controllers/admin/categories_controller.rb b/app/controllers/admin/categories_controller.rb index 0b35aba39..8218fbcb4 100644 --- a/app/controllers/admin/categories_controller.rb +++ b/app/controllers/admin/categories_controller.rb @@ -1,12 +1,6 @@ class Admin::CategoriesController < OrbitBackendController - # TODO = put back ======================== - # before_filter :force_order_for_visitor, only: [:index] - # before_filter :force_order_for_user, except: [:index] - # before_filter :for_app_sub_manager, except: [:index] - # ======================================== - before_filter :setup_vars - # ======================================== + open_for_manager def index @categories = get_categories_for_index diff --git a/app/controllers/admin/items_controller.rb b/app/controllers/admin/items_controller.rb index e364acb19..4225a0e5f 100644 --- a/app/controllers/admin/items_controller.rb +++ b/app/controllers/admin/items_controller.rb @@ -2,12 +2,7 @@ class Admin::ItemsController < OrbitBackendController layout "structure" - # TODO = put back ======================== - # before_filter :authenticate_user! - # before_filter :find_parent_item - # before_filter :is_admin? - # before_filter :set_current_item - #========================================= + open_for_admin def index if params[:item_id] diff --git a/app/controllers/admin/module_tags_controller.rb b/app/controllers/admin/module_tags_controller.rb index 653b88b95..0e5ba19fb 100644 --- a/app/controllers/admin/module_tags_controller.rb +++ b/app/controllers/admin/module_tags_controller.rb @@ -1,13 +1,7 @@ class Admin::ModuleTagsController < OrbitBackendController include OrbitTag::Merging - # TODO = put back ======================== - # before_filter :force_order_for_visitor, only: [:index] - # before_filter :force_order_for_user, except: [:index] - # before_filter :for_app_sub_manager, except: [:index] - # ======================================== - before_filter :setup_vars - # ======================================== + open_for_manager helper 'admin/tags' @@ -33,6 +27,7 @@ class Admin::ModuleTagsController < OrbitBackendController redirect_to admin_module_tags_url(module_app_id: @module_app_id) else @tag = ModuleTag.new(params[:module_tag]) + flash.now[:error] = t('create.error.tag') render :action => "new" end end @@ -42,6 +37,7 @@ class Admin::ModuleTagsController < OrbitBackendController if @tag.update_attributes(params[:module_tag]) redirect_to admin_module_tags_url(module_app_id: @module_app_id) else + flash.now[:error] = t('update.error.tag') render :action => "edit" end end diff --git a/app/controllers/admin/tags_controller.rb b/app/controllers/admin/tags_controller.rb index e4f437f3f..3baf86512 100644 --- a/app/controllers/admin/tags_controller.rb +++ b/app/controllers/admin/tags_controller.rb @@ -1,5 +1,7 @@ class Admin::TagsController < OrbitBackendController include OrbitTag::Merging + + open_for_manager def index @tags = @module_app.module_tags diff --git a/app/views/admin/tags/_index.html.erb b/app/views/admin/tags/_index.html.erb index 74c7fe112..382b045bb 100644 --- a/app/views/admin/tags/_index.html.erb +++ b/app/views/admin/tags/_index.html.erb @@ -16,14 +16,14 @@
diff --git a/app/views/admin/tags/_module_tag.html.erb b/app/views/admin/tags/_module_tag.html.erb deleted file mode 100644 index a6147f754..000000000 --- a/app/views/admin/tags/_module_tag.html.erb +++ /dev/null @@ -1,19 +0,0 @@ -- -
- <%= hidden_field_tag "ids[]", module_tag.id, class: "tag_id" %> - <% end %> - <% if defined?(in_module) && module_tag.is_default %> - - <%= get_tagging_count(module_tag) %> - <%= show_names_slash(module_tag) %> - - <% else %> - <%= link_to edit_admin_tag_path(module_tag), class: "open-slide" do %> - <%= get_tagging_count(module_tag) %> - <%= show_names_slash(module_tag) %> - <% end %> - <% end %> -+ +
+ <%= hidden_field_tag "ids[]", tag.id, class: "tag_id" %> + <% end %> + <% if defined?(in_module) && tag.is_default %> + + <%= get_tagging_count(tag) %> + <%= show_names_slash(tag) %> + + <% else %> + <%= link_to edit_admin_tag_path(tag), class: "open-slide", data: {title: t('editing.tag')} do %> + <%= get_tagging_count(tag) %> + <%= show_names_slash(tag) %> + <% end %> + <% end %> +