mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-03-27 06:05:19 +00:00
Renaming ShopController to Shop::ShopController
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
class ShopController < BaseController
|
||||
class Shop::ShopController < BaseController
|
||||
layout "darkswarm"
|
||||
|
||||
before_filter :set_distributor
|
||||
@@ -22,12 +22,12 @@ class ShopController < BaseController
|
||||
if request.post?
|
||||
if oc = OrderCycle.with_distributor(@distributor).active.find_by_id(params[:order_cycle_id])
|
||||
current_order(true).set_order_cycle! oc
|
||||
render partial: "shop/order_cycle"
|
||||
render partial: "shop/shop/order_cycle"
|
||||
else
|
||||
render status: 404, json: ""
|
||||
end
|
||||
else
|
||||
render partial: "shop/order_cycle"
|
||||
render partial: "shop/shop/order_cycle"
|
||||
end
|
||||
end
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
%ordercycle{"ng-controller" => "OrderCycleCtrl"}
|
||||
|
||||
:javascript
|
||||
angular.module('Shop').value('orderCycleData', #{render "shop/order_cycle"})
|
||||
angular.module('Shop').value('orderCycleData', #{render "shop/shop/order_cycle"})
|
||||
|
||||
|
||||
- if @order_cycles.empty?
|
||||
@@ -10,8 +10,8 @@
|
||||
Please contact your hub directly to see if they accept late orders,
|
||||
or wait until the next cycle opens.
|
||||
|
||||
= render partial: "shop/next_order_cycle"
|
||||
= render partial: "shop/last_order_cycle"
|
||||
= render partial: "shop/shop/next_order_cycle"
|
||||
= render partial: "shop/shop/last_order_cycle"
|
||||
|
||||
- else
|
||||
%form.custom
|
||||
@@ -50,5 +50,5 @@
|
||||
%tr.product-description
|
||||
%td{colspan: 2}{{ product.notes | truncate:80 }}
|
||||
%tr{"ng-repeat" => "variant in product.variants", "ng-show" => "product.show_variants"}
|
||||
= render partial: "shop/variant"
|
||||
= render partial: "shop/shop/variant"
|
||||
%input.button.right{type: :submit, value: "Check Out"}
|
||||
@@ -9,7 +9,7 @@
|
||||
%small
|
||||
%a{href: "/"} Change location
|
||||
|
||||
= render partial: "shop/order_cycles"
|
||||
= render partial: "shop/shop/order_cycles"
|
||||
|
||||
-#%description
|
||||
|
||||
@@ -44,9 +44,9 @@
|
||||
%p Contact
|
||||
|
||||
%products.row
|
||||
= render partial: "shop/products"
|
||||
= render partial: "shop/shop/products"
|
||||
#footer
|
||||
%section.row
|
||||
= render partial: "shop/contact_us"
|
||||
= render partial: "shop/about_us"
|
||||
= render partial: "shop/shop/contact_us"
|
||||
= render partial: "shop/shop/about_us"
|
||||
= render partial: "shared/copyright"
|
||||
@@ -1,7 +1,7 @@
|
||||
Openfoodnetwork::Application.routes.draw do
|
||||
root :to => 'home#temp_landing_page'
|
||||
|
||||
resource :shop, controller: :shop do
|
||||
resource :shop, controller: "shop/shop" do
|
||||
get :products
|
||||
post :order_cycle
|
||||
get :order_cycle
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
require 'spec_helper'
|
||||
|
||||
describe ShopController do
|
||||
describe Shop::ShopController do
|
||||
let(:d) { create(:distributor_enterprise) }
|
||||
|
||||
it "redirects to the home page if no distributor is selected" do
|
||||
Reference in New Issue
Block a user