diff --git a/app/views/admin/archive_files/_form.html.erb b/app/views/admin/archive_files/_form.html.erb index 6a04b95..773d1cd 100644 --- a/app/views/admin/archive_files/_form.html.erb +++ b/app/views/admin/archive_files/_form.html.erb @@ -40,7 +40,7 @@
- <%= f.select :category_id, @categories.collect{|t| [ t.title, t.id ]} %> + <%= select_category(f, @module_app) %>
@@ -81,14 +81,7 @@
-
- <% @tags.each do |tag| %> - - <% end %> -
+ <%= select_tag(f, @module_app) %>
diff --git a/lib/archive/engine.rb b/lib/archive/engine.rb index 1f37775..423e2ea 100644 --- a/lib/archive/engine.rb +++ b/lib/archive/engine.rb @@ -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