Pretties, fixing the email validation issue with admin authentication steps

This commit is contained in:
Will Marshall
2014-01-07 11:04:40 +11:00
parent 9677ec7159
commit 8e0a7d9072
12 changed files with 37 additions and 52 deletions

BIN
app/assets/images/logo.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.1 KiB

View File

@@ -0,0 +1,12 @@
@import variables
#footer
padding: 74px 0px
background: $fawn
margin-top: 85px
#copyright
clear: both
img
display: block
margin: 0px auto 8px

View File

@@ -1,4 +1,5 @@
@import mixins
@import variables
product
display: block
@@ -11,7 +12,7 @@ shop
display: block
navigation
display: block
background: #f6efe5
background: $fawn
distributor.details
box-sizing: border-box
display: block
@@ -101,45 +102,3 @@ shop
float: right
padding-top: 14px
tabs
background: url("/assets/matte.png") top left repeat
display: block
.section-container.auto
margin-bottom: 0
& > 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

View File

@@ -0,0 +1 @@
$fawn: #f6efe5

View File

@@ -1 +0,0 @@
About Us

View File

@@ -1 +0,0 @@
Contact Us

View File

@@ -0,0 +1,3 @@
#copyright.text-center
%img.copyright{src: "/assets/logo.png", alt: "Open Food Network"}
© Copyright 2013 Open Food Foundation

View File

@@ -0,0 +1,3 @@
.about.right.text-right.small-2.large-3.columns
%h3 About Us
%p= @distributor.long_description.andand.html_safe

View File

@@ -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

View File

@@ -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"

View File

@@ -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}"

View File

@@ -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