From fef97314cb593fdf307b1a10e65bfb61d6884dc6 Mon Sep 17 00:00:00 2001 From: Rob Harrington Date: Wed, 22 Oct 2014 18:26:18 +1100 Subject: [PATCH] Adding basic layout of welcome page for new users --- app/assets/stylesheets/admin/welcome.css.sass | 49 +++++++++++++++ .../admin/overview_controller_decorator.rb | 2 +- .../spree/admin/overview/welcome.html.haml | 61 ++++++++++++++++++- app/views/spree/layouts/bare_admin.html.haml | 23 +++++++ 4 files changed, 133 insertions(+), 2 deletions(-) create mode 100644 app/assets/stylesheets/admin/welcome.css.sass create mode 100644 app/views/spree/layouts/bare_admin.html.haml diff --git a/app/assets/stylesheets/admin/welcome.css.sass b/app/assets/stylesheets/admin/welcome.css.sass new file mode 100644 index 0000000000..a575a96666 --- /dev/null +++ b/app/assets/stylesheets/admin/welcome.css.sass @@ -0,0 +1,49 @@ +#welcome_page + color: #000000 + h1, h2, h3, h4, h5, h6 + color: #000000 + + .plain_text + font-size: 16px + + + #welcome + text-align: center + margin: 50px 0px + h1 + margin-bottom: 10px + + #next_steps + text-align: center + margin-bottom: 50px + h1 + margin-bottom: 10px + + .options + .option + .selector + border: 3px solid black + border-radius: 12px 12px 0px 0px + text-align: center + margin-bottom: 20px + .top + min-height: 113px + padding: 15px 8px + h2 + margin-bottom: 10px + .bottom + border-top: 3px solid black + padding: 8px 0px + + &.disabled + color: #b0b0b0 + .selector + border-color: #b0b0b0 + h1, h2, h3, h4, h5, h6 + color: #b0b0b0 + .bottom + border-top-color: #b0b0b0 + + .description + font-size: 16px + text-align: justify \ No newline at end of file diff --git a/app/controllers/spree/admin/overview_controller_decorator.rb b/app/controllers/spree/admin/overview_controller_decorator.rb index 714c3996cd..74535d5dd7 100644 --- a/app/controllers/spree/admin/overview_controller_decorator.rb +++ b/app/controllers/spree/admin/overview_controller_decorator.rb @@ -8,7 +8,7 @@ Spree::Admin::OverviewController.class_eval do if spree_current_user.manages_one_enterprise? @enterprise = @enterprises.first if @enterprise.sells == "unspecified" - render "welcome" + render "welcome", layout: "spree/layouts/bare_admin" else render "single_enterprise_dashboard" end diff --git a/app/views/spree/admin/overview/welcome.html.haml b/app/views/spree/admin/overview/welcome.html.haml index 01f3f00c63..a65909896e 100644 --- a/app/views/spree/admin/overview/welcome.html.haml +++ b/app/views/spree/admin/overview/welcome.html.haml @@ -1 +1,60 @@ -Welcome \ No newline at end of file +#welcome_page.sixteen.columns.alpha{ ng: { controller: 'WelcomeCtrl' } } + #welcome + %h1 Welcome to the Open Food Network! + %h6= "You have successfully created a#{" producer" if @enterprise.is_primary_producer} profile" + + #next_steps + %h1 Next Steps + .plain_text + Choose how you would like to use + %br/ + the Open Food Network + + .options.sixteen.columns.alpha + - if @enterprise.is_primary_producer + .basic_producer.option.one-third.column.alpha + .selector + .top + %h2 Basic Producer + .plain_text Supply only + .bottom + %h5 ALWAYS FREE + .description + You want to use OFN as a place for people to find and contact you. + You can also add your products, allowing customers to see your product range and allowing you to act as a supplier to other shopfronts. + + .producer_shop.option.one-third.column + .selector + .top + %h2 Producer with Shop + .plain_text Sell your products through an OFN shopfront + .bottom + %h5 30 DAY TRIAL + .description + Test out having your own shopfront with full access to all Shopfront features for 30 days. + After your trial expires you can keep your Shopfront for a subscription cost of $50 per month. + + .full_hub.option.one-third.column.omega.disabled + .selector + .top.center + %h2 Full Hub + .plain_text Sell other producers' products through an OFN shopfront + .bottom.center + %h5 COMING SOON + .description + You want to offer other producers' products for sale as well as your own, establish and coodinate trading relationships with other enterprises and + A full hub subscription gives you access to our complete suite of features for managing your food enterprise. + + - else + .shop_profile.option.one-third.column.alpha + .button + .top.center + %h2 Shop Profile + .plain_text Get a listing + .bottom.center + %h5 ALWAYS FREE + .description + You want to use OFN as a place for people to find and contact you. + + // Coming soon - Full Hub + // Email us if you want this option \ No newline at end of file diff --git a/app/views/spree/layouts/bare_admin.html.haml b/app/views/spree/layouts/bare_admin.html.haml new file mode 100644 index 0000000000..8440252350 --- /dev/null +++ b/app/views/spree/layouts/bare_admin.html.haml @@ -0,0 +1,23 @@ +%html{ lang: "en" } + %head{"data-hook" => "admin_inside_head"}= render :partial => 'spree/admin/shared/head' + %body.admin{"data-ajax-root-path" => spree.root_path} + #wrapper{"data-hook" => ""} + - if flash[:error] + .flash.error= flash[:error] + - if notice + .flash.notice= notice + - if flash[:success] + .flash.success= flash[:success] + #progress + .wrapper + #spinner + .progress-message + = t(:loading) + \... + = render :partial => 'spree/admin/shared/alert', :collection => session[:alerts] + .container + .row + #content{"data-hook" => ""} + %div{:class => "sixteen columns"} + = yield + %div{"data-hook" => "admin_footer_scripts"} \ No newline at end of file