63 lines
1.9 KiB
Plaintext
63 lines
1.9 KiB
Plaintext
<% content_for :page_specific_css do %>
|
|
<style type="text/css">
|
|
.banner-image{
|
|
height: 140px;
|
|
background-repeat: no-repeat;
|
|
}
|
|
</style>
|
|
<% end %>
|
|
<h3><%= @banner.title %></h3>
|
|
<table class="table main-list">
|
|
<thead>
|
|
<tr class="sort-header">
|
|
<% @table_fields.each do |f| %>
|
|
<%= thead(f) %>
|
|
<% end %>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
<% @images.each do |image| %>
|
|
<tr>
|
|
<td>
|
|
<%= image_tag image.file.thumb, :class => "banner-image" %>
|
|
</td>
|
|
<td>
|
|
<%= image.title rescue "" %>
|
|
<% if can_edit_or_delete?(@banner) %>
|
|
<div class="quick-edit">
|
|
<ul class="nav nav-pills">
|
|
<li><a href="<%= edit_admin_ad_image_path(image.id, :page => params[:page]) %>"><%= t(:edit) %></a></li>
|
|
<li><a href="<%= admin_ad_image_path(image.id, :page => params[:page]) %>" class="delete text-error" data-method="delete" data-confirm="Are you sure?" ><%= t(:delete_) %></a></li>
|
|
</ul>
|
|
</div>
|
|
<% end %>
|
|
</td>
|
|
<td class="span3">
|
|
<% if !image.postdate.nil? %>
|
|
<%= image.postdate.strftime("%Y-%m-%d %H:%M") rescue "" %>
|
|
<% if !image.deadline.nil? %>
|
|
~ <%= image.deadline.strftime("%Y-%m-%d %H:%M") rescue "" %>
|
|
<% if image.expired? %>
|
|
<span class="label"><%= t("ad_banner.expired") %></span>
|
|
<% end %>
|
|
<% end %>
|
|
<% end %>
|
|
</td>
|
|
<td>
|
|
<%= image.out_link rescue "" %>
|
|
</td>
|
|
</tr>
|
|
<% end %>
|
|
</tbody>
|
|
</table>
|
|
|
|
<% if can_edit_or_delete?(@banner) %>
|
|
<div class="bottomnav clearfix" style="left: 81px;">
|
|
<div class="action pull-right">
|
|
<a class="btn btn-primary" href="<%= new_admin_ad_image_path(:page => params[:page], :banner_id => @banner.id) %>">
|
|
<%= t("ad_banner.add") %>
|
|
</a>
|
|
</div>
|
|
<%= content_tag :div, paginate(@images), class: "pagination pagination-centered" %>
|
|
</div>
|
|
<% end %> |