Orbit/app/views/admin/ad_banners/_index.html.erb

75 lines
2.8 KiB
Plaintext
Raw Normal View History

2013-10-18 07:25:19 +00:00
<% set_default_index do
objects @ad_banners
quick_edit_link type: 'edit',
class: 'open-slide',
data: "{form: {"
.concat("width: object.width")
.concat(", height: object.height")
.concat(", ad_fx: object.ad_fx")
.concat(", name: object.title")
.concat(", timeout: object.timeout")
.concat(", speed: object.speed")
.concat("}.to_json")
.concat(", title: t('ad_banner.edit_banner')")
.concat(", id: object.id.to_s")
.concat(", fx: object.ad_fx")
.concat("}")
# '{"#first":{"equal":"Yes"}}'
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',
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'
footer link: '',
2013-10-18 07:25:19 +00:00
link_class: 'btn btn-primary open-slide',
link_data: {title: t('ad_banner.new_banner'), id: 'new', fx: 'fade'}
2013-10-18 07:25:19 +00:00
end %>
2013-10-18 07:25:19 +00:00
<%= render 'admin/default_index/index' %>
2013-10-18 07:25:19 +00:00
<% content_for :page_specific_javascript do %>
<%= javascript_include_tag "cycle2" %>
2013-10-18 07:25:19 +00:00
<%= javascript_include_tag "lib/ad_banner/banner_preview" %>
<% 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">
<%= 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>
</div>