diff --git a/vendor/built_in_modules/dictionary/app/helpers/panel/dictionary/back_end/dictionary_vocab_categorys_helper.rb b/vendor/built_in_modules/dictionary/app/helpers/panel/dictionary/back_end/dictionary_vocab_categorys_helper.rb
index e7d9bddd2..d8db3d023 100644
--- a/vendor/built_in_modules/dictionary/app/helpers/panel/dictionary/back_end/dictionary_vocab_categorys_helper.rb
+++ b/vendor/built_in_modules/dictionary/app/helpers/panel/dictionary/back_end/dictionary_vocab_categorys_helper.rb
@@ -12,4 +12,9 @@ include ActionView::Helpers::UrlHelper
link_to t(:category_auth),admin_object_auth_ob_auth_path(oa)
end
+ def show_toggle_dictionary_btn(dictionary_vocab_category)
+ trans_path = "dictionary.backend"
+ return dictionary_vocab_category.disable ? t("#{trans_path}.close") : t("#{trans_path}.open")
+ end
+
end
\ No newline at end of file
diff --git a/vendor/built_in_modules/dictionary/app/views/panel/dictionary/back_end/dictionary_vocab_categorys/_dictionary_vocab_category.html.erb b/vendor/built_in_modules/dictionary/app/views/panel/dictionary/back_end/dictionary_vocab_categorys/_dictionary_vocab_category.html.erb
index b2262689b..a5a7d84c1 100644
--- a/vendor/built_in_modules/dictionary/app/views/panel/dictionary/back_end/dictionary_vocab_categorys/_dictionary_vocab_category.html.erb
+++ b/vendor/built_in_modules/dictionary/app/views/panel/dictionary/back_end/dictionary_vocab_categorys/_dictionary_vocab_category.html.erb
@@ -5,6 +5,7 @@
<% if is_admin?%>
- <%= link_to t(:edit), edit_panel_dictionary_back_end_dictionary_vocab_category_path(dictionary_vocab_category), :remote => true %>
+ - <%= link_to show_toggle_dictionary_btn(dictionary_vocab_category) , panel_dictionary_back_end_dictionary_vocab_category_path(dictionary_vocab_category), :confirm => t(:sure?), :method => :delete, :remote => true, :class=> "dictionary_toggle" %>
<% end %>
<%if is_manager? || is_admin? %>
- <%= show_anc_cate_permission_link(dictionary_vocab_category) %>
diff --git a/vendor/built_in_modules/dictionary/app/views/panel/dictionary/back_end/dictionary_vocab_categorys/destroy.js.erb b/vendor/built_in_modules/dictionary/app/views/panel/dictionary/back_end/dictionary_vocab_categorys/destroy.js.erb
new file mode 100644
index 000000000..782028cf5
--- /dev/null
+++ b/vendor/built_in_modules/dictionary/app/views/panel/dictionary/back_end/dictionary_vocab_categorys/destroy.js.erb
@@ -0,0 +1 @@
+$("#<%= dom_id @dictionary_vocab_category %>").find(".dictionary_toggle").text("<%= show_toggle_archive_btn(@dictionary_vocab_category) %>");
\ No newline at end of file
diff --git a/vendor/built_in_modules/dictionary/config/locales/en.yml b/vendor/built_in_modules/dictionary/config/locales/en.yml
index dcc2f783c..4d52a21a2 100644
--- a/vendor/built_in_modules/dictionary/config/locales/en.yml
+++ b/vendor/built_in_modules/dictionary/config/locales/en.yml
@@ -1,18 +1,10 @@
en:
-
- archive:
- archive: Archive
- Title: Title
- Files: Files
- Category: Category
- frontend:
- archive: Archive Front-end
- widget:
- index: Archive Widget
-
-en:
-
dictionary:
+ backend:
+ close: Close
+ open: Open
+ update:
+ success_: Update Success
frontend:
dictionary: Dictionary Front-end
dictionary: Dictionary
diff --git a/vendor/built_in_modules/dictionary/config/locales/zh_tw.yml b/vendor/built_in_modules/dictionary/config/locales/zh_tw.yml
index 1a676a24a..9893dc90c 100644
--- a/vendor/built_in_modules/dictionary/config/locales/zh_tw.yml
+++ b/vendor/built_in_modules/dictionary/config/locales/zh_tw.yml
@@ -1,22 +1,10 @@
zh_tw:
-
- archive:
- archive: 檔案室
- Title: 標題
- Files: 檔案
- Category: 類別
- frontend:
- archive: 檔案室前台
- widget:
- index: 檔案室Widget
- mongoid:
- attributes:
- archive_file:
- sort_number: 排序數
-
-zh_tw:
-
dictionary:
+ backend:
+ close: 關閉
+ open: 開啟
+ update:
+ success_: 更新成功
frontend:
dictionary: 字典前台
dictionary: 字彙辭典