gallery/app/views/admin/galleries/_form.html.erb

99 lines
4.3 KiB
Plaintext
Raw Normal View History

<% 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 %>
<fieldset>
<!-- Input Area -->
<div class="input-area">
<!-- Module Tabs -->
2014-05-13 07:40:35 +00:00
<div class="nav-name"><strong><%= t(:module) %></strong></div>
<ul class="nav nav-pills module-nav">
<li class="active">
2014-05-13 07:40:35 +00:00
<a href="#basic" data-toggle="tab"><%= t(:basic) %></a>
</li>
<li>
2014-05-13 07:40:35 +00:00
<a href="#tag" data-toggle="tab"><%= t(:tags) %></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">
2014-05-13 07:40:35 +00:00
<label class="control-label muted"><%= t(:category) %></label>
<div class="controls">
2014-05-13 07:40:35 +00:00
<%= select_category(f, @module_app) %>
</div>
</div>
</div>
<!-- Tag Module -->
<div class="tab-pane fade" id="tag">
<!-- Tag -->
<div class="control-group">
2014-05-13 07:40:35 +00:00
<label class="control-label muted"><%= t(:tags) %></label>
<%= select_tag(f, @module_app) %>
</div>
</div>
</div>
2014-05-13 07:40:35 +00:00
<div class="nav-name"><strong><%= t(:language) %></strong></div>
<ul class="nav nav-pills language-nav">
<% I18n.available_locales.each_with_index do |locale, i| %>
<li <%= (i == 0 ? 'class=active' : '') %>>
<a href=".<%= locale %>" data-toggle="tab"><%= t(locale.to_s) %></a>
</li>
<% end %>
</ul>
<div class="tab-content language-area">
<!-- Language Tabs -->
<% I18n.available_locales.each_with_index do |locale, i| %>
<div class="tab-pane fade in <%= (i == 0 ? 'active' : '') %> <%= locale %>">
<div class="control-group input-title">
<%= f.fields_for :name_translations do |name| %>
<%= label_tag(locale, t("gallery.album_name"),:class=>"control-label muted") %>
<div class="controls">
<%= name.text_field locale, :class => "input-block-level", :placeholder=>"Title",:value => (@album.name_translations[locale] rescue nil) %>
</div>
<% end %>
</div>
<div class="control-group input-content">
<%= f.fields_for :description_translations do |desc| %>
<%= label_tag(locale, t("gallery.album_desc"), :class=>"control-label muted") %>
<div class="controls">
<div class="textarea">
<%= desc.text_area locale, :class => "ckeditor input-block-level", :value => (@album.description_translations[locale] rescue nil)%>
</div>
</div>
<% end %>
</div>
</div>
<% end %>
</div>
</div>
<!-- Form Actions -->
<div class="form-actions">
<%= f.submit t("gallery.save"), :class=> "btn btn-primary bt-form-save" %>
</div>
</fieldset>