Files
openfoodnetwork/app/views/enterprises/shop.html.haml
Maikel Linke df36386757 Require customer instead of user
If a shop requires a login, then a customer needs to be logged in, not
just any user.
2016-03-24 18:24:46 +11:00

39 lines
1.2 KiB
Plaintext

- content_for(:title) do
= current_distributor.name
- content_for(:description) do
= current_distributor.description
- content_for(:image) do
= current_distributor.logo.url
= inject_enterprises
%shop.darkswarm
- content_for :order_cycle_form do
%div{"ng-controller" => "OrderCycleChangeCtrl", "ng-cloak" => true}
%closing{"ng-if" => "OrderCycle.selected()"}
= t :enterprises_next_closing
%strong {{ OrderCycle.orders_close_at() | date_in_words }}
%span
= t :enterprises_ready_for
/ Will this label should be a variable to reflect 'Ready for pickup / delivery' as appropriate
%select.avenir#order_cycle_id{"ng-model" => "order_cycle.order_cycle_id",
"ofn-change-order-cycle" => true,
"disabled" => require_customer?,
"ng-options" => "oc.id as oc.time for oc in #{@order_cycles.map {|oc| {time: pickup_time(oc), id: oc.id}}.to_json}",
"popover-placement" => "left", "popover" => t(:enterprises_choose), "popover-trigger" => "openTrigger"}
= render partial: "shopping_shared/details"
= render partial: 'shop/messages'
- unless require_customer?
.row= render partial: "shop/products/form"
= render partial: "shared/footer"