From d643f7e89361963195672eaebcf822e96984efb7 Mon Sep 17 00:00:00 2001 From: Pistos Date: Sat, 29 Oct 2011 00:42:09 -0400 Subject: [PATCH] Make the donation form (right sidebar) optional. Show or hide via application.yml . --- app/views/shared/_right_sections.html.haml | 19 ++++++++++--------- config/application.yml.example | 7 +++++-- 2 files changed, 15 insertions(+), 11 deletions(-) diff --git a/app/views/shared/_right_sections.html.haml b/app/views/shared/_right_sections.html.haml index 6906e7ca0..fc2066823 100644 --- a/app/views/shared/_right_sections.html.haml +++ b/app/views/shared/_right_sections.html.haml @@ -69,13 +69,14 @@ .content != t('bookmarklet.explanation', :link => link_to(t('bookmarklet.explanation_link_text'), bookmarklet)) -.section - .title - = image_tag('/images/icons/coffee.png') - %h5 - = t('aspects.index.donate') - .content - = t('aspects.index.keep_us_running', :pod => URI.parse(AppConfig[:pod_url]).host) - %br - = render 'shared/donate' +- if ! AppConfig['do_not_request_donations'] + .section + .title + = image_tag('/images/icons/coffee.png') + %h5 + = t('aspects.index.donate') + .content + = t('aspects.index.keep_us_running', :pod => URI.parse(AppConfig[:pod_url]).host) + %br + = render 'shared/donate' diff --git a/config/application.yml.example b/config/application.yml.example index c2817d5ce..0f65c2e1d 100644 --- a/config/application.yml.example +++ b/config/application.yml.example @@ -67,6 +67,9 @@ defaults: &defaults # Email to send spotlight suggestions to spotlight_suggest_email: '' + # Set this to true to remove the donation request form in the right sidebar + do_not_request_donations: false + # List of users who have admin privileges # (expressed as an array of local usernames) admins: @@ -183,10 +186,10 @@ defaults: &defaults # The location of your redis cache. # IMPORTANT: DO NOT CHANGE THIS IF YOU DO NOT KNOW WHAT YOU ARE DOING! - # + # # Leave this blank to use the same Redis database # that your Resque workers use (happy path). - # + # # This takes an ip (or DNS record). It assumes that your Redis database # is running on the default Redis port. redis_location: ''