2013-10-18 07:25:19 +00:00
|
|
|
|
<% set_default_index do
|
|
|
|
|
objects @ad_banners
|
|
|
|
|
quick_edit_link type: 'edit',
|
|
|
|
|
class: 'open-slide',
|
2013-10-18 10:31:18 +00:00
|
|
|
|
data: "{"
|
|
|
|
|
.concat("title: t('ad_banner.edit_banner')")
|
|
|
|
|
.concat(", w: object.width")
|
|
|
|
|
.concat(", h: object.height")
|
|
|
|
|
.concat(", fx: object.ad_fx")
|
|
|
|
|
.concat(", id: object.id.to_s")
|
|
|
|
|
.concat(", name: object.title")
|
|
|
|
|
.concat(", time: object.timeout")
|
|
|
|
|
.concat(", speed: object.speed")
|
|
|
|
|
.concat("}")
|
2013-10-18 07:25:19 +00:00
|
|
|
|
quick_edit_link type: 'detail'
|
|
|
|
|
quick_edit_link type: 'delete',
|
|
|
|
|
link: 'admin_ad_banner_path'
|
|
|
|
|
# can have: title, warning, cancel and submit values
|
|
|
|
|
field db_field: 'title',
|
|
|
|
|
translation: 'ad_banner.banner_name',
|
|
|
|
|
sort: 'title',
|
|
|
|
|
quick_edit: true,
|
|
|
|
|
header_class: 'span4',
|
|
|
|
|
sort: 'title'
|
|
|
|
|
field db_field: 'ad_fx',
|
|
|
|
|
translation: 'ad_banner.effect',
|
|
|
|
|
hide: 'phone',
|
|
|
|
|
sort: 'effect'
|
|
|
|
|
field db_field: 'timeout',
|
|
|
|
|
translation: 'ad_banner.transition_interval',
|
|
|
|
|
hide: 'phone',
|
|
|
|
|
sort: 'timeout'
|
|
|
|
|
field db_field: 'speed',
|
|
|
|
|
translation: 'ad_banner.transition_speed',
|
|
|
|
|
hide: 'phone',
|
|
|
|
|
sort: 'speed'
|
|
|
|
|
field db_field: 'size',
|
|
|
|
|
translation: 'ad_banner.size',
|
|
|
|
|
hide: 'phone',
|
|
|
|
|
sort: 'size'
|
|
|
|
|
field type: 'standalone',
|
|
|
|
|
translation: 'preview',
|
2013-10-18 10:31:18 +00:00
|
|
|
|
display_option: "link_to(t(:preview), '#', data: {w: object.width, h: object.height, fx: object.ad_fx, time: object.timeout_millisecond, speed: object.speed, name: object.title}, class: 'btn btn-success open-modal')",
|
2013-10-18 07:25:19 +00:00
|
|
|
|
need_value: true,
|
|
|
|
|
hide: 'phone'
|
2013-10-18 10:31:18 +00:00
|
|
|
|
footer link: '',
|
2013-10-18 07:25:19 +00:00
|
|
|
|
link_class: 'btn btn-primary open-slide',
|
2013-10-18 10:31:18 +00:00
|
|
|
|
link_data: {title: t('ad_banner.new_banner'), id: 'new', fx: 'fade'}
|
2013-10-18 07:25:19 +00:00
|
|
|
|
end %>
|
2013-10-15 11:33:31 +00:00
|
|
|
|
|
2013-10-18 07:25:19 +00:00
|
|
|
|
<%= render 'admin/default_index/index' %>
|
2013-08-09 01:24:26 +00:00
|
|
|
|
|
2013-10-18 07:25:19 +00:00
|
|
|
|
<% content_for :page_specific_javascript do %>
|
2013-10-18 10:31:18 +00:00
|
|
|
|
<%= javascript_include_tag "cycle2" %>
|
2013-10-18 07:25:19 +00:00
|
|
|
|
<%= javascript_include_tag "lib/ad_banner/banner_preview" %>
|
2013-08-09 01:24:26 +00:00
|
|
|
|
<% end %>
|
2013-10-18 07:25:19 +00:00
|
|
|
|
|
|
|
|
|
<div id="preview" class="modal hide fade" tabindex="-1" role="dialog" aria-labelledby="ModalLabel" aria-hidden="true">
|
|
|
|
|
<div class="modal-header">
|
|
|
|
|
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
|
|
|
|
|
<h3 id="ModalLabel"><%= t(:preview) %></h3>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="modal-body">
|
|
|
|
|
<div class="preview">
|
2013-10-18 10:31:18 +00:00
|
|
|
|
<%= image_tag "slideshow_preview_A.png", class: 'hide' %>
|
|
|
|
|
<%= image_tag "slideshow_preview_B.png", class: 'hide' %>
|
2013-10-18 07:25:19 +00:00
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="modal-footer">
|
|
|
|
|
</div>
|
2013-10-18 10:31:18 +00:00
|
|
|
|
</div>
|