diff --git a/app/views/admin/web_resources/_form.html.erb b/app/views/admin/web_resources/_form.html.erb index 09d3622..194197b 100644 --- a/app/views/admin/web_resources/_form.html.erb +++ b/app/views/admin/web_resources/_form.html.erb @@ -27,7 +27,7 @@
- <%= f.select :category_id, @categories.collect{|t| [ t.title, t.id ]} %> + <%= select_category(f, @module_app) %>
@@ -61,13 +61,7 @@
-
- <% @tags.each do |tag| %> - - <% end %> -
+ <%= select_tag(f, @module_app) %>
diff --git a/config/locales/en.yml b/config/locales/en.yml new file mode 100644 index 0000000..67be665 --- /dev/null +++ b/config/locales/en.yml @@ -0,0 +1,3 @@ +en: + web_resource: Web resource + web_link: Web resource \ No newline at end of file diff --git a/config/locales/zh_tw.yml b/config/locales/zh_tw.yml new file mode 100644 index 0000000..94ca571 --- /dev/null +++ b/config/locales/zh_tw.yml @@ -0,0 +1,3 @@ +zh_tw: + web_resource: 網路資源 + web_link: 網路資源 \ No newline at end of file diff --git a/lib/links/engine.rb b/lib/links/engine.rb index ae01722..e6dd3fb 100644 --- a/lib/links/engine.rb +++ b/lib/links/engine.rb @@ -10,7 +10,7 @@ module WebResource authorizable 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] active_for_controllers ({:private=>['web_resource']}) head_link_path "admin_web_resources_path" @@ -21,11 +21,26 @@ module WebResource :active_for_action=>{'admin/web_resources'=>'index'}, :available_for => [:all] - context_link 'add', + context_link 'new_', :link_path=>"new_admin_web_resource_path" , :priority=>2, :active_for_action=>{'admin/web_resources'=>'new'}, :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