Replaced eaterprises logo with the distributor name header.

This commit is contained in:
alexs
2013-08-21 16:05:06 +10:00
parent f5b326ee1a
commit 8b4c0682fb
6 changed files with 19 additions and 21 deletions

View File

@@ -16,6 +16,7 @@ table {
}
#header #logo {
margin-top: 10px;
padding-top: 10px;
}
@@ -295,3 +296,7 @@ div#eft-payment-alert {
div.cleared {
clear: both;
}
#link-to-login {
padding: 10px;
}

View File

@@ -1,5 +0,0 @@
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_distribution",
:original => '0d843946b3a53643c5a7da90a3a21610208db866')

View File

@@ -0,0 +1,8 @@
/
replace "#logo"
%figure#logo.columns.six
- if current_distributor
%h1= link_to current_distributor.name, main_app.shop_enterprise_path(current_distributor)
- else
%h1= link_to "OPEN FOOD NETWORK", root_path

View File

@@ -1,9 +0,0 @@
- if current_distributor || current_order_cycle
%li#current-distribution{'data-hook' => ''}
You are shopping
- if current_distributor
at
= link_to current_distributor.name, root_path
- if current_order_cycle
in
= link_to current_order_cycle.name, root_path

View File

@@ -87,7 +87,7 @@ feature %q{
visit spree.cart_path
page.should have_selector 'h4 a', :text => p1.name
page.should have_selector 'h4 a', :text => p2.name
page.should have_selector "#current-distribution a", :text => d2.name
page.should have_selector "#logo h1 a", :text => d2.name
end
it "when the only valid distributor is the chosen one, does not allow the user to choose a distributor" do
@@ -135,7 +135,7 @@ feature %q{
click_button 'Add To Cart'
# Then My distributor should have changed
page.should have_selector "#current-distribution a", :text => d2.name
page.should have_selector "#logo h1 a", :text => d2.name
end
it "does not allow the user to add a product from a distributor that cannot supply the cart's products" do
@@ -295,8 +295,7 @@ feature %q{
visit spree.cart_path
page.should have_selector 'h4 a', :text => p1.name
page.should have_selector 'h4 a', :text => p2.name
page.should have_selector "#current-distribution a", :text => d2.name
page.should have_selector "#current-distribution a", :text => oc2.name
page.should have_selector "#logo h1 a", :text => d2.name
end
it "when the only valid order cycle is the chosen one, does not allow the user to choose an order cycle" do
@@ -353,7 +352,7 @@ feature %q{
click_button 'Add To Cart'
# Then my distributor should have changed
page.should have_selector "#current-distribution a", :text => d2.name
page.should have_selector "#logo h1 a", :text => d2.name
end
it "does not allow the user to add a product from an order cycle that cannot supply the cart's products" do

View File

@@ -35,7 +35,7 @@ feature %q{
click_on "Melb Uni Co-op"
# Then I should see the name of the distributor that I've selected
page.should have_content 'You are shopping at Melb Uni Co-op'
page.should have_content 'Melb Uni Co-op'
page.should_not have_selector 'div.distributor-description'
end
@@ -137,7 +137,7 @@ feature %q{
click_button 'Add To Cart'
# Then I should see the name of the distributor and order cycle that I've selected
page.should have_content 'You are shopping at Melb Uni Co-op in Bulk Foods'
page.should have_content 'Melb Uni Co-op'
page.should_not have_selector 'div.distributor-description'
end