diff options
Diffstat (limited to 'app')
-rw-r--r-- | app/helpers/application_helper.rb | 5 | ||||
-rw-r--r-- | app/views/home/index.html.haml | 2 | ||||
-rw-r--r-- | app/views/layouts/_navigation.html.haml | 1 |
3 files changed, 8 insertions, 0 deletions
diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb index 1e79990..cdc34ea 100644 --- a/app/helpers/application_helper.rb +++ b/app/helpers/application_helper.rb @@ -37,4 +37,9 @@ module ApplicationHelper html_escape(msg).gsub('[b]', '<b>').gsub('[/b]', '</b>').html_safe end + def engine_enabled(name) + # to disable engine, comment it out in Gemfile (and make sure to re-run bundle install) + Rails::Application::Railties.engines.any? {|eng| eng.class.to_s == "#{name}::Engine"} + end + end diff --git a/app/views/home/index.html.haml b/app/views/home/index.html.haml index 0d1ac73..728b5b8 100644 --- a/app/views/home/index.html.haml +++ b/app/views/home/index.html.haml @@ -13,3 +13,5 @@ %hr %p = link_to "fetch a cert", cert_path +- # TODO: will want link to donation (anonymous payment), which is new_payment_path + diff --git a/app/views/layouts/_navigation.html.haml b/app/views/layouts/_navigation.html.haml index 3d094a6..fb018a9 100644 --- a/app/views/layouts/_navigation.html.haml +++ b/app/views/layouts/_navigation.html.haml @@ -2,4 +2,5 @@ = link_to_navigation t(:overview), user_overview_path(@user), :active => controller?(:overviews) = link_to_navigation t(:account_settings), edit_user_path(@user), :active => controller?(:users) = link_to_navigation t(:support_tickets), auto_tickets_path, :active => controller?(:tickets) + = link_to_navigation t(:billing_settings), show_or_new_customer_link(@user), :active => controller?(:customer, :payments, :subscriptions, :credit_card_info) if engine_enabled('LeapWebBilling') = link_to_navigation t(:logout), logout_path, :method => :delete |