-
Notifications
You must be signed in to change notification settings - Fork 10
/
index.html.erb
35 lines (31 loc) · 1.41 KB
/
index.html.erb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
<%= render :partial => 'spree/admin/shared/slideshow_type_tabs', :locals => {:current => 'Slide Image'} %>
<%= javascript_include_tag 'admin/slides/index.js' %>
<div id="slides" data-hook></div>
<p data-hook="links">
<%= link_to icon('add') + ' ' + t("slideshow_type.slide.new_page"), new_admin_slideshow_type_slide_url(@slideshow_type), :id => 'new_slide_link' %>
</p>
<table class="index sortable" data-hook="slide_table" data-hook data-sortable-link="<%= update_positions_admin_slideshow_type_slides_url %>">
<tr data-hook="images_header">
<th><%= t("slideshow_type.slide.thumbnail") %></th>
<th><%= t("slideshow_type.slide.title") %></th>
<th><%= t("slideshow_type.slide.position") %></th>
<th><%= t("slideshow_type.slide.url") %></th>
<th><%= t(:action) %></th>
</tr>
<% Spree::Slide.find_all_by_slideshow_type_id(@slideshow_type.id).each do |slide| %>
<tr id="<%= dom_id(slide) %>" data-hook="images_row">
<td>
<span class="handle"></span>
<%= link_to image_tag(slide.image.url(:thumbnail)), slide.image.url(:medium) %>
</td>
<td><%= slide.title %></td>
<td><%= slide.position + 1 %></td>
<td><%= slide.url %></td>
<td class="actions">
<%= link_to_with_icon 'edit', t(:edit), edit_admin_slideshow_type_slide_url(@slideshow_type, slide), :class => 'edit' %>
<%= link_to_delete slide, {:url => admin_slideshow_type_slide_url(@slideshow_type, slide) }%>
</td>
</tr>
<% end %>
</table>