mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-01-25 20:46:48 +00:00
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.
15 lines
589 B
Plaintext
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'" } }
|