<% content_for :page_specific_css do %> <%= stylesheet_link_tag "lib/main-forms" %> <%= stylesheet_link_tag "lib/fileupload" %> <%= stylesheet_link_tag "lib/main-list" %> <%= stylesheet_link_tag "jquery.minicolors" %> <% 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" %> <%= javascript_include_tag "jquery.minicolors" %> <% end %>
<%= select_category(f, @module_app) %>
<%= select_tags(f, @module_app) %>
<% if @album.album_colors.first.nil? %> <% @album.album_colors.new('color' => 'transparent') %> <% end %>
<%= f.select :thumb_process_option, t('gallery.thumb_process_option').to_enum.with_index.collect{|v, i| [v, i]} %>
<%= f.fields_for :album_colors do |album_color_form| %>
<%= album_color_form.text_field :color , :class => 'input-block-level minicolors-input' %> <%= t('gallery.transparent') %>
<%= f.select :resize_gravity, [["---#{t("default")}: #{t("gallery.gravity.#{AlbumSetting::ResizeGravities[0]}")}---",nil]]+AlbumSetting::ResizeGravities.collect{|v| [t("gallery.gravity.#{v}"),v]} %>
<%= album_color_form.text_field :album_card_background_color, :class => 'input-block-level minicolors-input' %> <%= t('gallery.transparent') %>
<%= album_color_form.text_field :album_card_text_color, :class => 'input-block-level minicolors-input' %> <%= t('gallery.transparent') %>
<% end %>
<% @site_in_use_locales.each_with_index do |locale, i| %>
<%= f.fields_for :name_translations do |name| %> <%= label_tag(locale, t("gallery.album_name"),:class=>"control-label muted") %>
<%= name.text_field locale, :class => "input-block-level", :placeholder=>"Title",:value => (@album.name_translations[locale] rescue nil) %>
<% end %>
<%= f.fields_for :description_translations do |desc| %> <%= label_tag(locale, t("gallery.album_desc"), :class=>"control-label muted") %>
<%= desc.text_area locale, :class => "ckeditor input-block-level", :value => (@album.description_translations[locale] rescue nil)%>
<% end %>
<% end %>
<%= f.submit t("gallery.save"), :class=> "btn btn-primary bt-form-save" %>