From 8e0a7d907276febde2dce8f7255c26628a98725d Mon Sep 17 00:00:00 2001 From: Will Marshall Date: Tue, 7 Jan 2014 11:04:40 +1100 Subject: [PATCH] Pretties, fixing the email validation issue with admin authentication steps --- app/assets/images/logo.png | Bin 0 -> 3139 bytes app/assets/stylesheets/darkswarm/footer.sass | 12 +++++ .../stylesheets/darkswarm/shop.css.sass | 45 +----------------- .../stylesheets/darkswarm/variables.css.sass | 1 + app/views/enterprises/_about_us.html.haml | 1 - app/views/enterprises/_contact_us.html.haml | 1 - app/views/shared/_copyright.html.haml | 3 ++ app/views/shop/_about_us.html.haml | 3 ++ app/views/shop/_contact_us.html.haml | 8 ++++ app/views/shop/show.html.haml | 8 ++-- .../admin/bulk_product_update_spec.rb | 2 +- .../request/authentication_workflow.rb | 5 +- 12 files changed, 37 insertions(+), 52 deletions(-) create mode 100644 app/assets/images/logo.png create mode 100644 app/assets/stylesheets/darkswarm/footer.sass create mode 100644 app/assets/stylesheets/darkswarm/variables.css.sass delete mode 100644 app/views/enterprises/_about_us.html.haml delete mode 100644 app/views/enterprises/_contact_us.html.haml create mode 100644 app/views/shared/_copyright.html.haml create mode 100644 app/views/shop/_about_us.html.haml create mode 100644 app/views/shop/_contact_us.html.haml diff --git a/app/assets/images/logo.png b/app/assets/images/logo.png new file mode 100644 index 0000000000000000000000000000000000000000..aca7aac1dc200f071bf056e1dbfdf0ff4c62697c GIT binary patch literal 3139 zcmaJ@dpwi-AD^ZXQf^I%8M($xHjL5OFdA|R$z{#MM!VRC(T&_WlqB~$iO6M?IFv-E zLPaWZaw$n=Nu;nk(r-G|`TgvzkuWsc7-@z=qmkQSrY1;Jgo)@y8zIdwC^W{@9QOTzi>$FjLNOkA zhwrvTD=eJK<+3mcL`+PKam;pOCOZs)w6wHb)i5Cj>g{r!0f>Jx!v7A$VjK0%>fr8qyCSiS+-Wbox&;hwB0S z>+k;*=6J=j0E7p?VMehjqQZr0t(szC?AZXB%Vc{onfrfa(VfcVGC5Qx3uf<$hU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E&g@=$dRPjt^*ovWyx2iE>MGVKFXEYm8icCPM}e4JGtz)97kWTsb7a?sMg!9 zBqi&7+&$RULK~DVfUkIt$6uL+#%m}5J{UZKuq)I-2c=qcOV+18(1^Ax;8322#|hv- z<^l0(f}8Z0JySw#Ll|N);i#?S<7jFs8DXDLV zHWU^R5-%o_${;{%a%l6&e(1WkB8G~&K!T@KDA`Bnt1ZnwLl8WCeG5Jc_dX{|#m4r; z@a2{de$lfo(*Vv&1mj+EowitdyaVXk+S*>Qg?5M5d%0h9=XBqV_?}DP_L+<;9%o*Z ze!0)>tHd%v?m=n&#Y}Nozr_POFXmqwetc5xJpj$+^Z7TB=GC>euxl&m$7hrIHTAi~ z&oI+$b*zDYV@S_FO+E9aAiZ-nw|0g0l@RSyWt+TBRd=Nyt{s}bT9#6fapW33QcA(Z zzpmCbxd|n|^HVsD3{-~(%U_$}E62*e6^t~$bfIwN0j71e&1s&cGv%pQEOs#}U8>4oU)4}r3YWk>)H=q_H(j&OkfL5H~UFLJv=<*Nd+dj<@PQ7vx#>;yq}-Wot@n&=kWSCwZeQQDykp0+O)d0%7uWHU$HuVbQGNGHV5Jl%CrQzX=UUx+^CrG{ zPq59=#6-<2`j=ul1wb$1^mL#6v5X8U%;9B=wL7+Tl~?Q{64R5cGtbwb(Quv^n?mO% zfs8L&wHg^)x$MnvP@oTACgMM}{_*fs;-96Rn9h-~w)K6*8aN#8;kM+38N=qD2c1`M z+&2{-7M;#{aQgIMo!uPgnct-f1vP$K#Lc?qx4Ipc76+rm#0IoX`k&`dK7$r?FE1Y? z62dA|Jex=TzO*ugT3s1RhT8C!HGJm@>zK2TD&3&hSlZYX!wyj5)ZSuA)qAF^ O*Lots70 section - & > .content - background: none - border: none - & > .title, &.active > .title - text-transform: uppercase - line-height: 50px - border: none - &, &:hover - background: none - a - padding: 0px 2.2em - - products - display: block - padding-top: 36px - table - width: 100% - border-collapse: collapse - border: none - th - line-height: 50px - .notes - max-width: 300px - td, th - background: #fff - border: 1px solid #cccccc - border-left: 0px - border-right: 0px - td - padding: 20px 0px - input[type=number] - width: 60px - margin: 0px - - - diff --git a/app/assets/stylesheets/darkswarm/variables.css.sass b/app/assets/stylesheets/darkswarm/variables.css.sass new file mode 100644 index 0000000000..a13eb9d014 --- /dev/null +++ b/app/assets/stylesheets/darkswarm/variables.css.sass @@ -0,0 +1 @@ +$fawn: #f6efe5 diff --git a/app/views/enterprises/_about_us.html.haml b/app/views/enterprises/_about_us.html.haml deleted file mode 100644 index 24cffec25e..0000000000 --- a/app/views/enterprises/_about_us.html.haml +++ /dev/null @@ -1 +0,0 @@ -About Us diff --git a/app/views/enterprises/_contact_us.html.haml b/app/views/enterprises/_contact_us.html.haml deleted file mode 100644 index bb7297252b..0000000000 --- a/app/views/enterprises/_contact_us.html.haml +++ /dev/null @@ -1 +0,0 @@ -Contact Us diff --git a/app/views/shared/_copyright.html.haml b/app/views/shared/_copyright.html.haml new file mode 100644 index 0000000000..271ba90c41 --- /dev/null +++ b/app/views/shared/_copyright.html.haml @@ -0,0 +1,3 @@ +#copyright.text-center + %img.copyright{src: "/assets/logo.png", alt: "Open Food Network"} + © Copyright 2013 Open Food Foundation diff --git a/app/views/shop/_about_us.html.haml b/app/views/shop/_about_us.html.haml new file mode 100644 index 0000000000..74ef2eaa47 --- /dev/null +++ b/app/views/shop/_about_us.html.haml @@ -0,0 +1,3 @@ +.about.right.text-right.small-2.large-3.columns + %h3 About Us + %p= @distributor.long_description.andand.html_safe diff --git a/app/views/shop/_contact_us.html.haml b/app/views/shop/_contact_us.html.haml new file mode 100644 index 0000000000..2cb4d65984 --- /dev/null +++ b/app/views/shop/_contact_us.html.haml @@ -0,0 +1,8 @@ +.contact.small-2.large-3.columns + %h3 Contact + %ul + %li= @distributor.email + %li= @distributor.website + = @distributor.address.address1 + = @distributor.address.address2 + = @distributor.address.city diff --git a/app/views/shop/show.html.haml b/app/views/shop/show.html.haml index 2e874ed521..a4d54423b6 100644 --- a/app/views/shop/show.html.haml +++ b/app/views/shop/show.html.haml @@ -43,6 +43,8 @@ %products.row = render partial: "shop/products" - - -#= render partial: "enterprises/contact_us" - -#= render partial: "enterprises/about_us" + #footer + %section.row + = render partial: "shop/contact_us" + = render partial: "shop/about_us" + = render partial: "shared/copyright" diff --git a/spec/features/admin/bulk_product_update_spec.rb b/spec/features/admin/bulk_product_update_spec.rb index 53fd4823b1..9992fd6d83 100644 --- a/spec/features/admin/bulk_product_update_spec.rb +++ b/spec/features/admin/bulk_product_update_spec.rb @@ -390,7 +390,7 @@ feature %q{ page.should have_selector "a.clone-product", :count => 3 first("a.clone-product").click - + sleep 5 page.should have_selector "a.clone-product", :count => 4 page.should have_field "product_name", with: "COPY OF #{p1.name}" page.should have_select "supplier", selected: "#{p1.supplier.name}" diff --git a/spec/support/request/authentication_workflow.rb b/spec/support/request/authentication_workflow.rb index 850157e2a0..3bcdabfcf2 100644 --- a/spec/support/request/authentication_workflow.rb +++ b/spec/support/request/authentication_workflow.rb @@ -1,13 +1,12 @@ module AuthenticationWorkflow def login_to_admin_section admin_role = Spree::Role.find_or_create_by_name!('admin') - admin_user = Spree::User.create!({ - :email => 'admin@ofn.org', + admin_user = create(:user, :password => 'passw0rd', :password_confirmation => 'passw0rd', :remember_me => false, :persistence_token => 'pass', - :login => 'admin@ofn.org'}) + :login => 'admin@ofn.org') admin_user.spree_roles << admin_role