Files
danbooru/app/views/advertisements/index.html.erb
albert f051e04550 sync
2010-10-08 18:42:26 -04:00

46 lines
1.3 KiB
Plaintext

<h4>Advertisements</h4>
<div style="margin-bottom: 1em;">
<% form_tag(advertisements_path, :method => :get) do %>
<table width="100%">
<tfoot>
<tr>
<th></th>
<td><%= submit_tag "Search" %></td>
</tr>
</tfoot>
<tbody>
<tr>
<th width="15%"><label>Start Date</label></th>
<td width="85%"><%= text_field_tag "start_date", @start_date %></td>
</tr>
<tr>
<th width="15%"><label>End Date</label></th>
<td width="85%"><%= text_field_tag "end_date", @end_date %></td>
</tr>
</tbody>
</table>
<% end %>
</div>
<table width="100%" class="highlightable">
<thead>
<tr>
<th width="5%"></th>
<th width="5%" style="text-align: right;">Hits</th>
<th width="90%"></th>
</tr>
</thead>
<tbody>
<% @advertisements.each do |advertisement| %>
<tr>
<td><%= image_tag(advertisement.image_url, :width => advertisement.preview_width, :height => advertisement.preview_height) %></td>
<td style="text-align: right;"><%= advertisement.hits.between(@start_date, @end_date).count %></td>
<td><%= link_to "Edit", edit_advertisement_path(advertisement) %></td>
</tr>
<% end %>
</tbody>
</table>
<%= render :partial => "secondary_nav_links" %>