Files
openfoodnetwork/app/views/spree/users/show.html.haml
2017-05-05 14:20:57 +10:00

29 lines
1.2 KiB
Plaintext

.darkswarm
= inject_orders_by_distributor
.row.pad-top
.small-12.columns.pad-top
%h2
= accurate_title
%span.account-summary{"data-hook" => "account_summary"}
= @user.email
(#{link_to t(:edit), spree.edit_account_path})
.orders{"ng-controller" => "OrdersCtrl", "ng-cloak" => true}
.my-open-orders{ ng: { show: 'Orders.changeable_orders.length > 0' } }
%h3= t(:open_orders)
= render 'open_orders'
.active_table
%h3.my-orders= t(:transaction_history)
%distributor.active_table_node.row.animate-repeat{"ng-if" => "Orders.orders_by_distributor.length > 0", "ng-repeat" => "(key, distributor) in Orders.orders_by_distributor",
"ng-controller" => "DistributorNodeCtrl",
"ng-class" => "{'closed' : !open(), 'open' : open(), 'inactive' : !distributor.active}",
id: "{{distributor.hash}}"}
.small-12.columns
= render partial: "spree/users/skinny"
= render partial: "spree/users/fat"
.message{"ng-if" => "Orders.orders_by_distributor.length == 0", "ng-bind" => "::'you_have_no_orders_yet' | t"}
= render partial: "shared/footer"