orbit-basic/app/views/admin/ad_banners/_index.html.erb

64 lines
2.2 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',
link: 'edit_admin_ad_banner_path',
class: 'open-slide',
data: {title: t('ad_banner.edit_banner')}
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_in_min, speed: object.speed}, class: 'btn btn-success open-modal')",
need_value: true,
hide: 'phone'
footer link: 'new_admin_ad_banner_path',
link_class: 'btn btn-primary open-slide',
link_data: {title: t('ad_banner.new_banner')}
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 "lib/jquery.cycle.all.js" %>
<%= 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" %>
<%= image_tag "slideshow_preview_B.png" %>
</div>
</div>
<div class="modal-footer">
</div>
</div>