spree_multi_slideshow 1.2.1 → 1.3.0
Sign up to get free protection for your applications and to get access to all the features.
- data/README.md +14 -12
- data/app/assets/images/store/bx_loader.gif +0 -0
- data/app/assets/images/store/controls.png +0 -0
- data/app/assets/javascripts/admin/slide_settings.js.erb +41 -0
- data/app/assets/javascripts/admin/slides/index.js.coffee +15 -0
- data/app/assets/javascripts/admin/slides/new.js.coffee +7 -0
- data/app/assets/javascripts/admin/spree_multi_slideshow.js +3 -1
- data/app/assets/javascripts/store/spree_multi_slideshow.js +1284 -1
- data/app/assets/stylesheets/store/spree_multi_slideshow.css +197 -3
- data/app/controllers/spree/admin/slide_settings_controller.rb +50 -0
- data/app/controllers/spree/admin/slides_controller.rb +15 -14
- data/app/controllers/spree/admin/slideshows_controller.rb +31 -0
- data/app/helpers/spree/slideshows_helper.rb +68 -0
- data/app/models/spree/app_configuration_decorator.rb +25 -0
- data/app/models/spree/product_decorator.rb +3 -0
- data/app/models/spree/slide.rb +23 -25
- data/app/models/spree/slideshow.rb +17 -0
- data/app/models/spree/taxon_decorator.rb +3 -0
- data/app/overrides/slideshow_admin_tab.rb +10 -0
- data/app/views/spree/admin/shared/_slideshow_sub_menu.html.erb +6 -0
- data/app/views/spree/admin/shared/_slideshow_tabs.html.erb +21 -0
- data/app/views/spree/admin/slide_settings/edit.html.erb +74 -0
- data/app/views/spree/admin/slides/_form.html.erb +29 -9
- data/app/views/spree/admin/slides/edit.html.erb +26 -16
- data/app/views/spree/admin/slides/index.html.erb +47 -31
- data/app/views/spree/admin/slides/new.html.erb +12 -9
- data/app/views/spree/admin/slideshows/_form.html.erb +59 -0
- data/app/views/spree/admin/slideshows/edit.html.erb +17 -0
- data/app/views/spree/admin/slideshows/index.html.erb +51 -0
- data/app/views/spree/admin/slideshows/new.html.erb +80 -0
- data/app/views/spree/admin/slideshows/new.js.erb +2 -0
- data/config/locales/en.yml +53 -85
- data/config/locales/it.yml +56 -90
- data/config/routes.rb +3 -1
- data/db/migrate/20120116081431_create_slideshows.rb +17 -0
- data/db/migrate/20120116083546_create_slides.rb +5 -4
- data/db/migrate/20120323164044_multi_slideshow_namespace.rb +1 -1
- data/lib/generators/spree_multi_slideshow/install/install_generator.rb +1 -21
- data/lib/spree_multi_slideshow.rb +0 -2
- metadata +26 -73
- data/app/assets/images/store/slides/bg-gallery.png +0 -0
- data/app/assets/images/store/slides/bg-text02.png +0 -0
- data/app/assets/images/store/slides/sprite01.png +0 -0
- data/app/assets/javascripts/admin/slides/index.js +0 -10
- data/app/assets/javascripts/admin/slides/new.js +0 -5
- data/app/assets/javascripts/store/fadeGallery.js +0 -229
- data/app/assets/stylesheets/admin/spree_multi_slideshow.css +0 -16
- data/app/assets/stylesheets/store/carousel_slideshow.css.scss +0 -73
- data/app/controllers/spree/admin/slideshow_types_controller.rb +0 -11
- data/app/controllers/spree/slides_controller.rb +0 -5
- data/app/controllers/spree/slideshow_types_controller.rb +0 -5
- data/app/helpers/spree/slides_helper.rb +0 -4
- data/app/helpers/spree/slideshow_types_helper.rb +0 -53
- data/app/models/spree/slideshow_type.rb +0 -18
- data/app/overrides/slideshow_type_admin_tab.rb +0 -4
- data/app/views/spree/admin/shared/_slideshow_type_tabs.html.erb +0 -16
- data/app/views/spree/admin/slideshow_types/_form.html.erb +0 -8
- data/app/views/spree/admin/slideshow_types/edit.html.erb +0 -8
- data/app/views/spree/admin/slideshow_types/index.html.erb +0 -32
- data/app/views/spree/admin/slideshow_types/new.html.erb +0 -7
- data/db/migrate/20120116081431_create_slideshow_types.rb +0 -15
@@ -0,0 +1,17 @@
|
|
1
|
+
module Spree
|
2
|
+
class Slideshow < ActiveRecord::Base
|
3
|
+
has_many :slides
|
4
|
+
|
5
|
+
attr_accessible :category, :enable_navigation, :enable_pagination, :enabled, :mode, :auto_start, :infinite_loop,
|
6
|
+
:hide_control_on_end
|
7
|
+
|
8
|
+
validates :category, :presence => true
|
9
|
+
validates_uniqueness_of :category
|
10
|
+
|
11
|
+
scope :enable, lambda { |category| {:conditions => {:enabled => true, :category => category}} }
|
12
|
+
|
13
|
+
def mode_enum
|
14
|
+
[[I18n.t(:horizontal), "horizontal"], [I18n.t(:fade), "fade"], [I18n.t(:vertical), "vertical"]]
|
15
|
+
end
|
16
|
+
end
|
17
|
+
end
|
@@ -0,0 +1,10 @@
|
|
1
|
+
Deface::Override.new(:virtual_path => "spree/layouts/admin",
|
2
|
+
:name => "slideshow_admin_tab",
|
3
|
+
:insert_bottom => "[data-hook='admin_tabs']",
|
4
|
+
:text => "<%= tab(:slideshows, :icon => 'icon-picture') %>")
|
5
|
+
|
6
|
+
Deface::Override.new(:virtual_path => "spree/admin/shared/_configuration_menu",
|
7
|
+
:name => "add_slide_settings",
|
8
|
+
:insert_bottom => "[data-hook='admin_configurations_sidebar_menu'], #admin_configurations_sidebar_menu[data-hook]",
|
9
|
+
:text => "<%= configurations_sidebar_menu_item t(:slide_settings), edit_admin_slide_settings_path %>")
|
10
|
+
|
@@ -0,0 +1,21 @@
|
|
1
|
+
<% content_for :page_title do %>
|
2
|
+
<%= t(:editing_slideshow) %> “<%= @slideshow.category %>”
|
3
|
+
<% end %>
|
4
|
+
|
5
|
+
<% content_for :sidebar_title do %>
|
6
|
+
<span class="category"><%= @slideshow.category %></span>
|
7
|
+
<% end %>
|
8
|
+
|
9
|
+
<% content_for :sidebar do %>
|
10
|
+
<nav class="menu">
|
11
|
+
<ul data-hook="admin_slideshow_tabs">
|
12
|
+
<li<%== ' class="active"' if current == 'Slideshow Details' %>>
|
13
|
+
<%= link_to_with_icon 'icon-edit', t(:slideshow_details), edit_admin_slideshow_url(@slideshow) %>
|
14
|
+
</li>
|
15
|
+
<li<%== ' class="active"' if current == 'Slides' %>>
|
16
|
+
<%= link_to_with_icon 'icon-picture', t(:slides), admin_slideshow_slides_url(@slideshow) %>
|
17
|
+
</li>
|
18
|
+
</ul>
|
19
|
+
</nav>
|
20
|
+
|
21
|
+
<% end %>
|
@@ -0,0 +1,74 @@
|
|
1
|
+
<%= render :partial => 'spree/admin/shared/configuration_menu' %>
|
2
|
+
|
3
|
+
<% content_for :page_title do %>
|
4
|
+
<%= t(:slide_settings) %>
|
5
|
+
<% end %>
|
6
|
+
|
7
|
+
<%= render :partial => 'spree/admin/shared/slideshow_sub_menu' %>
|
8
|
+
|
9
|
+
<%= form_tag admin_slide_settings_path, :method => :put do %>
|
10
|
+
|
11
|
+
<fieldset class="no-border-top">
|
12
|
+
<fieldset class="no-border-bottom">
|
13
|
+
<legend align="center"><%= t(:general_settings)%></legend>
|
14
|
+
|
15
|
+
<div class="field">
|
16
|
+
<div class="warning note"><%= t(:slide_settings_warning) %></div>
|
17
|
+
</div>
|
18
|
+
|
19
|
+
<div data-hook="slide_path" class="field">
|
20
|
+
<%= label_tag 'preferences[slide_path]', t(:slide_path) %>
|
21
|
+
<%= preference_field_tag 'preferences[slide_path]', Spree::Config[:slide_path], :type => :string %>
|
22
|
+
</div>
|
23
|
+
|
24
|
+
<div class="alpha eight columns">
|
25
|
+
<div data-hook="slide_default_url" class="field">
|
26
|
+
<%= label_tag 'preferences[slide_default_url]', t(:slide_default_url) %>
|
27
|
+
<%= preference_field_tag 'preferences[slide_default_url]', Spree::Config[:slide_default_url], :type => :string %>
|
28
|
+
</div>
|
29
|
+
</div>
|
30
|
+
|
31
|
+
<div class="alpha eight columns">
|
32
|
+
<div data-hook="slide_url" class="field">
|
33
|
+
<%= label_tag 'preferences[slide_url]', t(:slide_url) %>
|
34
|
+
<%= preference_field_tag 'preferences[slide_url]', Spree::Config[:slide_url], :type => :string %>
|
35
|
+
</div>
|
36
|
+
</div>
|
37
|
+
|
38
|
+
<div class="omega four columns">
|
39
|
+
<div data-hook="slide_default_style" class="field">
|
40
|
+
<%= label_tag 'preferences[slide_default_style]', t(:slide_default_style) %>
|
41
|
+
<%= collection_select 'preferences', 'slide_default_style', @styles, :first, :first, {:selected => Spree::Config[:slide_default_style] }, :class => 'select2 fullwidth' %>
|
42
|
+
</div>
|
43
|
+
</div>
|
44
|
+
|
45
|
+
<div class="clear"></div>
|
46
|
+
|
47
|
+
</fieldset>
|
48
|
+
|
49
|
+
<fieldset class="no-border-bottom" id="slide_styles" data-hook="attachment_styles">
|
50
|
+
<legend align="center"><%= t(:slide_styles) %></legend>
|
51
|
+
|
52
|
+
<div id="styles_list" class="row frameless">
|
53
|
+
<% @styles.each_with_index do |(style_name, style_value), index| %>
|
54
|
+
<div class="field three columns">
|
55
|
+
<%= label_tag "slide_styles[#{style_name}]", style_name %>
|
56
|
+
<a href='#' alt="<%= t(:destroy)%>" title="<%= t(:destroy)%>" class='destroy_style with-tip'><i class='icon-trash'></i></a>
|
57
|
+
<%= text_field_tag "slide_styles[#{style_name}]", style_value, :class => 'fullwidth' %>
|
58
|
+
</div>
|
59
|
+
<% end %>
|
60
|
+
</div>
|
61
|
+
|
62
|
+
<div id="new-slide-styles" class="row frameless"></div>
|
63
|
+
|
64
|
+
<div class="field">
|
65
|
+
<%= link_to_with_icon 'icon-plus', t(:add_new_slide_style), '#', :class => 'add_new_slide_style button' %>
|
66
|
+
</div>
|
67
|
+
</fieldset>
|
68
|
+
|
69
|
+
<div class="form-buttons filter-actions actions" data-hook="buttons">
|
70
|
+
<%= button t(:update), 'icon-refresh' %>
|
71
|
+
</div>
|
72
|
+
</fieldset>
|
73
|
+
|
74
|
+
<% end %>
|
@@ -1,9 +1,29 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
1
|
+
<div data-hook="admin_slide_form_fields">
|
2
|
+
<div class="eight columns alpha">
|
3
|
+
<div data-hook="file" class="field">
|
4
|
+
<%= f.label t(:filename) %><br>
|
5
|
+
<%= f.file_field :attachment %>
|
6
|
+
</div>
|
7
|
+
<div data-hook="enabled" class="field">
|
8
|
+
<label>
|
9
|
+
<%= f.check_box :enabled %>
|
10
|
+
<%= t(:enabled) %>
|
11
|
+
</label>
|
12
|
+
</div>
|
13
|
+
</div>
|
14
|
+
<div class="omega eight columns">
|
15
|
+
<div data-hook="title" class="field">
|
16
|
+
<%= f.label t(:title) %><br>
|
17
|
+
<%= f.text_field :title, :class => 'fullwidth' %>
|
18
|
+
</div>
|
19
|
+
<div data-hook="url" class="field">
|
20
|
+
<%= f.label t(:url) %><br>
|
21
|
+
<%= f.text_field :url, :class => 'fullwidth' %>
|
22
|
+
</div>
|
23
|
+
<div data-hook="presentation" class="field">
|
24
|
+
<%= f.label t(:presentation) %><br>
|
25
|
+
<%= f.text_area :presentation, :rows => 4, :class => 'fullwidth' %>
|
26
|
+
</div>
|
27
|
+
</div>
|
28
|
+
</div>
|
29
|
+
<div class="clear"></div>
|
@@ -1,17 +1,27 @@
|
|
1
|
-
<%= render :partial => 'spree/admin/shared/
|
2
|
-
|
3
|
-
<%= render 'spree/shared/error_messages', :target => @slide %>
|
1
|
+
<%= render :partial => 'spree/admin/shared/slideshow_sub_menu' %>
|
2
|
+
<%= render :partial => 'spree/admin/shared/slideshow_tabs', :locals => { :current => 'Slides' } %>
|
4
3
|
|
5
|
-
<%=
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
4
|
+
<%= render :partial => 'spree/shared/error_messages', :locals => { :target => @slide } %>
|
5
|
+
|
6
|
+
<% content_for :page_actions do %>
|
7
|
+
<li><%= button_link_to t(:back_to_slides_list), admin_slideshow_slides_url(@slideshow), :icon => 'icon-arrow-left' %></li>
|
8
|
+
<% end %>
|
9
|
+
|
10
|
+
<%= form_for [:admin, @slideshow, @slide], :html => { :multipart => true } do |f| %>
|
11
|
+
<fieldset data-hook="edit_image">
|
12
|
+
<legend align="center"><%= @slide.attachment_file_name%></legend>
|
13
|
+
<div data-hook="thumbnail" class="field alpha three columns align-center">
|
14
|
+
<%= f.label t(:thumbnail) %><br>
|
15
|
+
<%= link_to image_tag(@slide.attachment.url(:mini)), @slide.attachment.url(:large) %>
|
16
|
+
</div>
|
17
|
+
<div class="nine columns omega">
|
18
|
+
<%= render :partial => 'form', :locals => { :f => f } %>
|
19
|
+
</div>
|
20
|
+
<div class="clear"></div>
|
21
|
+
<div class="form-buttons filter-actions actions" data-hook="buttons">
|
22
|
+
<%= button t(:update), 'icon-refresh' %>
|
23
|
+
<span class="or"><%= t(:or) %></span>
|
24
|
+
<%= link_to t(:cancel), admin_slideshow_slides_url(@slideshow), :id => 'cancel_link', :class => 'button icon-remove' %>
|
25
|
+
</div>
|
26
|
+
</fieldset>
|
27
|
+
<% end %>
|
@@ -1,35 +1,51 @@
|
|
1
|
-
<%= render :partial => 'spree/admin/shared/
|
1
|
+
<%= render :partial => 'spree/admin/shared/slideshow_sub_menu' %>
|
2
|
+
<%= render :partial => 'spree/admin/shared/slideshow_tabs', :locals => {:current => 'Slides'} %>
|
2
3
|
|
3
|
-
|
4
|
-
<
|
5
|
-
|
6
|
-
<%= link_to icon('add') + ' ' + t("slideshow_type.slide.new_page"), new_admin_slideshow_type_slide_url(@slideshow_type), :id => 'new_slide_link' %>
|
7
|
-
</p>
|
4
|
+
<% content_for :page_actions do %>
|
5
|
+
<li><%= link_to_with_icon('icon-plus', t(:new_slide), new_admin_slideshow_slide_url(@slideshow), :id => 'new_slide_link', :class => 'button') %></li>
|
6
|
+
<% end %>
|
8
7
|
|
9
|
-
<
|
10
|
-
<tr data-hook="images_header">
|
11
|
-
<th><%= t("slideshow_type.slide.thumbnail") %></th>
|
12
|
-
<th><%= t("slideshow_type.slide.title") %></th>
|
13
|
-
<th><%= t("slideshow_type.slide.position") %></th>
|
14
|
-
<th><%= t("slideshow_type.slide.url") %></th>
|
15
|
-
<th><%= t(:action) %></th>
|
16
|
-
</tr>
|
8
|
+
<div id="slides" data-hook></div>
|
17
9
|
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
10
|
+
<% unless @slideshow.slides.any? %>
|
11
|
+
<div class="no-objects-found">
|
12
|
+
<%= t(:no_slides_found) %>.
|
13
|
+
</div>
|
14
|
+
<% else %>
|
15
|
+
<table class="index sortable" data-hook="slides_table" data-sortable-link="<%= update_positions_admin_slideshow_slides_url(@slideshow) %>">
|
16
|
+
<colgroup>
|
17
|
+
<col style="width: 5%">
|
18
|
+
<col style="width: 10%">
|
19
|
+
<col style="width: 25%">
|
20
|
+
<col style="width: 45%">
|
21
|
+
<col style="width: 15%">
|
22
|
+
</colgroup>
|
23
|
+
<thead>
|
24
|
+
<tr data-hook="slides_header">
|
25
|
+
<th colspan="2"><%= t(:thumbnail) %></th>
|
26
|
+
<th><%= t(:alt_text) %></th>
|
27
|
+
<th><%= t(:enabled) %></th>
|
28
|
+
<th class="actions"></th>
|
29
|
+
</tr>
|
30
|
+
</thead>
|
34
31
|
|
35
|
-
|
32
|
+
<tbody>
|
33
|
+
<% (@slideshow.slides).each do |slide| %>
|
34
|
+
<tr id="<%= spree_dom_id slide %>" data-hook="slides_row" class="<%= cycle('odd', 'even')%>">
|
35
|
+
<td class="no-border">
|
36
|
+
<span class="handle"></span>
|
37
|
+
</td>
|
38
|
+
<td>
|
39
|
+
<%= link_to image_tag(slide.attachment.url(:mini)), slide.attachment.url(:large) %>
|
40
|
+
</td>
|
41
|
+
<td><%= slide.presentation %></td>
|
42
|
+
<td align="center"><%= icon('icon-check icon-large') if slide.enabled %></td>
|
43
|
+
<td class="actions">
|
44
|
+
<%= link_to_with_icon 'icon-edit', t(:edit), edit_admin_slideshow_slide_url(@slideshow, slide), :no_text => true, :data => {:action => 'edit'} %>
|
45
|
+
<%= link_to_delete slide, { :url => admin_slideshow_slide_url(@slideshow, slide), :no_text => true } %>
|
46
|
+
</td>
|
47
|
+
</tr>
|
48
|
+
<% end %>
|
49
|
+
</tbody>
|
50
|
+
</table>
|
51
|
+
<% end %>
|
@@ -1,12 +1,15 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
1
|
+
<%= form_for [:admin, @slideshow, @slide], :html => { :multipart => true } do |f| %>
|
2
|
+
<fieldset data-hook="new_image">
|
3
|
+
<legend align="center"><%= t(:new_slide) %></legend>
|
4
|
+
|
5
|
+
<%= render :partial => 'form', :locals => { :f => f } %>
|
6
|
+
|
7
|
+
<div class="form-buttons filter-actions actions" data-hook="buttons">
|
8
|
+
<%= button t(:update), 'icon-refresh' %>
|
9
|
+
<span class="or"><%= t(:or) %></span>
|
10
|
+
<%= link_to_with_icon 'icon-remove', t(:cancel), admin_slideshow_slides_url(@slideshow), :id => 'cancel_link', :class => 'button' %>
|
11
|
+
</div>
|
12
|
+
</fieldset>
|
10
13
|
<% end %>
|
11
14
|
|
12
15
|
<%= javascript_include_tag 'admin/slides/new.js' %>
|
@@ -0,0 +1,59 @@
|
|
1
|
+
<div data-hook="admin_slideshow_form_fields">
|
2
|
+
<div class="left eight columns alpha" data-hook="admin_slideshow_form_left">
|
3
|
+
<%= f.field_container :category do %>
|
4
|
+
<%= f.label :category, t(:category) %> <span class="required">*</span><br />
|
5
|
+
<%= f.text_field :category, :class => 'fullwidth title' %>
|
6
|
+
<%= f.error_message_on :category %>
|
7
|
+
<% end %>
|
8
|
+
|
9
|
+
<%= f.field_container :enable_navigation do %>
|
10
|
+
<%= f.label :enable_navigation, t(:enable_navigation) %><br />
|
11
|
+
<%= f.check_box :enable_navigation %>
|
12
|
+
<%= f.error_message_on :enable_navigation %>
|
13
|
+
<% end %>
|
14
|
+
|
15
|
+
<%= f.field_container :enable_pagination do %>
|
16
|
+
<%= f.label :enable_pagination, t(:enable_pagination) %><br />
|
17
|
+
<%= f.check_box :enable_pagination %>
|
18
|
+
<%= f.error_message_on :enable_pagination %>
|
19
|
+
<% end %>
|
20
|
+
|
21
|
+
<%= f.field_container :enabled do %>
|
22
|
+
<%= f.label :enabled, t(:enabled) %><br />
|
23
|
+
<%= f.check_box :enabled %>
|
24
|
+
<%= f.error_message_on :enabled %>
|
25
|
+
<% end %>
|
26
|
+
</div>
|
27
|
+
<div class="right four columns omega" data-hook="admin_slideshow_form_right">
|
28
|
+
<%= f.field_container :mode do %>
|
29
|
+
<%= f.label :mode, t(:mode) %><br />
|
30
|
+
<%= f.select(:mode, @slideshow.mode_enum, { :include_blank => false }, { :class => 'select2' }) %>
|
31
|
+
<%= f.error_message_on :mode %>
|
32
|
+
<% end %>
|
33
|
+
|
34
|
+
<%= f.field_container :auto_start do %>
|
35
|
+
<%= f.label :auto_start, t(:auto_start) %><br />
|
36
|
+
<%= f.check_box :auto_start %>
|
37
|
+
<%= f.error_message_on :auto_start %>
|
38
|
+
<% end %>
|
39
|
+
|
40
|
+
<%= f.field_container :infinite_loop do %>
|
41
|
+
<%= f.label :infinite_loop, t(:infinite_loop) %><br />
|
42
|
+
<%= f.check_box :infinite_loop %>
|
43
|
+
<%= f.error_message_on :infinite_loop %>
|
44
|
+
<% end %>
|
45
|
+
|
46
|
+
<%= f.field_container :hide_control_on_end do %>
|
47
|
+
<%= f.label :hide_control_on_end, t(:hide_control_on_end) %><br />
|
48
|
+
<%= f.check_box :hide_control_on_end %>
|
49
|
+
<%= f.error_message_on :hide_control_on_end %>
|
50
|
+
<% end %>
|
51
|
+
</div>
|
52
|
+
|
53
|
+
<div class="clear"></div>
|
54
|
+
|
55
|
+
<div data-hook="admin_slideshow_form_additional_fields"></div>
|
56
|
+
|
57
|
+
<div class="clear"></div>
|
58
|
+
|
59
|
+
</div>
|
@@ -0,0 +1,17 @@
|
|
1
|
+
<% content_for :page_actions do %>
|
2
|
+
<li><%= button_link_to t(:back_to_slideshows_list), admin_slideshows_url, :icon => 'icon-arrow-left' %></li>
|
3
|
+
<li id="new_slideshow_link">
|
4
|
+
<%= button_link_to t(:new_slideshow), new_object_url, { :remote => true, :icon => 'icon-plus', :id => 'admin_new_slideshow' } %>
|
5
|
+
</li>
|
6
|
+
<% end %>
|
7
|
+
|
8
|
+
<%= render :partial => 'spree/admin/shared/slideshow_sub_menu' %>
|
9
|
+
<%= render :partial => 'spree/admin/shared/slideshow_tabs', :locals => { :current => 'Slideshow Details' } %>
|
10
|
+
<%= render :partial => 'spree/shared/error_messages', :locals => { :target => @slideshow } %>
|
11
|
+
|
12
|
+
<%= form_for [:admin, @slideshow], :method => :put, :html => { :multipart => true } do |f| %>
|
13
|
+
<fieldset class="no-border-top">
|
14
|
+
<%= render :partial => 'form', :locals => { :f => f } %>
|
15
|
+
<%= render :partial => 'spree/admin/shared/edit_resource_links' %>
|
16
|
+
</fieldset>
|
17
|
+
<% end %>
|
@@ -0,0 +1,51 @@
|
|
1
|
+
<% content_for :page_title do %>
|
2
|
+
<%= t(:listing_slideshows) %>
|
3
|
+
<% end %>
|
4
|
+
|
5
|
+
<% content_for :page_actions do %>
|
6
|
+
<div class="toolbar" data-hook="toolbar">
|
7
|
+
<ul class="actions header-action-links inline-menu">
|
8
|
+
<li id="new_slideshow_link">
|
9
|
+
<%= button_link_to t(:new_slideshow), new_object_url, { :remote => true, :icon => 'icon-plus', :id => 'admin_new_slideshow' } %>
|
10
|
+
</li>
|
11
|
+
</ul>
|
12
|
+
</div>
|
13
|
+
<% end %>
|
14
|
+
|
15
|
+
<%= render :partial => 'spree/admin/shared/slideshow_sub_menu' %>
|
16
|
+
|
17
|
+
<div id="new_slideshow" data-hook></div>
|
18
|
+
|
19
|
+
<% if @collection.any? %>
|
20
|
+
<table class="index" id="listing_slideshows">
|
21
|
+
<colgroup>
|
22
|
+
<col style="width: 55%;">
|
23
|
+
<col style="width: 10%;">
|
24
|
+
<col style="width: 17%;">
|
25
|
+
</colgroup>
|
26
|
+
<thead>
|
27
|
+
<tr data-hook="admin_slideshows_index_headers">
|
28
|
+
<th><%= t(:category) %></th>
|
29
|
+
<th><%= t(:enabled) %></th>
|
30
|
+
<th data-hook="admin_slideshows_index_header_actions" class="actions"></th>
|
31
|
+
</tr>
|
32
|
+
</thead>
|
33
|
+
<tbody>
|
34
|
+
<% @slideshows.each do |slideshow| %>
|
35
|
+
<tr id="<%= spree_dom_id slideshow %>" data-hook="admin_slideshows_index_rows" class="<%= cycle('odd', 'even') %>">
|
36
|
+
<td><%= slideshow.category %> (<%= slideshow.slides.count %> <%= t(:slides) %>)</td>
|
37
|
+
<td align="center"><%= icon('icon-check icon-large') if slideshow.enabled %></td>
|
38
|
+
<td class="actions" data-hook="admin_slideshows_index_row_actions">
|
39
|
+
<%= link_to_edit slideshow, :no_text => true, :class => 'edit' %>
|
40
|
+
|
41
|
+
<%= link_to_delete slideshow, :no_text => true %>
|
42
|
+
</td>
|
43
|
+
</tr>
|
44
|
+
<% end %>
|
45
|
+
</tbody>
|
46
|
+
</table>
|
47
|
+
<% else %>
|
48
|
+
<div class="no-objects-found">
|
49
|
+
<%= t(:no_results) %>
|
50
|
+
</div>
|
51
|
+
<% end %>
|