Files
openfoodnetwork/app/views/shopping_shared/_tabs.html.haml
Maikel Linke 1d42ce885b Stay on shop page when opening login modal
The login modal changes the URL to `#/login` which interfers with our
shop pages. In order to show the right shop page, we need to know which
pages are valid and where we have been before we clicked on Login.
2020-03-19 15:38:00 +11:00

15 lines
589 B
Plaintext

- if (@order.andand.distributor || current_distributor) == current_distributor
- shop_tabs.each do |tab|
= render "shopping_shared/tabs/#{tab[:name]}"
#shop-tabs{ ng: { controller: "PageSelectionCtrl", init: "whitelistPages(#{shop_tab_names.to_json})", cloak: true } }
.tab-buttons
.row
.columns.small-12.large-8
- shop_tabs.each do |tab|
.page{ "ng-class" => "{ selected: selectedPage() == '#{tab[:name]}' }" }
%a{ href: "##{tab[:name]}" }=tab[:title]
.page-view{ ng: {include: "'shop/' + selectedPage() + '.html'" } }