106 lines
4.6 KiB
Plaintext
106 lines
4.6 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 %>
|
|
<fieldset>
|
|
<!-- Input Area -->
|
|
<div class="input-area">
|
|
|
|
<!-- Module Tabs -->
|
|
<div class="nav-name"><strong>Module</strong></div>
|
|
<ul class="nav nav-pills module-nav">
|
|
<li class="active">
|
|
<a href="#basic" data-toggle="tab">Basic</a>
|
|
</li>
|
|
<li>
|
|
<a href="#tag" data-toggle="tab">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">
|
|
<label class="control-label muted">Category</label>
|
|
<div class="controls">
|
|
<%= f.select(:category_id, @categories.collect {|p| [ p.title, p.id ] }) %>
|
|
</div>
|
|
</div>
|
|
|
|
</div>
|
|
<!-- Tag Module -->
|
|
<div class="tab-pane fade" id="tag">
|
|
|
|
<!-- Tag -->
|
|
<div class="control-group">
|
|
<label class="control-label muted">Tag</label>
|
|
<div class="controls" data-toggle="buttons-checkbox">
|
|
<%@tags.each do |tag|%>
|
|
<label class="checkbox inline btn <%= 'active' if @album.tags.include?(tag) %>">
|
|
<%= check_box_tag 'album[tags][]', tag.id, @album.tags.include?(tag)%>
|
|
<%= tag.name %>
|
|
</label>
|
|
<%end %>
|
|
</div>
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
<div class="nav-name"><strong>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> |