have done multiple file
This commit is contained in:
parent
4a0cc61852
commit
d806e8cf82
|
@ -244,7 +244,7 @@
|
|||
$(this).parents('table').append(("<%= escape_javascript(add_attribute 'form_file', f, :writing_journal_files) %>").replace(old_id, new_id));
|
||||
});
|
||||
|
||||
$('.add_plugin_files_block a.delete').live('click', function(){
|
||||
$('.action a.delete').live('click', function(){
|
||||
$(this).parents('.list_item').remove();
|
||||
});
|
||||
|
||||
|
|
|
@ -1,28 +1,12 @@
|
|||
<tr id="<%= "plugin_file_#{form_file.id}" if !form_file.new_record? %>" class='list_item'>
|
||||
<tr id="<%= "plugin_file_#{form_file.id}" if !form_file.new_record? %>" class="list_item">
|
||||
<td>
|
||||
<div class="control-group">
|
||||
<div class="controls">
|
||||
<%= f.file_field :file, class: "s_grid_1 s_grid" %>
|
||||
<%= form_file.file.file ? ( link_to t(:view), form_file.file.url, {:class => 'btn s_grid_1 s_grid', :target => '_blank', :title => t(:view)} ) : '' %>
|
||||
</div>
|
||||
<div>
|
||||
<%= f.file_field :file, class: "s_grid_1 s_grid" %>
|
||||
<%= form_file.file.file ? ( link_to t(:view), form_file.file.url, {:class => 'btn s_grid_1 s_grid', :target => '_blank', :title => t(:view)} ) : '' %>
|
||||
</div>
|
||||
</td>
|
||||
<td>
|
||||
|
||||
<div class="tab-content">
|
||||
<% @site_valid_locales.each_with_index do |locale, i| %>
|
||||
<div class="<%= locale %> fade tab-pane <%= ( i == 0 ) ? "in active" : '' %>">
|
||||
<%= f.fields_for :file_title_translations do |f| %>
|
||||
<div class="control-group">
|
||||
<label for="link-<%= locale %>" class="control-label"><%= I18nVariable.from_locale(locale) %></label>
|
||||
<div class="controls">
|
||||
<%= f.text_field locale, :class=>'s_grid_1 s_grid', :value => (form_file.file_title_translations[locale] rescue nil) %>
|
||||
</div>
|
||||
</div>
|
||||
<% end %>
|
||||
</div>
|
||||
<% end %>
|
||||
</div>
|
||||
<%= f.text_field :title, :class=>'s_grid_1 s_grid' %>
|
||||
</td>
|
||||
|
||||
<td>
|
||||
|
|
Loading…
Reference in New Issue