From aa53d8238655d544c6557fe12d28d23c05781d36 Mon Sep 17 00:00:00 2001 From: Rohan Mitchell Date: Thu, 15 May 2014 12:19:48 +1000 Subject: [PATCH] Add stub page for managing enterprise relationships --- .../admin/enterprise_relationships_controller.rb | 7 +++++++ app/views/admin/enterprise_relationships/index.html.haml | 8 ++++++++ app/views/admin/enterprises/index.html.erb | 2 ++ app/views/admin/shared/_enterprises_sub_menu.html.haml | 4 ++++ config/routes.rb | 2 ++ 5 files changed, 23 insertions(+) create mode 100644 app/controllers/admin/enterprise_relationships_controller.rb create mode 100644 app/views/admin/enterprise_relationships/index.html.haml create mode 100644 app/views/admin/shared/_enterprises_sub_menu.html.haml diff --git a/app/controllers/admin/enterprise_relationships_controller.rb b/app/controllers/admin/enterprise_relationships_controller.rb new file mode 100644 index 0000000000..7959b9d9b5 --- /dev/null +++ b/app/controllers/admin/enterprise_relationships_controller.rb @@ -0,0 +1,7 @@ +module Admin + class EnterpriseRelationshipsController < ResourceController + def index + + end + end +end diff --git a/app/views/admin/enterprise_relationships/index.html.haml b/app/views/admin/enterprise_relationships/index.html.haml new file mode 100644 index 0000000000..7f2c236d82 --- /dev/null +++ b/app/views/admin/enterprise_relationships/index.html.haml @@ -0,0 +1,8 @@ +- content_for :page_title do + Enterprise Relationships + += render 'admin/shared/enterprises_sub_menu' + +%table#enterprise-relationships + %tr + %td Hello, world. diff --git a/app/views/admin/enterprises/index.html.erb b/app/views/admin/enterprises/index.html.erb index d2917bcc45..1795b17950 100644 --- a/app/views/admin/enterprises/index.html.erb +++ b/app/views/admin/enterprises/index.html.erb @@ -8,6 +8,8 @@ <% end %> +<%= render 'admin/shared/enterprises_sub_menu' %> + <%= form_for @enterprise_set, :url => main_app.bulk_update_admin_enterprises_path do |f| %> diff --git a/app/views/admin/shared/_enterprises_sub_menu.html.haml b/app/views/admin/shared/_enterprises_sub_menu.html.haml new file mode 100644 index 0000000000..57ce5e9194 --- /dev/null +++ b/app/views/admin/shared/_enterprises_sub_menu.html.haml @@ -0,0 +1,4 @@ += content_for :sub_menu do + %ul#sub_nav.inline-menu{"data-hook" => "admin_order_sub_tabs"} + = tab :enterprises, url: main_app.admin_enterprises_path + = tab :relationships, url: main_app.admin_enterprise_relationships_path diff --git a/config/routes.rb b/config/routes.rb index 310d1d9e4d..973cb288cc 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -41,6 +41,8 @@ Openfoodnetwork::Application.routes.draw do post :bulk_update, :on => :collection, :as => :bulk_update end + resources :enterprise_relationships + resources :enterprise_fees do post :bulk_update, :on => :collection, :as => :bulk_update end