Sha256: 5df51a691cf3404f3943e5ebf7ea53f82d7f8ebe8344c1d4f3f80fd7d9f50627

Contents?: true

Size: 1.92 KB

Versions: 27

Compression:

Stored size: 1.92 KB

Contents

<% content_for :sidebar_title do %>
  <%= Spree.t(:"admin.user.user_information") %>
<% end %>

<% content_for :sidebar do %>
  <nav class="menu">
    <ul data-hook="admin_user_tab_options">
      <li<%== ' class="active"' if current == :account %>>
        <%= link_to_with_icon 'user', Spree.t(:"admin.user.account"), edit_admin_user_path(@user) %>
      </li>
      <% if can?(:addresses, @user) %>
        <li<%== ' class="active"' if current == :address %>>
          <%= link_to_with_icon 'user', Spree.t(:"admin.user.addresses"), addresses_admin_user_path(@user) %>
        </li>
      <% end %>
      <% if can?(:orders, @user) %>
        <li<%== ' class="active"' if current == :orders %>>
          <%= link_to_with_icon 'shopping-cart', Spree.t(:"admin.user.orders"), orders_admin_user_path(@user) %>
        </li>
      <% end %>
      <% if can?(:items, @user) %>
        <li<%== ' class="active"' if current == :items %>>
          <%= link_to_with_icon 'edit', Spree.t(:"admin.user.items"), items_admin_user_path(@user) %>
        </li>
      <% end %>
      <% if can?(:display, Spree::StoreCredit) %>
        <li<%== ' class="active"' if current == :store_credits %>>
          <%= link_to_with_icon 'money', Spree.t(:"admin.user.store_credit"), admin_user_store_credits_path(@user) %>
        </li>
      <% end %>
    </ul>

    <fieldset data-hook="admin_user_lifetime_stats">
      <legend><%= Spree.t(:lifetime_stats) %></legend>
      <dl id="user-lifetime-stats">
        <dt><%= Spree.t(:total_sales) %>:</dt>
          <dd><%= @user.display_lifetime_value.to_html %></dd>
        <dt><%= Spree.t(:num_orders) %>:</dt>
          <dd><%= @user.order_count.to_i %></dd>
        <dt><%= Spree.t(:average_order_value) %>:</dt>
          <dd><%= @user.display_average_order_value.to_html %></dd>
        <dt><%= Spree.t(:member_since) %>:</dt>
          <dd><%= l @user.created_at.to_date %></dd>
      </dl>
    </fieldset>
  </nav>
<% end %>

Version data entries

27 entries across 27 versions & 1 rubygems

Version Path
solidus_backend-1.2.3 app/views/spree/admin/users/_sidebar.html.erb
solidus_backend-1.1.4 app/views/spree/admin/users/_sidebar.html.erb
solidus_backend-1.0.7 app/views/spree/admin/users/_sidebar.html.erb
solidus_backend-1.0.6 app/views/spree/admin/users/_sidebar.html.erb
solidus_backend-1.2.2 app/views/spree/admin/users/_sidebar.html.erb
solidus_backend-1.2.1 app/views/spree/admin/users/_sidebar.html.erb
solidus_backend-1.1.3 app/views/spree/admin/users/_sidebar.html.erb
solidus_backend-1.0.5 app/views/spree/admin/users/_sidebar.html.erb
solidus_backend-1.2.0 app/views/spree/admin/users/_sidebar.html.erb
solidus_backend-1.2.0.rc2 app/views/spree/admin/users/_sidebar.html.erb
solidus_backend-1.0.4 app/views/spree/admin/users/_sidebar.html.erb
solidus_backend-1.1.2 app/views/spree/admin/users/_sidebar.html.erb
solidus_backend-1.2.0.rc1 app/views/spree/admin/users/_sidebar.html.erb
solidus_backend-1.2.0.beta1 app/views/spree/admin/users/_sidebar.html.erb
solidus_backend-1.0.3 app/views/spree/admin/users/_sidebar.html.erb
solidus_backend-1.1.1 app/views/spree/admin/users/_sidebar.html.erb
solidus_backend-1.1.0 app/views/spree/admin/users/_sidebar.html.erb
solidus_backend-1.1.0.pre2 app/views/spree/admin/users/_sidebar.html.erb
solidus_backend-1.1.0.pre1 app/views/spree/admin/users/_sidebar.html.erb
solidus_backend-1.1.0.beta1 app/views/spree/admin/users/_sidebar.html.erb