<% content_for :page_specific_css do %> <%= stylesheet_link_tag "lib/datepicker" %> <% end %> <% content_for :page_specific_javascript do %> <%= javascript_include_tag "lib/datepicker" %> <%= javascript_include_tag "lib/date.format.js" %> <%= javascript_include_tag "inc/modal-preview" %> <%= javascript_include_tag "/static/jquery.cycle.all.latest.js" %> <%= javascript_include_tag "inc/jquery.imagesloaded.js" %> <% end %>

Date

<%= f.hidden_field :parse_post_date,:value => @ad_image.post_date.strftime('%Y / %m / %d') %> <%= f.hidden_field :parse_unpost_date,:value => @ad_image.unpost_date.strftime('%Y / %m / %d')%>

Picture

<%= image_tag @ad_image.file rescue ''%>
<% if !@ad_image.ad_banner.best_size.empty?%> <%= t("ad.widget_info_for_ad_image_size",:best_size=> @ad_image.ad_banner.best_size) %> <% end -%>

Type

<%= f.select :link_open ,AdImage::LINK_OPEN_TYPES%>

FEQ

<%= f.text_field :weight ,:class=> 'span3',:placeholder=>"在套圖中出現次數 1次請輸入1" %>
<%= select_tag 'ad_banner[id]',options_from_collection_for_select(AdBanner.all, "id", "title",params[:ad_banner_id]) , :class=>"input-medium", %> <% @site_valid_locales.each do |locale|%> <%= content_tag :div,:class => "tab-pane #{active_when_current_locale_eq locale}",:id=>"#{locale}" do%>
<%= f.fields_for :title_translations do |f| %> <%= f.text_field locale, :class=>"ad_image-title post-title", :placeholder => "輸入標題", :value => (@ad_image.title_translations[locale] rescue nil) %> <% end %>

<%= f.fields_for :context_translations, @ad_image.context do |f| %> <%= f.text_area locale, :style => "width:100%", :class => "tinymce_textarea post-title", :value => (@ad_image.context_translations[locale] rescue nil) %> <% end %>
<% end %> <% end %>
<%#= link_to t("modal.preview"), admin_realtime_preview_ad_banner_path(@ad_image.ad_banner.title) ,:class=>"preview_trigger btn btn-success" rescue nil%> <%= f.submit t("submit"),:class=>"btn btn-primary" %> <%= f.submit t("cancel"),:class=>"btn ",:type => 'reset' %>