spree_account_recurring 1.3.1 → 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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 8941fd45593459238bc7e2608b5c65e7236dd70b
4
- data.tar.gz: 41e26ff32ac9b4c5732f3feea6e1407f33ebdf31
3
+ metadata.gz: 4db1e03b477838b215b23fbe16d469db3a9da284
4
+ data.tar.gz: 0bfde31df0e0eccf21116f17625ff15f50623a76
5
5
  SHA512:
6
- metadata.gz: 72292aa7852b7f2632b2a3f879b58eddf697b32bc0fd6b8aec9ee390003b206e98f2c11870775497131ea67668123f3aff6ce3b44c550a41bd7299e285557498
7
- data.tar.gz: 4f73cc463e5470df03e4d166a1baa4f199325684d157ce6872ce05e9527a63a6806518fbeeef9081817e1c93ebc68f4ec7df445f28bc008209a051f196933add
6
+ metadata.gz: e3595afe7d4401cb58ae0b67935feb7c63e36a8f8867b72089f8dc4f4f8f6cc8a9612e48a9591e7d857feb4f36f81f029d225e7f7477ca0439a7d9d8e0defb17
7
+ data.tar.gz: 2022cbf3d05b8759e725138edde5e49972777f292d5f133e7d7b1146225f47b900178f06ea07a5c65a1126a02f92e3dcb6518982cc47ba8fda6b86d8a224e010
data/README.md CHANGED
@@ -1,4 +1,4 @@
1
- Spree Account Recurring [![Code Climate](https://codeclimate.com/github/vinsol/spree-account-recurring.png)](https://codeclimate.com/github/vinsol/spree-account-recurring) [![Build Status](https://travis-ci.org/vinsol/spree-account-recurring.svg?branch=2-4-stable)](https://travis-ci.org/vinsol/spree-account-recurring)
1
+ Spree Account Recurring [![Code Climate](https://codeclimate.com/github/vinsol/spree-account-recurring.png)](https://codeclimate.com/github/vinsol/spree-account-recurring) [![Build Status](https://travis-ci.org/vinsol/spree-account-recurring.svg?branch=3-0-stable)](https://travis-ci.org/vinsol/spree-account-recurring)
2
2
  =========================
3
3
 
4
4
  Spree extension to manage recurring payments/subscriptions using [Stripe Payment Gateway](https://stripe.com/).
@@ -10,6 +10,11 @@ Installation
10
10
 
11
11
  Install `spree_account_recurring` by adding the following to your `Gemfile`:
12
12
 
13
+ ```ruby
14
+ # Spree 3.0.x
15
+ gem 'spree_account_recurring', '~> 2.0'
16
+ ```
17
+
13
18
  ```ruby
14
19
  # Spree 2.4.x
15
20
  gem 'spree_account_recurring', '~> 1.3'
@@ -1,5 +1,5 @@
1
1
  Deface::Override.new(
2
- :virtual_path => "spree/admin/shared/_configuration_menu",
2
+ :virtual_path => "spree/admin/shared/sub_menu/_configuration",
3
3
  :name => "add_recurring_tab_to_configuration_sidebar",
4
4
  :insert_bottom => "[data-hook='admin_configurations_sidebar_menu']",
5
5
  :text => "<%= configurations_sidebar_menu_item Spree.t(:recurrings), admin_recurrings_path %>",
@@ -8,20 +8,13 @@ Deface::Override.new(
8
8
  Deface::Override.new(
9
9
  :virtual_path => "spree/admin/reports/index",
10
10
  :name => "add_subscriptions_reports_index",
11
- :insert_after => "table.index tbody",
11
+ :insert_after => "table.table tbody",
12
12
  :text => %q{<tr data-hook='reports_row'>
13
- <td class='align-center'><%= link_to Spree.t(:subscriptions), admin_subscriptions_url %></td>
14
- <td style="padding-left:1em">View Recurring Subscriptions</td>
13
+ <td><%= link_to Spree.t(:subscriptions), admin_subscriptions_url %></td>
14
+ <td>View Recurring Subscriptions</td>
15
15
  </tr>
16
16
  <tr data-hook='reports_row'>
17
- <td class='align-center'><%= link_to Spree.t(:subscription_events), admin_subscription_events_url %></td>
18
- <td style="padding-left:1em">View Recurring Subscription Events</td>
17
+ <td><%= link_to Spree.t(:subscription_events), admin_subscription_events_url %></td>
18
+ <td>View Recurring Subscription Events</td>
19
19
  </tr>},
20
- :disabled => false)
21
-
22
- Deface::Override.new(
23
- :virtual_path => "spree/admin/shared/_tabs",
24
- :name => "select_reports_when_subscriptions",
25
- :replace => %q{erb[loud]:contains("tab :reports, :icon => 'icon-file'")},
26
- :text => %q{<%= tab :reports, :subscriptions, :icon => 'icon-file'%>},
27
20
  :disabled => false)
@@ -1,47 +1,49 @@
1
1
  <div data-hook="admin_plan_form_fields">
2
2
 
3
3
  <div data-hook="plan">
4
- <div class="alpha four columns">
5
- <div class="field">
4
+ <div class="col-md-4">
5
+ <div class="form-group">
6
6
  <%= f.label :interval, Spree.t(:interval) %>
7
- <%= f.select :interval, @recurring.class::INTERVAL.collect{|k, v| [v, k]}, {}, {:disabled => @plan.persisted?, class: 'select2 fullwidth'} %>
7
+ <%= f.select :interval, @recurring.class::INTERVAL.collect{|k, v| [v, k]}, {}, {:disabled => @plan.persisted?, class: 'select2'} %>
8
8
  </div>
9
9
 
10
- <div class="field">
10
+ <div class="form-group">
11
11
  <%= f.label :interval_count, Spree.t(:every) %>
12
- <%= f.select :interval_count, (1..11).collect {|i| [i, i]}, {}, {:disabled => @plan.persisted?, class: 'select2 fullwidth'} %>
12
+ <%= f.select :interval_count, (1..11).collect {|i| [i, i]}, {}, {:disabled => @plan.persisted?, class: 'select2'} %>
13
13
  </div>
14
14
 
15
- <div class="field">
15
+ <div class="form-group">
16
16
  <%= f.label :currency, Spree.t(:currency) %>
17
- <%= f.select :currency, @recurring.class::CURRENCY.collect{|k, v| [v, k]}, {}, {:disabled => @plan.persisted?, class: 'select2 fullwidth'} %>
17
+ <%= f.select :currency, @recurring.class::CURRENCY.collect{|k, v| [v, k]}, {}, {:disabled => @plan.persisted?, class: 'select2'} %>
18
18
  </div>
19
19
  </div>
20
20
 
21
- <div class="omega eight columns">
22
- <div class="field">
21
+ <div class="col-md-8">
22
+ <div class="form-group">
23
23
  <%= f.label :name, Spree.t(:name) %>
24
- <%= f.text_field :name %>
24
+ <%= f.text_field :name, :class => 'form-control' %>
25
25
  </div>
26
26
 
27
- <div class="field">
27
+ <div class="form-group">
28
28
  <%= f.label :amount, Spree.t(:amount) %>
29
- <%= f.text_field :amount, :disabled => @plan.persisted? %>
29
+ <%= f.text_field :amount, :class => 'form-control', :disabled => @plan.persisted? %>
30
30
  </div>
31
31
 
32
- <div class="field">
32
+ <div class="form-group">
33
33
  <%= f.label :trial_period_days, Spree.t(:trial_period_days) %>
34
- <%= f.text_field :trial_period_days, :disabled => @plan.persisted? %>
34
+ <%= f.text_field :trial_period_days, :class => 'form-control', :disabled => @plan.persisted? %>
35
35
  </div>
36
36
 
37
- <div class="field">
38
- <%= f.label :active, Spree.t(:active) %>
39
- <%= f.check_box :active %>&nbsp;&nbsp;&nbsp;&nbsp;
40
- <%= f.label :default, Spree.t(:default) %>
41
- <%= f.check_box :default %>
37
+ <div class="checkbox">
38
+ <label>
39
+ <%= f.check_box :active %>
40
+ <%= Spree.t(:active) %>
41
+ </label>&nbsp;&nbsp;&nbsp;&nbsp;
42
+ <label>
43
+ <%= f.check_box :default %>
44
+ <%= Spree.t(:default) %>
45
+ </label>
42
46
  </div>
43
47
  </div>
44
48
  </div>
45
49
  </div>
46
-
47
- <div class="clear"></div>
@@ -1,22 +1,20 @@
1
- <%= render :partial => 'spree/admin/shared/configuration_menu' %>
1
+ <%= render :partial => 'spree/admin/shared/sub_menu/configuration' %>
2
2
 
3
3
  <% content_for :page_title do %>
4
4
  <%= Spree.t(:editing_plan) %> <i class="icon-arrow-right"></i> <%= @plan.name %>
5
5
  <% end %>
6
6
 
7
7
  <% content_for :page_actions do %>
8
- <li>
9
- <%= button_link_to Spree.t(:back_to_plans_list), admin_recurring_plans_path(@recurring), :icon => 'icon-arrow-left' %>
10
- </li>
8
+ <%= button_link_to Spree.t(:back_to_plans_list), admin_recurring_plans_path(@recurring), :icon => 'arrow-left' %>
11
9
  <% end %>
12
10
 
13
11
  <%= render :partial => 'spree/shared/error_messages', :locals => { :target => @plan } %>
14
12
 
15
13
  <%= form_for @plan, :url => admin_recurring_plan_url(@recurring, @plan) do |f| %>
16
- <fieldset class="no-border-top">
14
+ <fieldset>
17
15
  <%= render :partial => 'form', :locals => { :f => f } %>
18
- <div data-hook="buttons" class="filter-actions actions">
19
- <%= button Spree.t('actions.update'), 'icon-ok' %>
16
+ <div data-hook="buttons" class="actions">
17
+ <%= button Spree.t('actions.update'), 'refresh' %>
20
18
  </div>
21
19
  </fieldset>
22
20
  <% end %>
@@ -1,29 +1,15 @@
1
- <%= render :partial => 'spree/admin/shared/configuration_menu' %>
1
+ <%= render :partial => 'spree/admin/shared/sub_menu/configuration' %>
2
2
 
3
3
  <% content_for :page_title do %>
4
4
  <%= Spree.t(:editing_recurring) %> <i class="icon-arrow-right"></i> <%= @recurring.name %> <i class="icon-arrow-right"></i> <%= Spree.t(:plans) %>
5
5
  <% end %>
6
6
 
7
7
  <% content_for :page_actions do %>
8
- <li>
9
- <%= button_link_to Spree.t(:new_plan), new_admin_recurring_plan_path(@recurring), :icon => 'icon-plus', :id => 'admin_new_recurring_plans_link' %>
10
- </li>
11
- <% end %>
8
+ <%= button_link_to Spree.t(:new_plan), new_admin_recurring_plan_path(@recurring), :icon => 'plus', class: "btn-success", :id => 'admin_new_recurring_plans_link' %>
9
+ <% end if can? :create, Spree::Plan %>
12
10
 
13
11
  <% if @plans.present? %>
14
- <table class="index" id='listing_recurring_plans'>
15
- <colgroup>
16
- <col style="width: 10%">
17
- <col style="width: 15%">
18
- <col style="width: 10%">
19
- <col style="width: 10%">
20
- <col style="width: 10%">
21
- <col style="width: 10%">
22
- <col style="width: 10%">
23
- <col style="width: 5%">
24
- <col style="width: 5%">
25
- <col style="width: 15%">
26
- </colgroup>
12
+ <table class="table" id='listing_recurring_plans'>
27
13
  <thead>
28
14
  <tr data-hook="admin_recurring_plans_index_headers">
29
15
  <th><%= Spree.t(:api_plan_id) %></th>
@@ -35,22 +21,22 @@
35
21
  <th><%= Spree.t(:trial_period_days) %></th>
36
22
  <th><%= Spree.t(:active) %></th>
37
23
  <th><%= Spree.t(:default) %></th>
38
- <th data-hook="admin_recurring_plans_index_header_actions" class="actions"></th>
24
+ <th data-hook="admin_recurring_plans_index_header_actions" class="actions actions-2 text-right"></th>
39
25
  </tr>
40
26
  </thead>
41
27
  <tbody>
42
28
  <% @plans.each do |plan|%>
43
29
  <tr id="<%= spree_dom_id plan %>" data-hook="admin_recurring_plans_index_rows" class="<%= cycle('odd', 'even')%>">
44
- <td class="align-center"><%= plan.api_plan_id %></td>
45
- <td class="align-center"><%= plan.name %></td>
46
- <td class="align-center"><%= plan.amount %></td>
47
- <td class="align-center"><%= @recurring.class::INTERVAL[plan.interval.to_sym] %></td>
48
- <td class="align-center"><%= plan.interval_count %></td>
49
- <td class="align-center"><%= @recurring.class::CURRENCY[plan.currency.to_sym] %></td>
50
- <td class="align-center"><%= plan.trial_period_days %></td>
51
- <td class="align-center"><%= plan.active ? Spree.t(:say_yes) : Spree.t(:say_no) %></td>
52
- <td class="align-center"><%= plan.default ? Spree.t(:say_yes) : Spree.t(:say_no) %></td>
53
- <td data-hook="admin_recurring_plans_index_row_actions" class="actions">
30
+ <td><%= plan.api_plan_id %></td>
31
+ <td><%= plan.name %></td>
32
+ <td><%= plan.amount %></td>
33
+ <td><%= @recurring.class::INTERVAL[plan.interval.to_sym] %></td>
34
+ <td><%= plan.interval_count %></td>
35
+ <td><%= @recurring.class::CURRENCY[plan.currency.to_sym] %></td>
36
+ <td><%= plan.trial_period_days %></td>
37
+ <td><%= plan.active ? Spree.t(:say_yes) : Spree.t(:say_no) %></td>
38
+ <td><%= plan.default ? Spree.t(:say_yes) : Spree.t(:say_no) %></td>
39
+ <td data-hook="admin_recurring_plans_index_row_actions" class="actions actions-2 text-right">
54
40
  <%= link_to_edit_url edit_admin_recurring_plan_url(@recurring, plan), :no_text => true %>
55
41
  <%= link_to_delete plan, url: admin_recurring_plan_url(@recurring, plan), :no_text => true %>
56
42
  </td>
@@ -59,9 +45,9 @@
59
45
  </tbody>
60
46
  </table>
61
47
  <% else %>
62
- <div class="alpha twelve columns no-objects-found">
48
+ <div class="alert alert-info no-objects-found">
63
49
  <%= Spree.t(:no_resource_found, resource: I18n.t(:other, scope: 'activerecord.models.spree/plan')) %>,
64
- <%= link_to Spree.t(:add_one), spree.new_admin_recurring_plan_path(@recurring) %>!
50
+ <%= link_to Spree.t(:add_one), spree.new_admin_recurring_plan_path(@recurring) if can? :create, Spree::Plan %>!
65
51
  </div>
66
52
  <% end %>
67
53
 
@@ -1,13 +1,11 @@
1
- <%= render :partial => 'spree/admin/shared/configuration_menu' %>
1
+ <%= render :partial => 'spree/admin/shared/sub_menu/configuration' %>
2
2
 
3
3
  <% content_for :page_title do %>
4
4
  <%= Spree.t(:new_plan) %>
5
5
  <% end %>
6
6
 
7
7
  <% content_for :page_actions do %>
8
- <li>
9
- <%= button_link_to Spree.t(:back_to_plans_list), admin_recurring_plans_path(@recurring), :icon => 'icon-arrow-left' %>
10
- </li>
8
+ <%= button_link_to Spree.t(:back_to_plans_list), admin_recurring_plans_path(@recurring), :icon => 'arrow-left' %>
11
9
  <% end %>
12
10
 
13
11
  <%= render :partial => 'spree/shared/error_messages', :locals => { :target => @plan } %>
@@ -15,8 +13,8 @@
15
13
  <%= form_for @plan, :url => admin_recurring_plans_path(@recurring) do |f| %>
16
14
  <fieldset class="no-border-top">
17
15
  <%= render :partial => 'form', :locals => { :f => f } %>
18
- <div data-hook="buttons" class="filter-actions actions">
19
- <%= button Spree.t(:create), 'icon-ok' %>
16
+ <div data-hook="buttons" class="form-actions">
17
+ <%= button Spree.t(:create), 'ok', {class: 'btn-success'} %>
20
18
  </div>
21
19
  </fieldset>
22
20
  <% end %>
@@ -1,11 +1,11 @@
1
1
  <div data-hook="admin_recurring_form_fields">
2
2
 
3
- <div data-hook="recurring">
3
+ <div data-hook="recurring" class="row">
4
4
 
5
- <div class="alpha four columns">
6
- <div id="preference-settings" data-hook class="field">
5
+ <div class="col-md-4">
6
+ <div id="preference-settings" data-hook class="form-group">
7
7
  <%= label_tag nil, Spree.t(:provider) %>
8
- <%= select(:recurring, :type, Rails.application.config.spree.recurring_providers.collect {|pro| [pro.display_name, pro]}, {}, {disabled: !@recurring.new_record?, class: 'select2 fullwidth'}) %>
8
+ <%= select(:recurring, :type, Rails.application.config.spree.recurring_providers.collect {|pro| [pro.display_name, pro]}, {}, {disabled: !@recurring.new_record?, class: 'select2'}) %>
9
9
 
10
10
  <% unless @recurring.new_record? %>
11
11
  <%= preference_fields(@recurring, f) %>
@@ -15,28 +15,34 @@
15
15
  <% end %>
16
16
  <% end %>
17
17
  </div>
18
- <div data-hook="active" class="field">
19
- <ul>
20
- <li>
21
- <%= label_tag :nil, Spree.t(:active) %>
22
- <%= check_box :recurring, :active %>
23
- </li>
24
- </ul>
18
+ <div data-hook="active" class="form-group">
19
+ <strong><%= Spree.t(:active) %></strong>
20
+ <div class="radio">
21
+ <%= label_tag :recurring_active_true do %>
22
+ <%= radio_button :recurring, :active, true %>
23
+ <%= Spree.t(:say_yes) %>
24
+ <% end %>
25
+ </div>
26
+
27
+ <div class="radio">
28
+ <%= label_tag :recurring_active_false do %>
29
+ <%= radio_button :recurring, :active, false %>
30
+ <%= Spree.t(:say_no) %>
31
+ <% end %>
32
+ </div>
25
33
  </div>
26
34
  </div>
27
35
 
28
- <div class="omega eight columns">
29
- <div data-hook="name" class="field">
36
+ <div class="col-md-8">
37
+ <div data-hook="name" class="form-group">
30
38
  <%= label_tag nil, Spree.t(:name) %>
31
- <%= text_field :recurring, :name, :class => 'fullwidth' %>
39
+ <%= text_field :recurring, :name, :class => 'form-control' %>
32
40
  </div>
33
- <div data-hook="description" class="field">
41
+ <div data-hook="description" class="form-group">
34
42
  <%= label_tag nil, Spree.t(:description) %>
35
- <%= text_area :recurring, :description, {:cols => 60, :rows => 6, :class => 'fullwidth'} %>
43
+ <%= text_area :recurring, :description, {:cols => 60, :rows => 6, :class => 'form-control'} %>
36
44
  </div>
37
45
  </div>
38
46
 
39
47
  </div>
40
48
  </div>
41
-
42
- <div class="clear"></div>
@@ -1,25 +1,23 @@
1
- <%= render :partial => 'spree/admin/shared/configuration_menu' %>
1
+ <%= render :partial => 'spree/admin/shared/sub_menu/configuration' %>
2
2
 
3
3
  <% content_for :page_title do %>
4
4
  <%= Spree.t(:editing_recurring) %> <i class="icon-arrow-right"></i> <%= @recurring.name %>
5
5
  <% end %>
6
6
 
7
7
  <% content_for :page_actions do %>
8
- <li>
9
- <%= button_link_to Spree.t(:back_to_recurrings_list), spree.admin_recurrings_path, :icon => 'icon-arrow-left' %>
10
- </li>
8
+ <%= button_link_to Spree.t(:back_to_recurrings_list), spree.admin_recurrings_path, :icon => 'arrow-left' %>
11
9
  <% end %>
12
10
 
13
11
  <%= render :partial => 'spree/shared/error_messages', :locals => { :target => @recurring } %>
14
12
 
15
13
  <%= form_for @recurring, :url => admin_recurring_path(@recurring) do |f| %>
16
- <fieldset class="no-border-top">
14
+ <fieldset>
17
15
  <%= render :partial => 'form', :locals => { :f => f } %>
18
- <div data-hook="buttons" class="filter-actions actions">
16
+ <div data-hook="buttons" class="actions">
19
17
  <% if @recurring.has_preferred_keys? %>
20
18
  <%= button_link_to Spree.t(:manage_plans), admin_recurring_plans_url(@recurring) %>
21
19
  <% end %>
22
- <%= button Spree.t('actions.update'), 'icon-refresh' %>
20
+ <%= button Spree.t('actions.update'), 'refresh' %>
23
21
  </div>
24
22
  </fieldset>
25
23
  <% end %>
@@ -1,38 +1,30 @@
1
- <%= render 'spree/admin/shared/configuration_menu' %>
1
+ <%= render 'spree/admin/shared/sub_menu/configuration' %>
2
2
 
3
3
  <% content_for :page_title do %>
4
4
  <%= Spree.t(:recurring) %>
5
5
  <% end %>
6
6
 
7
7
  <% content_for :page_actions do %>
8
- <li>
9
- <%= button_link_to Spree.t(:new_recurring), new_admin_recurring_url, :icon => 'icon-plus', :id => 'admin_new_recurring_link' %>
10
- </li>
11
- <% end %>
8
+ <%= button_link_to Spree.t(:new_recurring), new_admin_recurring_url, :icon => 'plus', class: "btn-success", :id => 'admin_new_recurring_link' %>
9
+ <% end if can? :create, Spree::Recurring %>
12
10
 
13
11
  <% if @recurrings.any? %>
14
- <table class="index" id='listing_recurrings'>
15
- <colgroup>
16
- <col style="width: 30%">
17
- <col style="width: 25%">
18
- <col style="width: 25%">
19
- <col style="width: 20%">
20
- </colgroup>
12
+ <table class="table" id='listing_recurrings'>
21
13
  <thead>
22
14
  <tr data-hook="admin_payment_methods_index_headers">
23
15
  <th><%= Spree.t(:name) %></th>
24
16
  <th><%= Spree.t(:provider) %></th>
25
17
  <th><%= Spree.t(:active) %></th>
26
- <th data-hook="admin_payment_methods_index_header_actions" class="actions"></th>
18
+ <th data-hook="admin_payment_methods_index_header_actions" class="actions actions-2 text-right"></th>
27
19
  </tr>
28
20
  </thead>
29
21
  <tbody>
30
22
  <% @recurrings.each do |recurring|%>
31
23
  <tr id="<%= spree_dom_id recurring %>" data-hook="admin_recurrings_index_rows" class="<%= cycle('odd', 'even')%>">
32
- <td class="align-center"><%= recurring.name %></td>
33
- <td class="align-center"><%= recurring.class.display_name %></td>
34
- <td class="align-center"><%= recurring.active ? Spree.t(:say_yes) : Spree.t(:say_no) %></td>
35
- <td data-hook="admin_recurrings_index_row_actions" class="actions">
24
+ <td><%= recurring.name %></td>
25
+ <td><%= recurring.class.display_name %></td>
26
+ <td><%= recurring.active ? Spree.t(:say_yes) : Spree.t(:say_no) %></td>
27
+ <td data-hook="admin_recurrings_index_row_actions" class="actions actions-2 text-right">
36
28
  <%= link_to_edit_url edit_admin_recurring_url(recurring), :no_text => true %>
37
29
  <%= link_to_delete recurring, url: admin_recurring_url(recurring), :no_text => true %>
38
30
  </td>
@@ -41,8 +33,8 @@
41
33
  </tbody>
42
34
  </table>
43
35
  <% else %>
44
- <div class="alpha twelve columns no-objects-found">
36
+ <div class="alert alert-info no-objects-found">
45
37
  <%= Spree.t(:no_resource_found, resource: I18n.t(:other, scope: 'activerecord.models.spree/recurring')) %>,
46
- <%= link_to Spree.t(:add_one), spree.new_admin_recurring_url %>!
38
+ <%= link_to Spree.t(:add_one), spree.new_admin_recurring_url if can? :create, Spree::Recurring %>!
47
39
  </div>
48
40
  <% end %>
@@ -1,13 +1,11 @@
1
- <%= render :partial => 'spree/admin/shared/configuration_menu' %>
1
+ <%= render :partial => 'spree/admin/shared/sub_menu/configuration' %>
2
2
 
3
3
  <% content_for :page_title do %>
4
4
  <%= Spree.t(:new_recurring) %>
5
5
  <% end %>
6
6
 
7
7
  <% content_for :page_actions do %>
8
- <li>
9
- <%= button_link_to Spree.t(:back_to_recurrings_list), admin_recurrings_url, :icon => 'icon-arrow-left' %>
10
- </li>
8
+ <%= button_link_to Spree.t(:back_to_recurrings_list), admin_recurrings_url, :icon => 'arrow-left' %>
11
9
  <% end %>
12
10
 
13
11
  <%= render :partial => 'spree/shared/error_messages', :locals => { :target => @recurring } %>
@@ -15,8 +13,8 @@
15
13
  <%= form_for @recurring, :url => admin_recurrings_url do |f| %>
16
14
  <fieldset class="no-border-top">
17
15
  <%= render :partial => 'form', :locals => { :f => f } %>
18
- <div data-hook="buttons" class="filter-actions actions">
19
- <%= button Spree.t(:create), 'icon-ok' %>
16
+ <div data-hook="buttons" class="form-actions">
17
+ <%= button Spree.t(:create), 'ok', {class: 'btn-success'} %>
20
18
  </div>
21
19
  </fieldset>
22
20
  <% end %>
@@ -3,46 +3,40 @@
3
3
  <% end %>
4
4
 
5
5
  <% content_for :page_actions do %>
6
- <li><%= link_to_with_icon 'icon-arrow-left', Spree.t(:back_to_reports_list), spree.admin_reports_url, :class => 'button' %></li>
6
+ <%= link_to_with_icon 'arrow-left', Spree.t(:back_to_reports_list), spree.admin_reports_url, :class => 'btn btn-default' %>
7
7
  <% end %>
8
8
 
9
9
  <% content_for :table_filter_title do %>
10
10
  <%= Spree.t(:subscription_event_search) %>
11
11
  <% end %>
12
12
 
13
- <% content_for :table_filter do %>
13
+ <div class="well">
14
14
  <%= search_form_for @search, :url => spree.admin_subscription_events_url do |s| %>
15
- <div class="date-range-filter field align-center">
16
- <%= label_tag nil, Spree.t(:start), :class => 'inline' %>
17
- <%= s.text_field :created_at_gt, :class => 'datepicker datepicker-from', :value => datepicker_field_value(params[:q][:created_at_gt]) %>
18
-
19
- <span class="range-divider">
20
- <i class="icon-arrow-right"></i>
21
- </span>
22
-
23
- <%= s.text_field :created_at_lt, :class => 'datepicker datepicker-to', :value => datepicker_field_value(params[:q][:created_at_lt]) %>
24
- <%= label_tag nil, Spree.t(:end), :class => 'inline' %>
15
+ <div class="date-range-filter form-group">
16
+ <%= label_tag nil, Spree.t(:date_range) %>
17
+ <div class="date-range-filter row">
18
+ <div class="col-md-6">
19
+ <%= s.text_field :created_at_gt, :class => 'datepicker datepicker-from form-control', :value => datepicker_field_value(params[:q][:created_at_gt]) %>
20
+ </div>
21
+ <div class="col-md-6">
22
+ <%= s.text_field :created_at_lt, :class => 'datepicker datepicker-to form-control', :value => datepicker_field_value(params[:q][:created_at_lt]) %>
23
+ </div>
24
+ </div>
25
25
  </div>
26
26
 
27
- <div class="date-range-filter field align-center">
28
- <%= label_tag nil, Spree.t(:email), :class => 'inline' %>
29
- <%= s.text_field :subscription_email_eq, style: "width:240px" %>
27
+ <div class="date-range-filter form-group">
28
+ <%= label_tag nil, Spree.t(:email) %>
29
+ <%= s.text_field :subscription_email_eq, class: "form-control" %>
30
30
  </div>
31
31
 
32
- <div class="actions filter-actions">
33
- <%= button Spree.t(:search), 'icon-search' %>
32
+ <div class="form-actions">
33
+ <%= button Spree.t(:search), 'search' %>
34
34
  </div>
35
35
  <% end %>
36
- <% end %>
36
+ </div>
37
37
 
38
38
  <% if @subscription_events.any? %>
39
- <table class="index" id='listing_subscription_events'>
40
- <colgroup>
41
- <col style="width: 30%">
42
- <col style="width: 25%">
43
- <col style="width: 25%">
44
- <col style="width: 20%">
45
- </colgroup>
39
+ <table class="table table-bordered admin-report" id='listing_subscription_events'>
46
40
  <thead>
47
41
  <tr data-hook="admin_subscription_events_index_headers">
48
42
  <th><%= Spree.t(:email) %></th>
@@ -55,10 +49,10 @@
55
49
  <% @subscription_events.each do |subscription_event|%>
56
50
  <% plan = subscription_event.subscription.plan %>
57
51
  <tr data-hook="admin_subscription_events_index_rows" class="<%= cycle('odd', 'even')%>">
58
- <td class="align-center"><%= subscription_event.subscription.email %></td>
59
- <td class="align-center"><%= link_to plan.api_plan_id, edit_admin_recurring_plan_url(plan.recurring, plan) %></td>
60
- <td class="align-center"><%= subscription_event.request_type %></td>
61
- <td class="align-center"><%= subscription_event.created_at.try(:strftime, '%d-%h-%Y') %></td>
52
+ <td><%= subscription_event.subscription.email %></td>
53
+ <td><%= link_to plan.api_plan_id, edit_admin_recurring_plan_url(plan.recurring, plan) %></td>
54
+ <td><%= subscription_event.request_type %></td>
55
+ <td><%= subscription_event.created_at.try(:strftime, '%d-%h-%Y') %></td>
62
56
  </tr>
63
57
  <% end %>
64
58
  </tbody>
@@ -66,7 +60,7 @@
66
60
 
67
61
  <%= paginate @subscription_events %>
68
62
  <% else %>
69
- <div class="alpha sixteen columns no-objects-found">
63
+ <div class="col-md-12 no-objects-found alert alert-info">
70
64
  <%= Spree.t(:no_resource_found, resource: I18n.t(:other, scope: 'activerecord.models.spree/subscription_event')) %>
71
65
  </div>
72
66
  <% end %>
@@ -3,47 +3,40 @@
3
3
  <% end %>
4
4
 
5
5
  <% content_for :page_actions do %>
6
- <li><%= link_to_with_icon 'icon-arrow-left', Spree.t(:back_to_reports_list), spree.admin_reports_url, :class => 'button' %></li>
6
+ <%= link_to_with_icon 'arrow-left', Spree.t(:back_to_reports_list), spree.admin_reports_url, :class => 'btn btn-default' %>
7
7
  <% end %>
8
8
 
9
9
  <% content_for :table_filter_title do %>
10
10
  <%= Spree.t(:subscription_date_search) %>
11
11
  <% end %>
12
12
 
13
- <% content_for :table_filter do %>
13
+ <div class="well">
14
14
  <%= search_form_for @search, :url => spree.admin_subscriptions_url do |s| %>
15
- <div class="date-range-filter field align-center">
16
- <%= label_tag nil, Spree.t(:start), :class => 'inline' %>
17
- <%= s.text_field :subscribed_at_gt, :class => 'datepicker datepicker-from', :value => datepicker_field_value(params[:q][:subscribed_at_gt]) %>
18
-
19
- <span class="range-divider">
20
- <i class="icon-arrow-right"></i>
21
- </span>
22
-
23
- <%= s.text_field :subscribed_at_lt, :class => 'datepicker datepicker-to', :value => datepicker_field_value(params[:q][:subscribed_at_lt]) %>
24
- <%= label_tag nil, Spree.t(:end), :class => 'inline' %>
15
+ <div class="date-range-filter form-group">
16
+ <%= label_tag nil, Spree.t(:date_range) %>
17
+ <div class="date-range-filter row">
18
+ <div class="col-md-6">
19
+ <%= s.text_field :subscribed_at_gt, :class => 'datepicker datepicker-from form-control', :value => datepicker_field_value(params[:q][:subscribed_at_gt]) %>
20
+ </div>
21
+ <div class="col-md-6">
22
+ <%= s.text_field :subscribed_at_lt, :class => 'datepicker datepicker-to form-control', :value => datepicker_field_value(params[:q][:subscribed_at_lt]) %>
23
+ </div>
24
+ </div>
25
25
  </div>
26
26
 
27
- <div class="date-range-filter field align-center">
28
- <%= label_tag nil, Spree.t(:email), :class => 'inline' %>
29
- <%= s.text_field :email_eq, style: "width:240px" %>
27
+ <div class="date-range-filter form-group">
28
+ <%= label_tag nil, Spree.t(:email) %>
29
+ <%= s.text_field :email_eq, class: "form-control" %>
30
30
  </div>
31
31
 
32
- <div class="actions filter-actions">
33
- <%= button Spree.t(:search), 'icon-search' %>
32
+ <div class="form-actions">
33
+ <%= button Spree.t(:search), 'search' %>
34
34
  </div>
35
35
  <% end %>
36
- <% end %>
36
+ </div>
37
37
 
38
38
  <% if @subscriptions.any? %>
39
- <table class="index" id='listing_subscriptions'>
40
- <colgroup>
41
- <col style="width: 30%">
42
- <col style="width: 20%">
43
- <col style="width: 15%">
44
- <col style="width: 15%">
45
- <col style="width: 20%">
46
- </colgroup>
39
+ <table class="table table-bordered admin-report" id='listing_subscriptions'>
47
40
  <thead>
48
41
  <tr data-hook="admin_subscriptions_index_headers">
49
42
  <th><%= Spree.t(:email) %></th>
@@ -56,10 +49,10 @@
56
49
  <tbody>
57
50
  <% @subscriptions.each do |subscription|%>
58
51
  <tr data-hook="admin_subscriptions_index_rows" class="<%= cycle('odd', 'even')%>">
59
- <td class="align-center"><%= subscription.email %></td>
60
- <td class="align-center"><%= link_to subscription.plan.api_plan_id, edit_admin_recurring_plan_url(subscription.plan.recurring, subscription.plan) %></td>
61
- <td class="align-center"><%= subscription.subscribed_at.try(:strftime, '%d-%h-%Y') %></td>
62
- <td class="align-center"><%= subscription.unsubscribed_at.try(:strftime, '%d-%h-%Y') || 'N/A' %></td>
52
+ <td><%= subscription.email %></td>
53
+ <td><%= link_to subscription.plan.api_plan_id, edit_admin_recurring_plan_url(subscription.plan.recurring, subscription.plan) %></td>
54
+ <td><%= subscription.subscribed_at.try(:strftime, '%d-%h-%Y') %></td>
55
+ <td><%= subscription.unsubscribed_at.try(:strftime, '%d-%h-%Y') || 'N/A' %></td>
63
56
  <td data-hook="admin_recurring_plans_index_row_actions" class="actions">
64
57
  <%= link_to Spree.t(:view_events), admin_subscription_events_url(q: {subscription_email_eq: subscription.email}) %>
65
58
  </td>
@@ -70,7 +63,7 @@
70
63
 
71
64
  <%= paginate @subscriptions %>
72
65
  <% else %>
73
- <div class="alpha sixteen columns no-objects-found">
66
+ <div class="col-md-12 no-objects-found alert alert-info">
74
67
  <%= Spree.t(:no_resource_found, resource: I18n.t(:other, scope: 'activerecord.models.spree/subscription')) %>
75
68
  </div>
76
69
  <% end %>
@@ -26,7 +26,7 @@
26
26
  </p>
27
27
  </div>
28
28
 
29
- <%= f.submit Spree.t(:subscribe), class: 'continue' %>
29
+ <%= f.submit Spree.t(:subscribe), class: 'continue btn btn-primary' %>
30
30
  <script>Spree.disableSaveOnClick();</script>
31
31
  <% end %>
32
32
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: spree_account_recurring
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.3.1
4
+ version: 2.0.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Priyank Gupta
@@ -16,14 +16,14 @@ dependencies:
16
16
  requirements:
17
17
  - - "~>"
18
18
  - !ruby/object:Gem::Version
19
- version: '2.4'
19
+ version: 3.0.0
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
24
  - - "~>"
25
25
  - !ruby/object:Gem::Version
26
- version: '2.4'
26
+ version: 3.0.0
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: stripe
29
29
  requirement: !ruby/object:Gem::Requirement
@@ -148,7 +148,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
148
148
  requirements:
149
149
  - - ">="
150
150
  - !ruby/object:Gem::Version
151
- version: 1.9.3
151
+ version: 2.0.0
152
152
  required_rubygems_version: !ruby/object:Gem::Requirement
153
153
  requirements:
154
154
  - - ">="