mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-02-27 01:43:22 +00:00
Merge branch 'user-menu'
This commit is contained in:
@@ -5,6 +5,7 @@
|
||||
.order-summary
|
||||
background-color: #e1f0f5
|
||||
padding: 1em
|
||||
width: 100%
|
||||
|
||||
checkout
|
||||
display: block
|
||||
|
||||
@@ -7,14 +7,15 @@
|
||||
|
||||
- if admin_user? or enterprise_user?
|
||||
%li
|
||||
%a{href: spree.admin_path}
|
||||
%a{href: spree.admin_path, target:'_blank'}
|
||||
%i.ofn-i_021-tools
|
||||
Admin
|
||||
Administration
|
||||
|
||||
%li
|
||||
%a{href: spree.account_path}
|
||||
%i.ofn-i_015-user
|
||||
= spree_current_user.email
|
||||
Account
|
||||
= "(" + spree_current_user.email + ")"
|
||||
|
||||
%li
|
||||
%a{title: 'Log Out', href:'/logout' }
|
||||
|
||||
@@ -1,13 +1,14 @@
|
||||
- if admin_user? or enterprise_user?
|
||||
%li
|
||||
%a{href: spree.admin_path}
|
||||
%a{href: spree.admin_path, target:'_blank'}
|
||||
%i.ofn-i_021-tools
|
||||
Admin
|
||||
|
||||
%li
|
||||
%a{href: spree.account_path}
|
||||
%i.ofn-i_015-user
|
||||
= spree_current_user.email
|
||||
Account
|
||||
/ = spree_current_user.email
|
||||
|
||||
%li
|
||||
%a{title: 'Log Out', href:'/logout' }
|
||||
|
||||
@@ -1,33 +1,34 @@
|
||||
.darkswarm
|
||||
.row
|
||||
%h1= accurate_title
|
||||
.account-summary{"data-hook" => "account_summary"}
|
||||
%dl#user-info
|
||||
%dt= t(:email)
|
||||
%dd
|
||||
= @user.email
|
||||
(#{link_to t(:edit), spree.edit_account_path})
|
||||
.account-my-orders{"data-hook" => "account_my_orders"}
|
||||
%h3= t(:my_orders)
|
||||
- if @orders.present?
|
||||
%table.order-summary
|
||||
%thead
|
||||
%tr
|
||||
%th.order-number= t(:order_number)
|
||||
%th.order-date= t(:order_date)
|
||||
%th.order-status= t(:status)
|
||||
%th.order-payment-state= t(:payment_state)
|
||||
%th.order-shipment-state= t(:shipment_state)
|
||||
%th.order-total= t(:total)
|
||||
%tbody
|
||||
- @orders.each do |order|
|
||||
%tr{class: cycle('even', 'odd')}
|
||||
%td.order-number= link_to order.number, order_url(order)
|
||||
%td.order-date= l order.completed_at.to_date
|
||||
%td.order-status= t(order.state).titleize
|
||||
%td.order-payment-state= t("payment_states.#{order.payment_state}") if order.payment_state
|
||||
%td.order-shipment-state= t("shipment_states.#{order.shipment_state}") if order.shipment_state
|
||||
%td.order-total= money order.total
|
||||
- else
|
||||
%p= t(:you_have_no_orders_yet)
|
||||
%br/
|
||||
.row.pad-top
|
||||
.small-12.columns.pad-top
|
||||
%h1= accurate_title
|
||||
.account-summary{"data-hook" => "account_summary"}
|
||||
%dl#user-info
|
||||
%dt= t(:email)
|
||||
%dd
|
||||
= @user.email
|
||||
(#{link_to t(:edit), spree.edit_account_path})
|
||||
.account-my-orders{"data-hook" => "account_my_orders"}
|
||||
%h3= t(:my_orders)
|
||||
- if @orders.present?
|
||||
%table.order-summary
|
||||
%thead
|
||||
%tr
|
||||
%th.order-number= t(:order_number)
|
||||
%th.order-date= t(:order_date)
|
||||
%th.order-status= t(:status)
|
||||
%th.order-payment-state= t(:payment_state)
|
||||
%th.order-shipment-state= t(:shipment_state)
|
||||
%th.order-total= t(:total)
|
||||
%tbody
|
||||
- @orders.each do |order|
|
||||
%tr{class: cycle('even', 'odd')}
|
||||
%td.order-number= link_to order.number, order_url(order)
|
||||
%td.order-date= l order.completed_at.to_date
|
||||
%td.order-status= t(order.state).titleize
|
||||
%td.order-payment-state= t("payment_states.#{order.payment_state}") if order.payment_state
|
||||
%td.order-shipment-state= t("shipment_states.#{order.shipment_state}") if order.shipment_state
|
||||
%td.order-total= money order.total
|
||||
- else
|
||||
%p= t(:you_have_no_orders_yet)
|
||||
%br/
|
||||
|
||||
Reference in New Issue
Block a user