summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjessib <jessib@leap.se>2013-03-26 12:45:11 -0700
committerAzul <azul@leap.se>2013-07-17 10:47:12 +0200
commit4a334ce6f6163c2bfa11f3e2146b9d0b765b6d7b (patch)
tree4dfb6802dfe7f42a61579ec5bd70a18fa5f8ccab
parentdbd09966553e2fa64211b89f8fae64ddd1e822ca (diff)
Adding some links, which will be removed.
-rw-r--r--app/views/layouts/_navigation.html.haml1
-rw-r--r--billing/app/controllers/billing_base_controller.rb9
-rw-r--r--billing/app/controllers/customer_controller.rb2
-rw-r--r--users/app/views/overviews/show.html.haml1
4 files changed, 12 insertions, 1 deletions
diff --git a/app/views/layouts/_navigation.html.haml b/app/views/layouts/_navigation.html.haml
index 2f79a22..f29625c 100644
--- a/app/views/layouts/_navigation.html.haml
+++ b/app/views/layouts/_navigation.html.haml
@@ -3,4 +3,5 @@
= link_to_navigation t(:account_settings), edit_user_path(@user), :active => controller?(:users)
= link_to_navigation t(:email_settings), edit_user_email_settings_path(@user), :active => controller?(:email_settings)
= link_to_navigation t(:support_tickets), auto_tickets_path, :active => controller?(:tickets)
+ = link_to_navigation t(:billing_settings), new_customer_path, :active => controller?(:customer, :payments, :subscription)
= link_to_navigation t(:logout), logout_path, :method => :delete
diff --git a/billing/app/controllers/billing_base_controller.rb b/billing/app/controllers/billing_base_controller.rb
new file mode 100644
index 0000000..b7f449c
--- /dev/null
+++ b/billing/app/controllers/billing_base_controller.rb
@@ -0,0 +1,9 @@
+class BillingBaseController < ApplicationController
+ before_filter :assign_user
+
+ # required for navigation to work.
+ def assign_user
+ @user = current_user
+ end
+
+end
diff --git a/billing/app/controllers/customer_controller.rb b/billing/app/controllers/customer_controller.rb
index e6bf76b..8b4b124 100644
--- a/billing/app/controllers/customer_controller.rb
+++ b/billing/app/controllers/customer_controller.rb
@@ -1,4 +1,4 @@
-class CustomerController < ApplicationController
+class CustomerController < BillingBaseController
before_filter :authorize
def new
diff --git a/users/app/views/overviews/show.html.haml b/users/app/views/overviews/show.html.haml
index 898cfa0..86ae297 100644
--- a/users/app/views/overviews/show.html.haml
+++ b/users/app/views/overviews/show.html.haml
@@ -19,3 +19,4 @@
%li= icon('user') + link_to(t(:overview_account), edit_user_path(@user))
%li= icon('envelope') + link_to(t(:overview_email), edit_user_email_settings_path(@user))
%li= icon('question-sign') + link_to(t(:overview_tickets), user_tickets_path(@user))
+ %li= icon('shopping-cart') + link_to(t(:overview_billing), new_customer_path)