mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-03-01 02:03:22 +00:00
Pretties, fixing the email validation issue with admin authentication steps
This commit is contained in:
BIN
app/assets/images/logo.png
Normal file
BIN
app/assets/images/logo.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 3.1 KiB |
12
app/assets/stylesheets/darkswarm/footer.sass
Normal file
12
app/assets/stylesheets/darkswarm/footer.sass
Normal 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
|
||||
@@ -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
|
||||
|
||||
|
||||
|
||||
|
||||
1
app/assets/stylesheets/darkswarm/variables.css.sass
Normal file
1
app/assets/stylesheets/darkswarm/variables.css.sass
Normal file
@@ -0,0 +1 @@
|
||||
$fawn: #f6efe5
|
||||
@@ -1 +0,0 @@
|
||||
About Us
|
||||
@@ -1 +0,0 @@
|
||||
Contact Us
|
||||
3
app/views/shared/_copyright.html.haml
Normal file
3
app/views/shared/_copyright.html.haml
Normal file
@@ -0,0 +1,3 @@
|
||||
#copyright.text-center
|
||||
%img.copyright{src: "/assets/logo.png", alt: "Open Food Network"}
|
||||
© Copyright 2013 Open Food Foundation
|
||||
3
app/views/shop/_about_us.html.haml
Normal file
3
app/views/shop/_about_us.html.haml
Normal file
@@ -0,0 +1,3 @@
|
||||
.about.right.text-right.small-2.large-3.columns
|
||||
%h3 About Us
|
||||
%p= @distributor.long_description.andand.html_safe
|
||||
8
app/views/shop/_contact_us.html.haml
Normal file
8
app/views/shop/_contact_us.html.haml
Normal 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
|
||||
@@ -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"
|
||||
|
||||
@@ -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}"
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user