Move additional of tabs to main nav bar to defaces, rather than overriding view directly

This commit is contained in:
Rob H
2013-02-14 15:42:47 +11:00
parent 9e9199643e
commit 2cdf458d6a
5 changed files with 17 additions and 14 deletions

View File

@@ -0,0 +1,5 @@
Deface::Override.new(:virtual_path => "spree/shared/_main_nav_bar",
:name => "add_cms_tabs_to_main_nav_bar",
:insert_after => "li#home-link",
:partial => "spree/shared/cms_tabs",
:original => '05c6495f8760e58eb68e2cce67433cf7f5299fa4')

View File

@@ -0,0 +1,5 @@
Deface::Override.new(:virtual_path => "spree/shared/_main_nav_bar",
:name => "add_current_distributor_to_main_nav_bar",
:insert_after => "li#link-to-cart",
:partial => "spree/shared/current_distributor",
:original => '0d843946b3a53643c5a7da90a3a21610208db866')

View File

@@ -0,0 +1,3 @@
- if @cms_site
- @cms_site.pages.root.children.published.each do |page|
%li= link_to page.label, page.full_path

View File

@@ -0,0 +1,4 @@
- if current_distributor
%li#current-distributor{'data-hook' => ''}
You are shopping at
= link_to current_distributor.name, root_path

View File

@@ -1,14 +0,0 @@
%li#home-link{'data-hook' => ''}
= link_to t(:home), root_path
- if @cms_site
- @cms_site.pages.root.children.published.each do |page|
%li= link_to page.label, page.full_path
%li#link-to-cart{'data-hook' => ''}
= link_to_cart
- if current_distributor
%li#current-distributor{'data-hook' => ''}
You are shopping at
= link_to current_distributor.name, root_path