From fdd048d1e33433072c9d5d26aeda4d217477ac12 Mon Sep 17 00:00:00 2001 From: Holger Hans Peter Freyther Date: Sat, 17 Mar 2012 13:27:06 +0100 Subject: [PATCH] dhl: Start with some empty stuff for a DHL tab This tab will allow you to to manage coupon codes of DHL. --- app/controllers/admin/dhls_controller.rb | 3 +++ app/views/admin/dhls/index.html.erb | 0 config/locales/en.yml | 4 ++++ config/routes.rb | 7 +++++++ lib/sysmocom_dhl_hooks.rb | 5 ++++- 5 files changed, 18 insertions(+), 1 deletion(-) create mode 100644 app/controllers/admin/dhls_controller.rb create mode 100644 app/views/admin/dhls/index.html.erb create mode 100644 config/locales/en.yml diff --git a/app/controllers/admin/dhls_controller.rb b/app/controllers/admin/dhls_controller.rb new file mode 100644 index 0000000..d705c10 --- /dev/null +++ b/app/controllers/admin/dhls_controller.rb @@ -0,0 +1,3 @@ +class Admin::DhlsController < Admin::BaseController + respond_to :html +end diff --git a/app/views/admin/dhls/index.html.erb b/app/views/admin/dhls/index.html.erb new file mode 100644 index 0000000..e69de29 diff --git a/config/locales/en.yml b/config/locales/en.yml new file mode 100644 index 0000000..56f6670 --- /dev/null +++ b/config/locales/en.yml @@ -0,0 +1,4 @@ +--- +en: + dhl: DHL + dhls: DHL diff --git a/config/routes.rb b/config/routes.rb index 1c3c3b6..056be06 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -1,3 +1,10 @@ Rails.application.routes.draw do # Add your extension routes here + namespace :admin do + resources :dhls do + resources :coupons + end + end + + match "/admin/dhl" => 'admin/dhls#index', :as => :admin end diff --git a/lib/sysmocom_dhl_hooks.rb b/lib/sysmocom_dhl_hooks.rb index 9cbd114..59a1a74 100644 --- a/lib/sysmocom_dhl_hooks.rb +++ b/lib/sysmocom_dhl_hooks.rb @@ -1,3 +1,6 @@ class SysmocomDhlHooks < Spree::ThemeSupport::HookListener # custom hooks go here -end \ No newline at end of file + insert_after :admin_tabs do + "<%= tab(:dhls) %>" + end +end