Update category and tag
This commit is contained in:
parent
e0f7d92d7a
commit
2d8d079ba5
|
@ -27,7 +27,7 @@
|
||||||
<div class="control-group">
|
<div class="control-group">
|
||||||
<label class="control-label muted"><%= t(:category) %></label>
|
<label class="control-label muted"><%= t(:category) %></label>
|
||||||
<div class="controls">
|
<div class="controls">
|
||||||
<%= f.select :category_id, @categories.collect{|t| [ t.title, t.id ]} %>
|
<%= select_category(f, @module_app) %>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
@ -61,13 +61,7 @@
|
||||||
<!-- Tag -->
|
<!-- Tag -->
|
||||||
<div class="control-group">
|
<div class="control-group">
|
||||||
<label class="control-label muted"><%= t(:tags) %></label>
|
<label class="control-label muted"><%= t(:tags) %></label>
|
||||||
<div class="controls" data-toggle="buttons-checkbox">
|
<%= select_tag(f, @module_app) %>
|
||||||
<% @tags.each do |tag| %>
|
|
||||||
<label class="checkbox inline btn <%= 'active' if @link.tags.include?(tag) %>">
|
|
||||||
<%= check_box_tag 'web_link[tags][]', tag.id, @link.tags.include?(tag) %> <%= tag.name %>
|
|
||||||
</label>
|
|
||||||
<% end %>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -0,0 +1,3 @@
|
||||||
|
en:
|
||||||
|
web_resource: Web resource
|
||||||
|
web_link: Web resource
|
|
@ -0,0 +1,3 @@
|
||||||
|
zh_tw:
|
||||||
|
web_resource: 網路資源
|
||||||
|
web_link: 網路資源
|
|
@ -10,7 +10,7 @@ module WebResource
|
||||||
authorizable
|
authorizable
|
||||||
|
|
||||||
side_bar do
|
side_bar do
|
||||||
head_label_i18n 'link',:icon_class=>"icons-link"
|
head_label_i18n 'web_resource',:icon_class=>"icons-link"
|
||||||
available_for [:admin,:manager,:sub_manager]
|
available_for [:admin,:manager,:sub_manager]
|
||||||
active_for_controllers ({:private=>['web_resource']})
|
active_for_controllers ({:private=>['web_resource']})
|
||||||
head_link_path "admin_web_resources_path"
|
head_link_path "admin_web_resources_path"
|
||||||
|
@ -21,11 +21,26 @@ module WebResource
|
||||||
:active_for_action=>{'admin/web_resources'=>'index'},
|
:active_for_action=>{'admin/web_resources'=>'index'},
|
||||||
:available_for => [:all]
|
:available_for => [:all]
|
||||||
|
|
||||||
context_link 'add',
|
context_link 'new_',
|
||||||
:link_path=>"new_admin_web_resource_path" ,
|
:link_path=>"new_admin_web_resource_path" ,
|
||||||
:priority=>2,
|
:priority=>2,
|
||||||
:active_for_action=>{'admin/web_resources'=>'new'},
|
:active_for_action=>{'admin/web_resources'=>'new'},
|
||||||
:available_for => [:sub_manager]
|
:available_for => [:sub_manager]
|
||||||
|
|
||||||
|
context_link 'categories',
|
||||||
|
:link_path=>"admin_module_app_categories_path" ,
|
||||||
|
:link_arg=>{:module_app_id=>get_module_app.id},
|
||||||
|
:priority=>3,
|
||||||
|
:active_for_action=>{'admin/web_resources.'=>'categories'},
|
||||||
|
:active_for_category => 'WebResource',
|
||||||
|
:available_for => [:manager]
|
||||||
|
context_link 'tags',
|
||||||
|
:link_path=>"admin_module_app_tags_path" ,
|
||||||
|
:link_arg=>{:module_app_id=>get_module_app.id},
|
||||||
|
:priority=>4,
|
||||||
|
:active_for_action=>{'admin/web_resources'=>'tags'},
|
||||||
|
:active_for_tag => 'WebResource',
|
||||||
|
:available_for => [:manager]
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in New Issue