Update category and tag
This commit is contained in:
parent
8e5f1af790
commit
325838cf59
|
@ -40,7 +40,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>
|
||||||
|
|
||||||
|
@ -81,14 +81,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 @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>
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -15,15 +15,29 @@ module Archive
|
||||||
active_for_controllers (['admin/archive_files'])
|
active_for_controllers (['admin/archive_files'])
|
||||||
head_link_path "admin_archive_files_path"
|
head_link_path "admin_archive_files_path"
|
||||||
|
|
||||||
context_link 'archive.all',
|
context_link 'all',
|
||||||
:link_path=>"admin_archive_files_path" ,
|
:link_path=>"admin_archive_files_path" ,
|
||||||
:priority=>1,
|
:priority=>1,
|
||||||
:active_for_action=>{'admin/archive_files'=>"index"}
|
:active_for_action=>{'admin/archive_files'=>"index"}
|
||||||
|
|
||||||
context_link 'archive.new',
|
context_link 'new_',
|
||||||
:link_path=>"new_admin_archive_file_path" ,
|
:link_path=>"new_admin_archive_file_path" ,
|
||||||
:priority=>2,
|
:priority=>2,
|
||||||
:active_for_action=>{'admin/archive_files'=>"new"}
|
: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
|
end
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in New Issue