2014-05-16 06:49:42 +00:00
|
|
|
<div class="modal-header">
|
|
|
|
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
|
|
|
|
<h3><%= t('edit_file') %></h3>
|
|
|
|
</div>
|
|
|
|
<%= form_for @asset, :url => admin_asset_path(@asset), :remote => true do |f| %>
|
|
|
|
<%= token_tag form_authenticity_token %>
|
|
|
|
<div class="modal-body main-forms" id="modal_body">
|
|
|
|
<fieldset>
|
|
|
|
<div class="input-area form-horizontal">
|
|
|
|
<div class="nav-name">
|
|
|
|
<strong><%= t(:language) %></strong>
|
|
|
|
</div>
|
|
|
|
<ul class="nav nav-pills language-nav">
|
2014-05-16 09:25:43 +00:00
|
|
|
<% @site_in_use_locales.each_with_index do |locale, i| %>
|
2014-05-16 06:49:42 +00:00
|
|
|
<li <%= ( i == 0 ) ? "class=active" : '' %>><a data-toggle="tab" href=".<%= locale %>"><%= t(locale) %></a></li>
|
|
|
|
<% end %>
|
|
|
|
</ul>
|
|
|
|
<div class="tab-content">
|
2014-05-16 09:25:43 +00:00
|
|
|
<% @site_in_use_locales.each_with_index do |locale, i| %>
|
2014-05-16 06:49:42 +00:00
|
|
|
<div class="<%= locale %> fade tab-pane <%= ( i == 0 ) ? "in active" : '' %>">
|
|
|
|
<div class="control-group input-title">
|
|
|
|
<%= f.label :title , t('title'), :class=>"control-label muted" %>
|
|
|
|
<div class="controls">
|
|
|
|
<%= f.fields_for :title_translations do |f| %>
|
|
|
|
<%= f.text_field locale, :class=>'post-title', :value => (@asset.title_translations[locale] rescue nil) %>
|
|
|
|
<% end %>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class="control-group input-content">
|
|
|
|
<%= f.label :description ,t('description'), :class => "control-label muted" %>
|
|
|
|
<%= f.fields_for :description_translations do |f| %>
|
|
|
|
<div class="controls">
|
|
|
|
<div class="textarea">
|
|
|
|
<%= f.text_area locale, :style=>"height:100px", :class => '', :value => (@asset.description_translations[locale] rescue nil) %>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<% end %>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<% end %>
|
|
|
|
</div>
|
|
|
|
<div class="control-group">
|
|
|
|
<label class="control-label muted"><%= f.label :data, t(:file_) %></label>
|
|
|
|
<div class="controls">
|
|
|
|
<%= f.file_field :data, :class => 'upload' %>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</fieldset>
|
|
|
|
</div>
|
|
|
|
<div class="modal-footer">
|
|
|
|
<a href="#" class="btn" data-dismiss="modal">Close</a>
|
|
|
|
<%= f.submit t('submit'), class: 'btn btn-primary' %>
|
|
|
|
</div>
|
|
|
|
<% end %>
|