spree_active_sale 1.3.2 → 2.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/README.md +6 -7
- data/app/views/spree/admin/active_sale_events/_form.html.erb +1 -1
- data/app/views/spree/admin/active_sales/index.html.erb +4 -4
- data/app/views/spree/admin/sale_images/_form.html.erb +2 -2
- data/app/views/spree/admin/sale_images/edit.html.erb +4 -4
- data/app/views/spree/admin/sale_images/new.html.erb +4 -4
- data/app/views/spree/admin/shared/_js_head.html.erb +4 -4
- data/app/views/spree/admin/shared/_list_events.html.erb +2 -2
- data/app/views/spree/admin/shared/_sale_images.html.erb +2 -2
- data/app/views/spree/admin/shared/_translations.html.erb +23 -23
- data/config/locales/active_sales_en.yml +1 -0
- data/config/routes.rb +1 -1
- data/lib/generators/spree_active_sale/install/install_generator.rb +7 -6
- metadata +6 -22
data/README.md
CHANGED
|
@@ -18,8 +18,8 @@ Spree Active Sale makes it easy to handle flash sale/ daily deals behavior withi
|
|
|
18
18
|
* Demo application: [Spree Active Sale Demo](https://github.com/suryart/spree_active_sale_demo)
|
|
19
19
|
* Dependency status: [](https://gemnasium.com/suryart/spree_active_sale)
|
|
20
20
|
* Code Climate: [](https://codeclimate.com/github/suryart/spree_active_sale)
|
|
21
|
-
* Build Status: [](https://travis-ci.org/suryart/spree_active_sale)
|
|
22
|
+
* Converage Status: [](https://coveralls.io/r/suryart/spree_active_sale?branch=2-0-stable)
|
|
23
23
|
* Issues: [Project issues](https://github.com/suryart/spree_active_sale/issues)
|
|
24
24
|
* Fork: [Fork this Project](https://github.com/suryart/spree_active_sale/fork_select)
|
|
25
25
|
|
|
@@ -32,16 +32,16 @@ Spree Active Sale makes it easy to handle flash sale/ daily deals behavior withi
|
|
|
32
32
|
gem 'spree_active_sale' , :git => 'git://github.com/suryart/spree_active_sale.git'
|
|
33
33
|
```
|
|
34
34
|
|
|
35
|
-
* Get the
|
|
35
|
+
* Get the 2-0-stable branch for Spree 2.0.x from github:
|
|
36
36
|
|
|
37
37
|
```ruby
|
|
38
|
-
gem 'spree_active_sale' , :git => 'git://github.com/suryart/spree_active_sale.git', :branch => '
|
|
38
|
+
gem 'spree_active_sale' , :git => 'git://github.com/suryart/spree_active_sale.git', :branch => '2-0-stable'
|
|
39
39
|
```
|
|
40
40
|
|
|
41
41
|
* Or get it from rubygems.org by mentioning the following line in your Gemfile:
|
|
42
42
|
|
|
43
43
|
```ruby
|
|
44
|
-
gem 'spree_active_sale', '
|
|
44
|
+
gem 'spree_active_sale', '2.0.0'
|
|
45
45
|
```
|
|
46
46
|
|
|
47
47
|
### Then run the following commands:
|
|
@@ -227,7 +227,6 @@ Since you can not set boolean values from the block config shown above for assig
|
|
|
227
227
|
## TODOs
|
|
228
228
|
|
|
229
229
|
* Improve testing and write more test cases.
|
|
230
|
-
* Enhance the admin interface for active sales and events[U.I. and U.X.].
|
|
231
230
|
|
|
232
231
|
## Testing
|
|
233
232
|
|
|
@@ -246,7 +245,7 @@ Be sure to bundle your dependencies and then create a dummy test app for the spe
|
|
|
246
245
|
|
|
247
246
|
## NOTE
|
|
248
247
|
|
|
249
|
-
The current version supports Spree 1.3.
|
|
248
|
+
The current version supports Spree's versions: 1.3.x and 2.0.x. Older versions of Spree are unlikely to work, so attempt at your own risk.
|
|
250
249
|
|
|
251
250
|
|
|
252
251
|
## License
|
|
@@ -101,7 +101,7 @@
|
|
|
101
101
|
|
|
102
102
|
<% unless @active_sale_event.new_record? %>
|
|
103
103
|
<ul class="inline-menu">
|
|
104
|
-
<li><%= link_to_with_icon('icon-plus', t(:new_image), new_admin_active_sale_active_sale_event_sale_image_url(@active_sale, @active_sale_event), :id => 'new_sale_image_link', :class => 'button') %></li>
|
|
104
|
+
<li><%= link_to_with_icon('icon-plus', Spree.t(:new_image), new_admin_active_sale_active_sale_event_sale_image_url(@active_sale, @active_sale_event), :id => 'new_sale_image_link', :class => 'button') %></li>
|
|
105
105
|
</ul>
|
|
106
106
|
<br/>
|
|
107
107
|
<%= render 'spree/admin/shared/sale_images' %>
|
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
</colgroup>
|
|
18
18
|
<thead>
|
|
19
19
|
<tr data-hook="active_sales_header">
|
|
20
|
-
<th><%= t(
|
|
20
|
+
<th><%= t('spree.active_sale.active_record.name') %></th>
|
|
21
21
|
<th class="actions"></th>
|
|
22
22
|
</tr>
|
|
23
23
|
</thead>
|
|
@@ -40,18 +40,18 @@
|
|
|
40
40
|
<%= paginate @active_sales %>
|
|
41
41
|
|
|
42
42
|
<% content_for :sidebar_title do %>
|
|
43
|
-
<%= t(:search) %>
|
|
43
|
+
<%= Spree.t(:search) %>
|
|
44
44
|
<% end %>
|
|
45
45
|
|
|
46
46
|
<% content_for :sidebar do %>
|
|
47
47
|
<div class="box align-center" data-hook="admin_active_sales_index_search">
|
|
48
48
|
<%= search_form_for [:admin, @search] do |f| %>
|
|
49
49
|
<div class="field">
|
|
50
|
-
<%= f.label t(:name) %> <br>
|
|
50
|
+
<%= f.label Spree.t(:name) %> <br>
|
|
51
51
|
<%= f.text_field :name_cont, :class => 'fullwidth' %>
|
|
52
52
|
</div>
|
|
53
53
|
<div data-hook="admin_active_sales_index_search_buttons">
|
|
54
|
-
<%= button t(:search), 'icon-search' %>
|
|
54
|
+
<%= button Spree.t(:search), 'icon-search' %>
|
|
55
55
|
</div>
|
|
56
56
|
<% end %>
|
|
57
57
|
</div>
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
<div data-hook="admin_image_form_fields">
|
|
2
2
|
<div class="four columns alpha">
|
|
3
3
|
<div data-hook="file" class="field">
|
|
4
|
-
<%= f.label :attachment, t(:filename) %><br>
|
|
4
|
+
<%= f.label :attachment, Spree.t(:filename) %><br>
|
|
5
5
|
<%= f.file_field :attachment %>
|
|
6
6
|
</div>
|
|
7
7
|
</div>
|
|
8
8
|
<div data-hook="alt_text" class="field omega five columns">
|
|
9
|
-
<%= f.label t(:alt_text) %><br>
|
|
9
|
+
<%= f.label Spree.t(:alt_text) %><br>
|
|
10
10
|
<%= f.text_area :alt, :rows => 4, :class => 'fullwidth' %>
|
|
11
11
|
</div>
|
|
12
12
|
</div>
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
<fieldset data-hook="edit_image">
|
|
9
9
|
<legend align="center"><%= @sale_image.attachment_file_name%></legend>
|
|
10
10
|
<div data-hook="thumbnail" class="field alpha three columns align-center">
|
|
11
|
-
<%= f.label t(:thumbnail) %><br>
|
|
11
|
+
<%= f.label Spree.t(:thumbnail) %><br>
|
|
12
12
|
<%= link_to image_tag(@sale_image.attachment.url(:small)), @sale_image.attachment.url(:product) %>
|
|
13
13
|
</div>
|
|
14
14
|
<div class="nine columns omega">
|
|
@@ -16,9 +16,9 @@
|
|
|
16
16
|
</div>
|
|
17
17
|
<div class="clear"></div>
|
|
18
18
|
<div class="form-buttons filter-actions actions" data-hook="buttons">
|
|
19
|
-
<%= button t(:update), 'icon-refresh' %>
|
|
20
|
-
<span class="or"><%= t(:or) %></span>
|
|
21
|
-
<%= link_to_with_icon 'icon-remove', t(:cancel), admin_active_sale_active_sale_event_url(@active_sale, @active_sale_event), :id => 'cancel_link', :class => 'button' %>
|
|
19
|
+
<%= button Spree.t(:update), 'icon-refresh' %>
|
|
20
|
+
<span class="or"><%= Spree.t(:or) %></span>
|
|
21
|
+
<%= link_to_with_icon 'icon-remove', Spree.t(:cancel), admin_active_sale_active_sale_event_url(@active_sale, @active_sale_event), :id => 'cancel_link', :class => 'button' %>
|
|
22
22
|
</div>
|
|
23
23
|
</fieldset>
|
|
24
24
|
<% end %>
|
|
@@ -5,14 +5,14 @@
|
|
|
5
5
|
|
|
6
6
|
<%= form_for [:admin, @active_sale, @active_sale_event, @sale_image], :html => { :multipart => true } do |f| %>
|
|
7
7
|
<fieldset data-hook="new_image">
|
|
8
|
-
<legend align="center"><%= t(:new_image) %></legend>
|
|
8
|
+
<legend align="center"><%= Spree.t(:new_image) %></legend>
|
|
9
9
|
|
|
10
10
|
<%= render :partial => 'form', :locals => { :f => f } %>
|
|
11
11
|
|
|
12
12
|
<div class="form-buttons filter-actions actions" data-hook="buttons">
|
|
13
|
-
<%= button t(:save), 'icon-refresh' %>
|
|
14
|
-
<span class="or"><%= t(:or) %></span>
|
|
15
|
-
<%= link_to_with_icon 'icon-remove', t(:cancel), admin_active_sale_active_sale_event_url(@active_sale_event.active_sale, @active_sale_event), :id => 'cancel_link', :class => 'button' %>
|
|
13
|
+
<%= button Spree.t(:save), 'icon-refresh' %>
|
|
14
|
+
<span class="or"><%= Spree.t(:or) %></span>
|
|
15
|
+
<%= link_to_with_icon 'icon-remove', Spree.t(:cancel), admin_active_sale_active_sale_event_url(@active_sale_event.active_sale, @active_sale_event), :id => 'cancel_link', :class => 'button' %>
|
|
16
16
|
</div>
|
|
17
17
|
</fieldset>
|
|
18
18
|
<% end %>
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
<% content_for :head do %>
|
|
2
2
|
<%= javascript_tag "var active_sale_id = #{@active_sale.id};
|
|
3
|
-
var loading = '#{escape_javascript t(:loading)}';
|
|
4
|
-
var new_active_sale_event = '#{escape_javascript t(
|
|
5
|
-
var server_error = '#{escape_javascript t(:server_error)}';
|
|
6
|
-
var active_sale_tree_error = '#{escape_javascript t(
|
|
3
|
+
var loading = '#{escape_javascript Spree.t(:loading)}';
|
|
4
|
+
var new_active_sale_event = '#{escape_javascript t('spree.active_sale.event.link.new')}';
|
|
5
|
+
var server_error = '#{escape_javascript Spree.t(:server_error)}';
|
|
6
|
+
var active_sale_tree_error = '#{escape_javascript t('spree.active_sale.tree_error')}';"
|
|
7
7
|
%>
|
|
8
8
|
<% end %>
|
|
@@ -14,11 +14,11 @@
|
|
|
14
14
|
|
|
15
15
|
<fieldset class="no-border-top">
|
|
16
16
|
<div>
|
|
17
|
-
<%= label_tag nil, t(:tree) %><br />
|
|
17
|
+
<%= label_tag nil, Spree.t(:tree) %><br />
|
|
18
18
|
<div id="active_sale_tree" class="tree" data-url="<%= admin_active_sale_active_sale_events_path @active_sale %>"></div>
|
|
19
19
|
</div>
|
|
20
20
|
<div id="progress" style="display:none;">
|
|
21
|
-
<%= image_tag 'spinner.gif', :title => 'Spinner', :style => "vertical-align:bottom;" %> <%= t(:updating) %>..
|
|
21
|
+
<%= image_tag 'spinner.gif', :title => 'Spinner', :style => "vertical-align:bottom;" %> <%= Spree.t(:updating) %>..
|
|
22
22
|
</div>
|
|
23
23
|
|
|
24
24
|
<p class='hint info'>
|
|
@@ -14,8 +14,8 @@
|
|
|
14
14
|
</colgroup>
|
|
15
15
|
<thead>
|
|
16
16
|
<tr data-hook="images_header">
|
|
17
|
-
<th colspan="2"><%= t(:thumbnail) %></th>
|
|
18
|
-
<th><%= t(:alt_text) %></th>
|
|
17
|
+
<th colspan="2"><%= Spree.t(:thumbnail) %></th>
|
|
18
|
+
<th><%= Spree.t(:alt_text) %></th>
|
|
19
19
|
<th class="actions"></th>
|
|
20
20
|
</tr>
|
|
21
21
|
</thead>
|
|
@@ -4,30 +4,30 @@
|
|
|
4
4
|
:scope => 'spree.date_picker',
|
|
5
5
|
:default => 'yy/mm/dd'),
|
|
6
6
|
:abbr_day_names => I18n.t(:abbr_day_names, :scope => :date),
|
|
7
|
-
:add => I18n.t(
|
|
8
|
-
:are_you_sure_delete => I18n.t(
|
|
9
|
-
:bill_address => I18n.t(
|
|
10
|
-
:choose_a_customer => I18n.t(
|
|
11
|
-
:confirm_delete => I18n.t(
|
|
12
|
-
:cut => I18n.t(
|
|
13
|
-
:destroy => I18n.t(
|
|
14
|
-
:edit => I18n.t(
|
|
15
|
-
:loading => I18n.t(
|
|
7
|
+
:add => I18n.t('spree.add'),
|
|
8
|
+
:are_you_sure_delete => I18n.t('spree.are_you_sure_delete'),
|
|
9
|
+
:bill_address => I18n.t('spree.bill_address'),
|
|
10
|
+
:choose_a_customer => I18n.t('spree.choose_a_customer'),
|
|
11
|
+
:confirm_delete => I18n.t('spree.confirm_delete'),
|
|
12
|
+
:cut => I18n.t('spree.cut'),
|
|
13
|
+
:destroy => I18n.t('spree.destroy'),
|
|
14
|
+
:edit => I18n.t('spree.edit'),
|
|
15
|
+
:loading => I18n.t('spree.loading'),
|
|
16
16
|
:month_names => I18n.t(:month_names, :scope => :date).delete_if(&:blank?),
|
|
17
|
-
:more => I18n.t(
|
|
18
|
-
:name => I18n.t(
|
|
19
|
-
:next => I18n.t(
|
|
20
|
-
:no_results => I18n.t(
|
|
21
|
-
:on_hand => I18n.t(
|
|
22
|
-
:paste => I18n.t(
|
|
23
|
-
:previous => I18n.t(
|
|
24
|
-
:remove => I18n.t(
|
|
25
|
-
:rename => I18n.t(
|
|
26
|
-
:searching => I18n.t(
|
|
27
|
-
:sku => I18n.t(
|
|
28
|
-
:type_to_search => I18n.t(
|
|
29
|
-
:taxon_placeholder => I18n.t(
|
|
30
|
-
:value => I18n.t(
|
|
17
|
+
:more => I18n.t('spree.more'),
|
|
18
|
+
:name => I18n.t('spree.name'),
|
|
19
|
+
:next => I18n.t('spree.next'),
|
|
20
|
+
:no_results => I18n.t('spree.no_results'),
|
|
21
|
+
:on_hand => I18n.t('spree.on_hand'),
|
|
22
|
+
:paste => I18n.t('spree.paste'),
|
|
23
|
+
:previous => I18n.t('spree.previous'),
|
|
24
|
+
:remove => I18n.t('spree.remove'),
|
|
25
|
+
:rename => I18n.t('spree.rename'),
|
|
26
|
+
:searching => I18n.t('spree.searching'),
|
|
27
|
+
:sku => I18n.t('spree.sku'),
|
|
28
|
+
:type_to_search => I18n.t('spree.type_to_search'),
|
|
29
|
+
:taxon_placeholder => I18n.t('spree.taxon_placeholder'),
|
|
30
|
+
:value => I18n.t('spree.value')
|
|
31
31
|
}.to_json
|
|
32
32
|
%>
|
|
33
33
|
</script>
|
data/config/routes.rb
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
module SpreeActiveSale
|
|
2
2
|
module Generators
|
|
3
3
|
class InstallGenerator < Rails::Generators::Base
|
|
4
|
+
class_option :auto_run_migrations, :type => :boolean, :default => false
|
|
4
5
|
|
|
5
6
|
def add_javascripts
|
|
6
7
|
append_file 'app/assets/javascripts/store/all.js', "//= require store/spree_active_sale\n"
|
|
@@ -17,12 +18,12 @@ module SpreeActiveSale
|
|
|
17
18
|
end
|
|
18
19
|
|
|
19
20
|
def run_migrations
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
21
|
+
run_migrations = options[:auto_run_migrations] || ['', 'y', 'Y'].include?(ask 'Would you like to run the migrations now? [Y/n]')
|
|
22
|
+
if run_migrations
|
|
23
|
+
run 'bundle exec rake db:migrate'
|
|
24
|
+
else
|
|
25
|
+
puts 'Skipping rake db:migrate, don\'t forget to run it!'
|
|
26
|
+
end
|
|
26
27
|
end
|
|
27
28
|
end
|
|
28
29
|
end
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: spree_active_sale
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version:
|
|
4
|
+
version: 2.0.0
|
|
5
5
|
prerelease:
|
|
6
6
|
platform: ruby
|
|
7
7
|
authors:
|
|
@@ -18,7 +18,7 @@ dependencies:
|
|
|
18
18
|
requirements:
|
|
19
19
|
- - ~>
|
|
20
20
|
- !ruby/object:Gem::Version
|
|
21
|
-
version:
|
|
21
|
+
version: 2.0.0
|
|
22
22
|
type: :runtime
|
|
23
23
|
prerelease: false
|
|
24
24
|
version_requirements: !ruby/object:Gem::Requirement
|
|
@@ -26,7 +26,7 @@ dependencies:
|
|
|
26
26
|
requirements:
|
|
27
27
|
- - ~>
|
|
28
28
|
- !ruby/object:Gem::Version
|
|
29
|
-
version:
|
|
29
|
+
version: 2.0.0
|
|
30
30
|
- !ruby/object:Gem::Dependency
|
|
31
31
|
name: capybara
|
|
32
32
|
requirement: !ruby/object:Gem::Requirement
|
|
@@ -34,7 +34,7 @@ dependencies:
|
|
|
34
34
|
requirements:
|
|
35
35
|
- - ~>
|
|
36
36
|
- !ruby/object:Gem::Version
|
|
37
|
-
version: 2.0
|
|
37
|
+
version: 2.1.0
|
|
38
38
|
type: :development
|
|
39
39
|
prerelease: false
|
|
40
40
|
version_requirements: !ruby/object:Gem::Requirement
|
|
@@ -42,7 +42,7 @@ dependencies:
|
|
|
42
42
|
requirements:
|
|
43
43
|
- - ~>
|
|
44
44
|
- !ruby/object:Gem::Version
|
|
45
|
-
version: 2.0
|
|
45
|
+
version: 2.1.0
|
|
46
46
|
- !ruby/object:Gem::Dependency
|
|
47
47
|
name: coffee-rails
|
|
48
48
|
requirement: !ruby/object:Gem::Requirement
|
|
@@ -59,22 +59,6 @@ dependencies:
|
|
|
59
59
|
- - ! '>='
|
|
60
60
|
- !ruby/object:Gem::Version
|
|
61
61
|
version: '0'
|
|
62
|
-
- !ruby/object:Gem::Dependency
|
|
63
|
-
name: database_cleaner
|
|
64
|
-
requirement: !ruby/object:Gem::Requirement
|
|
65
|
-
none: false
|
|
66
|
-
requirements:
|
|
67
|
-
- - ! '>='
|
|
68
|
-
- !ruby/object:Gem::Version
|
|
69
|
-
version: '0'
|
|
70
|
-
type: :development
|
|
71
|
-
prerelease: false
|
|
72
|
-
version_requirements: !ruby/object:Gem::Requirement
|
|
73
|
-
none: false
|
|
74
|
-
requirements:
|
|
75
|
-
- - ! '>='
|
|
76
|
-
- !ruby/object:Gem::Version
|
|
77
|
-
version: '0'
|
|
78
62
|
- !ruby/object:Gem::Dependency
|
|
79
63
|
name: factory_girl_rails
|
|
80
64
|
requirement: !ruby/object:Gem::Requirement
|
|
@@ -260,7 +244,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
260
244
|
version: '0'
|
|
261
245
|
segments:
|
|
262
246
|
- 0
|
|
263
|
-
hash:
|
|
247
|
+
hash: -2299167609467927394
|
|
264
248
|
requirements:
|
|
265
249
|
- none
|
|
266
250
|
rubyforge_project:
|