2012-04-01 15:39:49 +00:00
|
|
|
<% content_for :page_specific_javascript do %>
|
2012-04-17 07:21:43 +00:00
|
|
|
<%= javascript_include_tag "inc/modal-preview" %>
|
2012-04-17 08:03:48 +00:00
|
|
|
<%= javascript_include_tag "/static/jquery.cycle.all.latest.js" %>
|
2012-04-25 07:10:28 +00:00
|
|
|
<%= javascript_include_tag "inc/jquery.imagesloaded.js" %>
|
2012-04-01 15:39:49 +00:00
|
|
|
<% end %>
|
|
|
|
|
|
|
|
|
|
|
|
<div id="poststuff">
|
|
|
|
<form class="clear">
|
|
|
|
<!--Widget start-->
|
|
|
|
<div id="sub-wiget">
|
|
|
|
<div id="widget-date" class="widget-box">
|
|
|
|
<div class="widget-action clear">
|
2012-11-27 03:15:15 +00:00
|
|
|
<a href="#" class="action"><i title="<%= t('ad.set_dates') %>" class="icon-exclamation-sign icon-white tip"></i></a>
|
2012-04-01 15:39:49 +00:00
|
|
|
</div>
|
2012-11-27 03:15:15 +00:00
|
|
|
<h3 class="widget-title"><i class="icons-calendar"></i><%= t(:date_) %></h3>
|
2012-04-01 15:39:49 +00:00
|
|
|
<div class="widget-content clear">
|
2013-01-09 09:08:09 +00:00
|
|
|
<%= f.datetime_picker :post_date, :picker_type => 'date', :label => t(:start_date), :icon_date => "icons-cross-3 icon-spin" %>
|
|
|
|
<%= f.datetime_picker :unpost_date, :picker_type => 'separated', :label => t(:end_date) %>
|
2012-04-01 15:39:49 +00:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div id="widget-picture" class="widget-box">
|
|
|
|
<div class="widget-action clear">
|
2012-11-27 03:15:15 +00:00
|
|
|
<a class="action"><i title="<%= t('ad.upload_pictures') %>" class="icon-exclamation-sign icon-white tip"></i></a>
|
2012-04-01 15:39:49 +00:00
|
|
|
</div>
|
2012-11-27 03:15:15 +00:00
|
|
|
<h3 class="widget-title"><i class="icons-pictures"></i><%= t(:picture) %></h3>
|
2012-04-01 15:39:49 +00:00
|
|
|
<div class="widget-content clear">
|
2012-04-24 04:41:28 +00:00
|
|
|
<div class="control-group">
|
|
|
|
<div class="upload-picture">
|
|
|
|
<!--請程式務必將圖片尺寸加入到行內裡-->
|
|
|
|
<%= image_tag @ad_image.file rescue ''%>
|
|
|
|
</div>
|
2012-05-18 02:50:53 +00:00
|
|
|
<% if !@ad_image.ad_banner.best_size.empty?%>
|
2012-09-12 11:12:50 +00:00
|
|
|
<span class="alert widgetInfo"><%= t("ad.widget_info_for_ad_image_size",:best_size=> @ad_image.ad_banner.best_size) %>
|
2012-05-18 02:50:53 +00:00
|
|
|
</span>
|
|
|
|
<% end -%>
|
2012-04-24 04:41:28 +00:00
|
|
|
<div class="controls file-upload input-prepend">
|
|
|
|
<label class="control-label add-on btn" for="input-upload">
|
2012-04-25 08:26:27 +00:00
|
|
|
<%= t(:browse) %>
|
2012-04-24 04:41:28 +00:00
|
|
|
<%= f.file_field :file,:id=>"input-upload",:class => "upload", :onchange=> "document.getElementById('fu1').innerHTML = this.form.fu1.value = this.value;" %>
|
|
|
|
</label>
|
|
|
|
<span id="fu1" class="file-name"></span>
|
|
|
|
<br>
|
|
|
|
<input name="fu1" class="input-medium" type="text">
|
2012-04-01 15:39:49 +00:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
2012-04-24 04:41:28 +00:00
|
|
|
</div>
|
2012-04-01 15:39:49 +00:00
|
|
|
|
|
|
|
<div id="widget-type" class="widget-box">
|
|
|
|
<div class="widget-action clear">
|
2012-11-27 03:15:15 +00:00
|
|
|
<a class="action"><i class="icon-exclamation-sign icon-white tip" data-original-title="<%= t('ad.select_fx') %>"></i></a>
|
2012-04-01 15:39:49 +00:00
|
|
|
</div>
|
2013-01-09 07:57:31 +00:00
|
|
|
<h3 class="widget-title"><i class="icons-target"></i><%= t(:type) %></h3>
|
2012-04-01 15:39:49 +00:00
|
|
|
<div class="widget-content clear">
|
|
|
|
<%= f.select :link_open ,AdImage::LINK_OPEN_TYPES%>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div id="widget-time" class="widget-box widget-size-300">
|
|
|
|
<div class="widget-action clear">
|
2012-11-27 03:15:15 +00:00
|
|
|
<a class="action"><i class="icon-exclamation-sign icon-white tip" data-original-title="<%= t('ad.set_range') %>"></i></a>
|
2012-04-01 15:39:49 +00:00
|
|
|
</div>
|
2012-11-28 16:26:36 +00:00
|
|
|
<h3 class="widget-title"><i class="icons-time"></i><%= t(:frequency) %></h3>
|
2012-04-01 15:39:49 +00:00
|
|
|
<div class="widget-content clear">
|
2012-11-27 03:15:15 +00:00
|
|
|
<%= f.text_field :weight ,:class=> 'span3',:placeholder=> t('ad.chinese_1') %>
|
2012-04-01 15:39:49 +00:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div id="widget-link" class="widget-box widget-size-300">
|
|
|
|
<div class="widget-action clear">
|
2012-11-27 03:15:15 +00:00
|
|
|
<a class="action"><i class="icon-exclamation-sign icon-white tip" data-original-title="<%= t('ad.add_link') %>"></i></a>
|
2012-04-01 15:39:49 +00:00
|
|
|
</div>
|
2013-01-09 07:57:31 +00:00
|
|
|
<h3 class="widget-title"><i class="icons-link"></i><%= t(:link) %></h3>
|
2012-04-01 15:39:49 +00:00
|
|
|
<div class="widget-content clear">
|
2012-11-27 03:15:15 +00:00
|
|
|
<%= f.text_field :out_link ,:class=> 'span3',:placeholder => t('ad.chinese_2') %>
|
2012-04-01 15:39:49 +00:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
</div>
|
|
|
|
<!--Wiget End-->
|
|
|
|
<!--Post Start-->
|
|
|
|
<div id="post-body">
|
|
|
|
<div id="post-body-content" class="clear">
|
|
|
|
<ul class="nav nav-tabs">
|
2012-05-06 16:53:52 +00:00
|
|
|
<% @site_valid_locales.each do |locale|%>
|
|
|
|
<%= content_tag :li,link_to(I18nVariable.from_locale(locale),"##{locale}",:data=>{:toggle => "tab"}),:class=> (active_when_current_locale_eq locale) %>
|
2012-04-01 15:39:49 +00:00
|
|
|
<% end %>
|
|
|
|
</ul>
|
|
|
|
<div class="tab-content">
|
2012-12-19 09:15:31 +00:00
|
|
|
<%= select_tag 'ad_banner[id]',options_from_collection_for_select(AdBanner.all, "id", "title",params[:ad_banner_id]) , :class=>"input-medium" %>
|
2012-05-06 16:53:52 +00:00
|
|
|
<% @site_valid_locales.each do |locale|%>
|
|
|
|
<%= content_tag :div,:class => "tab-pane #{active_when_current_locale_eq locale}",:id=>"#{locale}" do%>
|
2012-04-01 15:39:49 +00:00
|
|
|
<div class="title">
|
2012-07-25 21:58:09 +00:00
|
|
|
<%= f.fields_for :title_translations do |f| %>
|
2013-01-09 09:13:25 +00:00
|
|
|
<%= f.text_field locale, :class=>"ad_image-title post-title", :placeholder => t('ad.chinese_3'), :value => (@ad_image.title_translations[locale] rescue nil) %>
|
2012-04-01 15:39:49 +00:00
|
|
|
<% end %>
|
|
|
|
</div>
|
2012-04-19 03:50:54 +00:00
|
|
|
<br/>
|
2012-04-01 15:39:49 +00:00
|
|
|
<div class="context editor">
|
2012-07-25 21:58:09 +00:00
|
|
|
<%= 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) %>
|
2012-04-01 15:39:49 +00:00
|
|
|
<% end %>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<% end %>
|
|
|
|
<% end %>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
</div>
|
|
|
|
</div>
|
2012-04-19 03:50:54 +00:00
|
|
|
<div class="form-actions">
|
2012-11-27 03:15:15 +00:00
|
|
|
<%#= link_to t(:preview), admin_realtime_preview_ad_banner_path(@ad_image.ad_banner.title) ,:class=>"preview_trigger btn btn-success" rescue nil%>
|
2012-04-24 03:35:50 +00:00
|
|
|
<%= f.submit t("submit"),:class=>"btn btn-primary" %>
|
|
|
|
<%= f.submit t("cancel"),:class=>"btn ",:type => 'reset' %>
|
2012-04-19 03:50:54 +00:00
|
|
|
</div>
|
2012-04-01 15:39:49 +00:00
|
|
|
</div>
|
|
|
|
<!--Post End-->
|
|
|
|
</form>
|
2012-09-19 04:23:05 +00:00
|
|
|
</div>
|