Sha256: e0f168c57627ea35006777ca63f0af143f9565e08cef4caf3dc0947677703e76

Contents?: true

Size: 1.47 KB

Versions: 5

Compression:

Stored size: 1.47 KB

Contents

<% content_for :page_actions do %>
  <% if subscription.state_events.include?(:cancel) %>
    <%=
      link_to(
          t('spree.admin.subscriptions.actions.cancel'),
          spree.cancel_admin_subscription_path(subscription),
          method: :delete,
          data: { confirm: t('spree.admin.subscriptions.actions.cancel_alert') },
          class: 'btn btn-primary'
      )
    %>
  <% end %>

  <% if subscription.state_events.include?(:activate) %>
    <%=
      link_to(
          t('spree.admin.subscriptions.actions.activate'),
          spree.activate_admin_subscription_path(subscription),
          method: :post,
          class: 'btn btn-primary',
      )
    %>
  <% end %>

  <% if subscription.active? %>
    <% if subscription.paused? %>
      <%=
        link_to(
            t('spree.admin.subscriptions.actions.resume'),
            spree.resume_admin_subscription_path(subscription),
            method: :post,
            class: 'btn btn-default',
        )
      %>
    <% else %>
      <%=
        link_to(
            t('spree.admin.subscriptions.actions.pause'),
            spree.pause_admin_subscription_path(subscription),
            method: :post,
            class: 'btn btn-default',
        )
      %>
      <%=
        link_to(
            t('spree.admin.subscriptions.actions.skip'),
            spree.skip_admin_subscription_path(subscription),
            method: :post,
            class: 'btn btn-default',
        )
      %>
    <% end %>
  <% end %>
<% end %>

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
solidus_subscriptions-2.0.2 app/views/spree/admin/shared/_subscription_actions.html.erb
solidus_subscriptions-2.0.1 app/views/spree/admin/shared/_subscription_actions.html.erb
solidus_subscriptions-2.0.0 app/views/spree/admin/shared/_subscription_actions.html.erb
solidus_subscriptions-1.1.0 app/views/spree/admin/shared/_subscription_actions.html.erb
solidus_subscriptions-1.0.1 app/views/spree/admin/shared/_subscription_actions.html.erb