Update category and tag
This commit is contained in:
parent
8e5f1af790
commit
325838cf59
|
@ -40,7 +40,7 @@
|
|||
<div class="control-group">
|
||||
<label class="control-label muted"><%= t(:category) %></label>
|
||||
<div class="controls">
|
||||
<%= f.select :category_id, @categories.collect{|t| [ t.title, t.id ]} %>
|
||||
<%= select_category(f, @module_app) %>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
@ -81,14 +81,7 @@
|
|||
<!-- Tag -->
|
||||
<div class="control-group">
|
||||
<label class="control-label muted"><%= t(:tags) %></label>
|
||||
<div class="controls" data-toggle="buttons-checkbox">
|
||||
<% @tags.each do |tag| %>
|
||||
<label class="checkbox inline btn <%= 'active' if @archive_file.tags.include?(tag) %>">
|
||||
<%= check_box_tag 'archive_file[tags][]', tag.id, @archive_file.tags.include?(tag) %> <%= tag.name %>
|
||||
<%= hidden_field_tag 'archive_file[tags][]', '' %>
|
||||
</label>
|
||||
<% end %>
|
||||
</div>
|
||||
<%= select_tag(f, @module_app) %>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
|
|
@ -15,15 +15,29 @@ module Archive
|
|||
active_for_controllers (['admin/archive_files'])
|
||||
head_link_path "admin_archive_files_path"
|
||||
|
||||
context_link 'archive.all',
|
||||
context_link 'all',
|
||||
:link_path=>"admin_archive_files_path" ,
|
||||
:priority=>1,
|
||||
:active_for_action=>{'admin/archive_files'=>"index"}
|
||||
|
||||
context_link 'archive.new',
|
||||
context_link 'new_',
|
||||
:link_path=>"new_admin_archive_file_path" ,
|
||||
:priority=>2,
|
||||
:active_for_action=>{'admin/archive_files'=>"new"}
|
||||
|
||||
context_link 'categories',
|
||||
:link_path=>"admin_module_app_categories_path" ,
|
||||
:link_arg=>"{:module_app_id=>ModuleApp.find_by(:key=>'archive').id}",
|
||||
:priority=>3,
|
||||
:active_for_action=>{'admin/archive_files'=>'categories'},
|
||||
:active_for_category => 'Archive'
|
||||
|
||||
context_link 'tags',
|
||||
:link_path=>"admin_module_app_tags_path" ,
|
||||
:link_arg=>"{:module_app_id=>ModuleApp.find_by(:key=>'archive').id}",
|
||||
:priority=>4,
|
||||
:active_for_action=>{'admin/archive_files'=>'tags'},
|
||||
:active_for_tag => 'Archive'
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue