archive checkbox

This commit is contained in:
unknown 2012-04-23 15:53:58 +08:00 committed by chris
parent 57717eef33
commit c74ebb91b8
2 changed files with 47 additions and 12 deletions

View File

@ -108,17 +108,7 @@
<% end -%> <% end -%>
<%= content_tag :li, :class => active_for_controllers('archive_files', 'tags', 'archive_file_categorys') do -%> <%= 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') %>
<%= 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 %>
<%= content_tag :ul, :class => ("nav nav-list " + visible_for_controllers('archive_files', 'tags', 'archive_file_categorys')) do -%> <%= 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.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.add_new'), new_panel_archive_back_end_archive_file_path), :class => active_for_action('archive_file', 'new') %>

View File

@ -46,7 +46,8 @@
<%= f.select :archive_file_category_id, @archive_file_categorys.collect {|t| [ t.i18n_variable[I18n.locale], t.id ]} %> <%= f.select :archive_file_category_id, @archive_file_categorys.collect {|t| [ t.i18n_variable[I18n.locale], t.id ]} %>
<ul class="nav nav-tabs"> <ul class="nav nav-tabs">
<% @site_valid_locales.each_with_index do |locale, i| %> <%# @site_valid_locales.each_with_index do |locale, i| %>
<% site_valid_locales_default_head.each_with_index do |locale, i| %>
<li <%= ( i == 0 ) ? " class='active'" : '' %>><a data-toggle="tab" href=".<%= locale %>"><%= I18nVariable.from_locale(locale) %></a></li> <li <%= ( i == 0 ) ? " class='active'" : '' %>><a data-toggle="tab" href=".<%= locale %>"><%= I18nVariable.from_locale(locale) %></a></li>
<% end %> <% end %>
</ul> </ul>
@ -114,6 +115,50 @@
<div>
<div id='archive_file_multiples' class="archive_file_multiples_block">
<table class="table table-condensed">
<thead>
<tr>
<th>File</th>
<th>File Name</th>
<th class="span2"><%= t('呈現語系')%></th>
<th class="span1"></th>
</tr>
</thead>
<tfoot>
<tr>
<td style="text-align:center" colspan="4">
<div id='add_archive_file_multiple' class="info_input archive_file_multiples_block">
<%= hidden_field_tag 'archive_file_multiple_field_count', @archive_file.archive_file_multiples.count %>
<a class="add"><span class="btn btn-primary btn-small"><i class="icon-plus icon-white"></i> ADD/新增</span></a>
</div>
</td>
</tr>
</tfoot>
<tbody>
<% @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 %>
</tbody>
</table>
</div>
</div>
</div> </div>
<!--Post End--> <!--Post End-->