From 2a4c737cddbaacaee59ca0341803badf410cbad0 Mon Sep 17 00:00:00 2001 From: unknown Date: Mon, 23 Apr 2012 15:53:58 +0800 Subject: [PATCH] archive checkbox --- app/views/layouts/_side_bar.html.erb | 12 +---- .../back_end/archive_files/_form.html.erb | 47 ++++++++++++++++++- 2 files changed, 47 insertions(+), 12 deletions(-) diff --git a/app/views/layouts/_side_bar.html.erb b/app/views/layouts/_side_bar.html.erb index 76946182..f98984a3 100644 --- a/app/views/layouts/_side_bar.html.erb +++ b/app/views/layouts/_side_bar.html.erb @@ -88,17 +88,7 @@ <%# end -%> <%= content_tag :li, :class => active_for_controllers('archive_files', 'tags', 'archive_file_categorys') do -%> - <%= link_to content_tag(:i, nil, :class => 'icons-archive') + t('admin.archive'), panel_archive_back_end_archive_files_path %> - <%= content_tag :ul, :class => ("nav nav-list " + visible_for_controllers('archive_files', 'tags', 'archive_file_categorys')) do -%> - <%= content_tag :li, link_to(t('admin.all_articles'), panel_archive_back_end_archive_files_path), :class => active_for_action('archive_file', 'index') %> - <%= content_tag :li, link_to(t('admin.add_new'), new_panel_archive_back_end_archive_file_path), :class => active_for_action('archive_file', 'new') %> - <%= content_tag :li, link_to(t('admin.categories'), panel_archive_back_end_archive_file_categorys_path), :class => active_for_action('archive_file_categorys', 'index') %> - <%= content_tag :li, link_to(t('admin.tags'), panel_archive_back_end_tags_path), :class => active_for_action('tags', 'index') %> - <% end -%> -<% end -%> - -<%= content_tag :li, :class => active_for_controllers('archive_files', 'tags', 'archive_file_categorys') do -%> - <%= link_to content_tag(:i, nil, :class => 'icons-archive') + t('admin.archive'), panel_archive_back_end_archive_files_path %> + <%= link_to content_tag(:i, nil, :class => 'icons-asset') + t('admin.archive'), panel_archive_back_end_archive_files_path %> <%= content_tag :ul, :class => ("nav nav-list " + visible_for_controllers('archive_files', 'tags', 'archive_file_categorys')) do -%> <%= content_tag :li, link_to(t('admin.all_articles'), panel_archive_back_end_archive_files_path), :class => active_for_action('archive_file', 'index') %> <%= content_tag :li, link_to(t('admin.add_new'), new_panel_archive_back_end_archive_file_path), :class => active_for_action('archive_file', 'new') %> diff --git a/vendor/built_in_modules/archive/app/views/panel/archive/back_end/archive_files/_form.html.erb b/vendor/built_in_modules/archive/app/views/panel/archive/back_end/archive_files/_form.html.erb index 3d887a6b..4d4fd5f1 100644 --- a/vendor/built_in_modules/archive/app/views/panel/archive/back_end/archive_files/_form.html.erb +++ b/vendor/built_in_modules/archive/app/views/panel/archive/back_end/archive_files/_form.html.erb @@ -46,7 +46,8 @@ <%= f.select :archive_file_category_id, @archive_file_categorys.collect {|t| [ t.i18n_variable[I18n.locale], t.id ]} %> @@ -116,6 +117,50 @@ +
+ +
+ + + + + + + + + + + + + + + + + + + <% @archive_file.archive_file_multiples.each_with_index do |archive_file_multiple, i| %> + <%= f.fields_for :archive_file_multiples, archive_file_multiple do |f| %> + <%= render :partial => 'form_file', :object => archive_file_multiple, :locals => {:f => f, :i => i} %> + <% end %> + <% end %> + +
FileFile Name<%= t('呈現語系')%>
+
+ <%= hidden_field_tag 'archive_file_multiple_field_count', @archive_file.archive_file_multiples.count %> + ADD/新增 +
+
+ +
+ +
+ + + + + + +