Sha256: e7f86a580b752128292a0cbd1152c357a86e581fa17cb1cf081f53591861643d

Contents?: true

Size: 1.96 KB

Versions: 1

Compression:

Stored size: 1.96 KB

Contents

<%= render :partial => 'spree/admin/shared/order_tabs', :locals => { :current => 'Return Authorizations' } %>

<% content_for :page_actions do %>
  <% if @order.shipments.any? &:shipped? %>
    <%= button_link_to Spree.t(:new_return_authorization), new_admin_order_return_authorization_url(@order), :class => "btn-success", :icon => 'add' %>
  <% end %>
<% end %>

<% content_for :page_title do %>
  / <%= Spree.t(:return_authorizations) %>
<% end %>

<% if @order.shipments.any?(&:shipped?) && @order.return_authorizations.any? %>
  <table class="table">
    <thead data-hook="rma_header">
      <tr>
        <th><%= Spree.t(:rma_number) %></th>
        <th><%= Spree.t(:status) %></th>
        <th><%= Spree.t(:pre_tax_total) %></th>
        <th><%= "#{Spree.t('date')}/#{Spree.t('time')}" %></th>
        <th></th>
      </tr>
    </thead>
    <tbody>
      <% @return_authorizations.each do |return_authorization| %>
        <tr id="<%= spree_dom_id(return_authorization) %>" data-hook="rma_row">
          <td><%= return_authorization.number %></td>
          <td><%= Spree.t(return_authorization.state.downcase) %></td>
          <td><%= return_authorization.display_pre_tax_total.to_html %></td>
          <td><%= pretty_time(return_authorization.created_at) %></td>
          <td class="actions actions-2">
            <%= link_to_edit return_authorization, :no_text => true, :class => 'edit' %>
            <% unless return_authorization.customer_returned_items? %>
              <%= link_to_delete return_authorization, :no_text => true %>
            <% end %>
          </td>
        </tr>
      <% end %>
    </tbody>
  </table>
<% elsif @order.shipments.any?(&:shipped?) %>
  <div class="alert alert-info no-objects-found">
    <%= Spree.t(:no_resource_found, resource: Spree::ReturnAuthorization.model_name.human(count: :many)) %>
  </div>
<% else %>
  <div data-hook="rma_cannont_create" class="alert alert-info no-objects-found">
    <%= Spree.t(:cannot_create_returns) %>
  </div>
<% end %>

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
spree_backend-3.0.0.rc1 app/views/spree/admin/return_authorizations/index.html.erb