Add category disable function
This commit is contained in:
parent
47301de00d
commit
ee416dec58
|
@ -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
|
|
@ -5,6 +5,7 @@
|
|||
<ul class="nav nav-pills hide">
|
||||
<% if is_admin?%>
|
||||
<li><%= link_to t(:edit), edit_panel_dictionary_back_end_dictionary_vocab_category_path(dictionary_vocab_category), :remote => true %></li>
|
||||
<li><%= 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" %></li>
|
||||
<% end %>
|
||||
<%if is_manager? || is_admin? %>
|
||||
<li><%= show_anc_cate_permission_link(dictionary_vocab_category) %></li>
|
||||
|
|
|
@ -0,0 +1 @@
|
|||
$("#<%= dom_id @dictionary_vocab_category %>").find(".dictionary_toggle").text("<%= show_toggle_archive_btn(@dictionary_vocab_category) %>");
|
|
@ -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
|
||||
|
|
|
@ -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: 字彙辭典
|
||||
|
|
Loading…
Reference in New Issue