mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-03-03 02:21:33 +00:00
Remove old landing page cruft
This commit is contained in:
@@ -69,17 +69,4 @@ class EnterprisesController < BaseController
|
||||
|
||||
redirect_to main_app.shop_path
|
||||
end
|
||||
|
||||
# essentially the new 'show' action that renders non-spree view
|
||||
# will need to be renamed into show once the old one is removed
|
||||
def shop_front
|
||||
options = {:enterprise_id => params[:id]}
|
||||
options.merge(params.reject { |k,v| k == :id })
|
||||
|
||||
@enterprise = Enterprise.find params[:id]
|
||||
|
||||
@searcher = Spree::Config.searcher_class.new(options)
|
||||
@products = @searcher.retrieve_products
|
||||
render :layout => "landing_page"
|
||||
end
|
||||
end
|
||||
|
||||
@@ -1,11 +0,0 @@
|
||||
module TempLandingPageHelper
|
||||
def temp_landing_page_distributor_link_class(distributor)
|
||||
cart = current_order(true)
|
||||
@active_distributors ||= Enterprise.distributors_with_active_order_cycles
|
||||
|
||||
klass = "shop-distributor"
|
||||
klass += " empties-cart" unless cart.line_items.empty? || cart.distributor == distributor
|
||||
klass += @active_distributors.include?(distributor) ? ' active' : ' inactive'
|
||||
klass
|
||||
end
|
||||
end
|
||||
@@ -1,66 +0,0 @@
|
||||
!!!
|
||||
%html
|
||||
%head
|
||||
%meta{charset: 'utf-8'}/
|
||||
%meta{name: 'viewport', content: "width=device-width,initial-scale=1.0"}/
|
||||
|
||||
%title Welcome to Open Food Network
|
||||
= favicon_link_tag "favicon.png"
|
||||
= stylesheet_link_tag "search/all"
|
||||
= javascript_include_tag "search/all"
|
||||
= javascript_include_tag "store/shop_front"
|
||||
= render "layouts/bugherd_script"
|
||||
|
||||
= csrf_meta_tags
|
||||
%body
|
||||
%nav.top-bar
|
||||
%section.top-bar-section
|
||||
%ul.left
|
||||
%li= link_to image_tag("ofn_logo_small.png"), new_landing_page_path
|
||||
%li.divider
|
||||
- if spree_current_user.nil?
|
||||
%li#login-link= link_to "Login", "#sidebar", id: "sidebarLoginButton", class: "sidebar-button"
|
||||
%li#login-name.hide
|
||||
%li.divider
|
||||
%li#sign-up-link= link_to "Sign Up", "#sidebar", id: "sidebarSignUpButton", class: "sidebar-button"
|
||||
%li#sign-out-link.hide= link_to "Sign Out", "/logout"
|
||||
- else
|
||||
%li#login-link.hide= link_to "Login", "#sidebar", id: "sidebarLoginButton", class: "sidebar-button"
|
||||
%li#login-name= link_to "#{spree_current_user.email}", "#"
|
||||
%li.divider
|
||||
%li#sign-up-link.hide= link_to "Sign Up", "#"
|
||||
%li#sign-out-link= link_to "Sign Out", "/logout"
|
||||
|
||||
%section{ role: "main" }
|
||||
.row.landing-page-row.with-bottom-border
|
||||
.large-12.columns.centered
|
||||
= image_tag "ofn_logo_black.png"
|
||||
.row.landing-page-row.with-bottom-border.with-pin-bg
|
||||
.large-12.columns.centered
|
||||
%h3 WHERE WOULD YOU LIKE TO SHOP?
|
||||
%p.secondary Select your hub from the list below
|
||||
- if Rails.env.development? || Rails.env.staging?
|
||||
.large-12.columns.centered
|
||||
#environment= Rails.env.capitalize
|
||||
|
||||
- @groups.in_groups_of(4, false) do |row|
|
||||
.row.landing-page-row.hub_group{:class => (row.last == @groups.last ? "with-bottom-border" : "")}
|
||||
- row.each do |group|
|
||||
.large-3.columns
|
||||
.group-header
|
||||
%h5= group.name.upcase
|
||||
- group.enterprises.is_distributor.by_name.each do |distributor|
|
||||
.row.distributor-link-row
|
||||
.large-12.columns
|
||||
= render partial: "shared/distributor", object: distributor
|
||||
|
||||
= render partial: "shared/footer"
|
||||
|
||||
|
||||
|
||||
%section#sidebar{ role: "complementary" }
|
||||
.login-panel
|
||||
#login-content.hide
|
||||
= render "home/login"
|
||||
#sign-up-content.hide
|
||||
= render "home/signup"
|
||||
@@ -1,52 +0,0 @@
|
||||
!!!
|
||||
%html
|
||||
%head
|
||||
%meta{charset: 'utf-8'}/
|
||||
%meta{name: 'viewport', content: "width=device-width,initial-scale=1.0"}/
|
||||
|
||||
%title= content_for?(:title) ? yield(:title) : 'Welcome to Open Food Network'
|
||||
= favicon_link_tag "favicon.png"
|
||||
= stylesheet_link_tag "search/all"
|
||||
= javascript_include_tag "search/all"
|
||||
= render "layouts/bugherd_script"
|
||||
|
||||
= csrf_meta_tags
|
||||
%body.off-canvas
|
||||
= render "layouts/become_distributor"
|
||||
= render "layouts/become_farmer"
|
||||
|
||||
%nav.top-bar
|
||||
%section.top-bar-section
|
||||
%ul.left
|
||||
%li= link_to image_tag("ofn_logo_small.png"), new_landing_page_path
|
||||
%li.divider
|
||||
- if spree_current_user.nil?
|
||||
%li#login-link= link_to "Login", "#sidebar", id: "sidebarLoginButton", class: "sidebar-button"
|
||||
%li#login-name.hide
|
||||
%li.divider
|
||||
%li#sign-up-link= link_to "Sign Up", "#sidebar", id: "sidebarSignUpButton", class: "sidebar-button"
|
||||
%li#sign-out-link.hide= link_to "Sign Out", "/logout"
|
||||
- else
|
||||
%li#login-link.hide= link_to "Login", "#sidebar", id: "sidebarLoginButton", class: "sidebar-button"
|
||||
%li#login-name= link_to "#{spree_current_user.email}", "#"
|
||||
%li.divider
|
||||
%li#sign-up-link.hide= link_to "Sign Up", "#"
|
||||
%li#sign-out-link= link_to "Sign Out", "/logout"
|
||||
|
||||
%ul.right
|
||||
%li= link_to "Distributors", "#", :data => { "reveal-id" => "become-distributor" }
|
||||
%li.divider
|
||||
%li= link_to "Farmers", "#", :data => { "reveal-id" => "become-farmer" }
|
||||
|
||||
%section{ role: "main" }
|
||||
= yield
|
||||
|
||||
%section#sidebar{ role: "complementary" }
|
||||
.login-panel
|
||||
#login-content.hide
|
||||
= render "home/login"
|
||||
#sign-up-content.hide
|
||||
= render "home/signup"
|
||||
|
||||
= yield :scripts
|
||||
|
||||
@@ -68,7 +68,6 @@ Openfoodnetwork::Application.routes.draw do
|
||||
end
|
||||
end
|
||||
|
||||
get "new_landing_page", :controller => 'home', :action => "new_landing_page"
|
||||
get "about_us", :controller => 'home', :action => "about_us"
|
||||
|
||||
namespace :open_food_network do
|
||||
|
||||
@@ -1,5 +0,0 @@
|
||||
require 'spec_helper'
|
||||
|
||||
describe TempLandingPageHelper do
|
||||
|
||||
end
|
||||
Reference in New Issue
Block a user