e_paper/app/views/admin/e_papers/_form.html.erb

97 lines
3.2 KiB
Plaintext

<% content_for :page_specific_css do %>
<%= stylesheet_link_tag "lib/main-forms" %>
<%= stylesheet_link_tag "lib/fileupload" %>
<%= stylesheet_link_tag "lib/main-list" %>
<% end %>
<% content_for :page_specific_javascript do %>
<%= javascript_include_tag "lib/bootstrap-fileupload" %>
<%= javascript_include_tag "lib/bootstrap-datetimepicker" %>
<%= javascript_include_tag "lib/datetimepicker/datetimepicker.js" %>
<%= javascript_include_tag "lib/modal-preview" %>
<%= javascript_include_tag "lib/file-type" %>
<% end %>
<%#= f.error_messages %>
<fieldset>
<!-- Input Area -->
<div class="input-area">
<!-- Module Tabs -->
<div class="nav-name"><strong><%= t(:module) %></strong></div>
<ul class="nav nav-pills module-nav">
<li class="active">
<a href="#basic" data-toggle="tab"><%= t(:basic) %></a>
</li>
</ul>
<!-- Module -->
<div class="tab-content module-area">
<!-- Basic Module -->
<div class="tab-pane fade in active" id="basic">
<!-- Category -->
<div class="control-group">
<%= f.label :category ,t(:category), :class=>"control-label muted" %>
<div class="controls">
<%= select_category(f, @module_app) %>
</div>
</div>
</div>
<!-- Language Tabs -->
<div class="nav-name"><strong>Language</strong></div>
<ul class="nav nav-pills language-nav">
<% @site_in_use_locales.each_with_index do |locale, i| %>
<li <%= ( i == 0 ) ? "class=active" : '' %>><a data-toggle="tab" href=".<%= locale %>"><%= t(locale.to_s) %></a></li>
<% end %>
</ul>
<!-- Language -->
<div class="tab-content language-area">
<% @site_in_use_locales.each_with_index do |locale, i| %>
<div class="<%= locale %> fade tab-pane <%= ( i == 0 ) ? "in active" : '' %>">
<div class="control-group input-title">
<%= f.label :title , t('e_paper.title'), :class=>"control-label muted" %>
<div class="controls">
<%= f.fields_for :title_translations do |f| %>
<%= f.text_field locale, :class=>'input-block-level', :value => (@paper.title_translations[locale.to_s] rescue nil) %>
<% end %>
</div>
</div>
<div class="control-group input-period">
<%= f.label :period ,t('e_paper.period'), :class => "control-label muted" %>
<div class="controls">
<%= f.fields_for :period_translations do |f| %>
<%= f.text_field locale, :class=>'input-large', :value => (@paper.period_translations[locale] rescue nil) %>
</div>
<% end %>
</div>
<div class="control-group input-description">
<%= f.label :description ,t('e_paper.description'), :class => "control-label muted" %>
<%= f.fields_for :description_translations do |f| %>
<div class="controls">
<%= f.text_area locale, :class=>'input-block-level', :value => (@paper.description_translations[locale] rescue nil) %>
</div>
<% end %>
</div>
</div>
<% end %>
<!-- Form Actions -->
<div class="form-actions">
<input type="hidden" name="referer_url" value="<%= request.referer %>">
<%= f.submit t('submit'), class: 'btn btn-primary' %>
</div>
</fieldset>