From f280ffb3afba61100d84c3f162efd5d7fdf40da1 Mon Sep 17 00:00:00 2001 From: Angel Perez Date: Thu, 13 Dec 2018 11:40:37 +0100 Subject: Fix all deprecations warnings --- .../spree/admin/shared/_no_objects_found.html.erb | 4 ++-- app/views/spree/admin/subscriptions/_form.html.erb | 2 +- .../spree/admin/subscriptions/_legacy_form.html.erb | 2 +- app/views/spree/admin/subscriptions/edit.html.erb | 2 +- app/views/spree/admin/subscriptions/index.html.erb | 18 +++++++++--------- app/views/spree/admin/subscriptions/new.html.erb | 2 +- 6 files changed, 15 insertions(+), 15 deletions(-) (limited to 'app/views') diff --git a/app/views/spree/admin/shared/_no_objects_found.html.erb b/app/views/spree/admin/shared/_no_objects_found.html.erb index 7f53e74..8258e28 100644 --- a/app/views/spree/admin/shared/_no_objects_found.html.erb +++ b/app/views/spree/admin/shared/_no_objects_found.html.erb @@ -1,4 +1,4 @@ -<%= Spree.t(:no_resource, resource: resource.model_name.human.pluralize) %> +<%= I18n.t('spree.no_resource', resource: resource.model_name.human.pluralize) %> <% if can? :create, resource %> - <%= link_to Spree.t(:create_one), new_resource_url %> + <%= link_to I18n.t('spree.create_one'), new_resource_url %> <% end %> diff --git a/app/views/spree/admin/subscriptions/_form.html.erb b/app/views/spree/admin/subscriptions/_form.html.erb index 64c0e80..cff057e 100644 --- a/app/views/spree/admin/subscriptions/_form.html.erb +++ b/app/views/spree/admin/subscriptions/_form.html.erb @@ -7,7 +7,7 @@ <% if new %>
- <%= f.label :user_id, Spree.t(:user), class: "required" %> + <%= f.label :user_id, I18n.t('spree.user'), class: "required" %> <%= f.collection_select :user_id, Spree::User.all, :id, :email, {}, class: "select2 fullwidth" %>
diff --git a/app/views/spree/admin/subscriptions/_legacy_form.html.erb b/app/views/spree/admin/subscriptions/_legacy_form.html.erb index 61d3d08..a3e2b9b 100644 --- a/app/views/spree/admin/subscriptions/_legacy_form.html.erb +++ b/app/views/spree/admin/subscriptions/_legacy_form.html.erb @@ -7,7 +7,7 @@ <% if new %>
- <%= f.label :user_id, Spree.t(:user), class: "required" %> + <%= f.label :user_id, I18n.t('spree.user'), class: "required" %> <%= f.collection_select :user_id, Spree::User.all, :id, :email, {}, class: "select2 fullwidth" %>
diff --git a/app/views/spree/admin/subscriptions/edit.html.erb b/app/views/spree/admin/subscriptions/edit.html.erb index 6f4389a..436f408 100644 --- a/app/views/spree/admin/subscriptions/edit.html.erb +++ b/app/views/spree/admin/subscriptions/edit.html.erb @@ -1,7 +1,7 @@ <% content_for(:page_title) { t('.title') } %> <% content_for :page_actions do %> -
  • <%= button_link_to t('.back'), admin_subscriptions_path %>
  • +
  • <%= link_to t('.back'), admin_subscriptions_path %>
  • <% end %> <% content_for :sidebar_title do %> diff --git a/app/views/spree/admin/subscriptions/index.html.erb b/app/views/spree/admin/subscriptions/index.html.erb index 9589fff..db962a5 100644 --- a/app/views/spree/admin/subscriptions/index.html.erb +++ b/app/views/spree/admin/subscriptions/index.html.erb @@ -5,46 +5,46 @@ <% end %> <% content_for :page_actions do %> -
  • <%= button_link_to t('.new_subscription'), new_admin_subscription_path %>
  • +
  • <%= link_to t('.new_subscription'), new_admin_subscription_path %>
  • <% end %> <% content_for :table_filter_title do %> - <%= Spree.t(:search) %> + <%= I18n.t('spree.search') %> <% end %> <% content_for :table_filter do %> <%= search_form_for [:admin, @search] do |f| %>
    - <%= label_tag :q_created_at_gt, Spree.t(:date_range) %> + <%= label_tag :q_created_at_gt, I18n.t('spree.date_range') %>
    - <%= f.text_field :created_at_gt, class: 'datepicker datepicker-from', placeholder: Spree.t(:start) %> + <%= f.text_field :created_at_gt, class: 'datepicker datepicker-from', placeholder: I18n.t('spree.start') %> - <%= f.text_field :created_at_lt, class: 'datepicker datepicker-to', placeholder: Spree.t(:stop) %> + <%= f.text_field :created_at_lt, class: 'datepicker datepicker-to', placeholder: I18n.t('spree.stop') %>
    <%= label_tag :q_actionable_date_gt, SolidusSubscriptions::Subscription.human_attribute_name(:actionable_date) %>
    - <%= f.text_field :actionable_date_gt, class: 'datepicker datepicker-from', placeholder: Spree.t(:start) %> + <%= f.text_field :actionable_date_gt, class: 'datepicker datepicker-from', placeholder: I18n.t('spree.start') %> - <%= f.text_field :actionable_date_lt, class: 'datepicker datepicker-to', placeholder: Spree.t(:stop) %> + <%= f.text_field :actionable_date_lt, class: 'datepicker datepicker-to', placeholder: I18n.t('spree.stop') %>
    - <%= label_tag :q_state_eq, Spree.t(:status) %> + <%= label_tag :q_state_eq, I18n.t('spree.status') %> <%= f.select :state_eq, SolidusSubscriptions::Subscription.state_machines[:state].states.map {|s| [s.human_name, s.value]}, {include_blank: true}, class: 'select2 fullwidth' %>
    @@ -83,7 +83,7 @@
    -
    <%= button Spree.t(:filter_results) %>
    +
    <%= button_tag I18n.t('spree.filter_results') %>
    <% end %> <% end %> diff --git a/app/views/spree/admin/subscriptions/new.html.erb b/app/views/spree/admin/subscriptions/new.html.erb index a231f8b..789395e 100644 --- a/app/views/spree/admin/subscriptions/new.html.erb +++ b/app/views/spree/admin/subscriptions/new.html.erb @@ -1,7 +1,7 @@ <% content_for(:page_title) { t('.title') } %> <% content_for :page_actions do %> -
  • <%= button_link_to t('.back'), admin_subscriptions_path %>
  • +
  • <%= link_to t('.back'), admin_subscriptions_path %>
  • <% end %> <%= form_for @subscription, url: spree.admin_subscriptions_url, class: "row" do |f| %> -- cgit v1.2.3