<% 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 %>
<%= select_tag 'ad_banner[id]',options_from_collection_for_select(AdBanner.all, "id", "title",params[:ad_banner_id]) , :class=>"input-medium" %>
<%= f.datetime_picker :post_date, :no_label => true %>
<%= f.datetime_picker :unpost_date, :no_label => true %>
<% @tags.each do |tag| %> <% end %>
<%= f.select :link_open ,AdImage::LINK_OPEN_TYPES%>
<%= f.text_field :weight ,:class=> 'span3',:placeholder=> t('ad.chinese_1') %> Please enter the number
<% if @ad_image.file %> <%= image_tag @ad_image.file %> <% else %> <%= image_tag "http://www.placehold.it/50x50/EFEFEF/AAAAAA" %> <%end%>
<%= t(:select_image) %> <%= t(:change) %> <%= f.file_field :file %> <%= t(:cancel) %>
<% @site_valid_locales.each_with_index do |locale, i| %>
">
<%= f.fields_for :title_translations do |f| %> <%= f.text_field locale, class: "input-block-level", placeholder: t(:title), value: (@ad_image.title_translations[locale] rescue nil) %> <% end %>
<%= f.fields_for :text_translations do |f| %> <%= f.cktext_area locale, rows: 5, class: "input-block-level", :value => (@ad_image.text_translations[locale] rescue nil) %> <% end %>
<% end %>
<%= f.submit t("submit"),:class=>"btn btn-primary" %> <%= f.submit t("cancel"),:class=>"btn ",:type => 'reset' %>