From 00571b84cda007c9cc5b0fbdbd842e4859f5551a Mon Sep 17 00:00:00 2001 From: Ilyaaaaaaaaaaaaa Zhitomirskiy Date: Fri, 29 Jul 2011 11:33:04 -0700 Subject: [PATCH] completed donate option --- .../{shared/_donate.html => _donate.html.erb} | 0 app/views/aspects/index.html.haml | 19 +++++++++--------- app/views/shared/_donate.html.erb | 15 ++++++++++++++ config/application.yml.example | 2 ++ config/locales/diaspora/en.yml | 2 ++ public/images/icons/coffee.png | Bin 267 -> 309 bytes 6 files changed, 29 insertions(+), 9 deletions(-) rename app/views/{shared/_donate.html => _donate.html.erb} (100%) create mode 100644 app/views/shared/_donate.html.erb diff --git a/app/views/shared/_donate.html b/app/views/_donate.html.erb similarity index 100% rename from app/views/shared/_donate.html rename to app/views/_donate.html.erb diff --git a/app/views/aspects/index.html.haml b/app/views/aspects/index.html.haml index b5171e8f5..2d2d092ec 100644 --- a/app/views/aspects/index.html.haml +++ b/app/views/aspects/index.html.haml @@ -82,12 +82,13 @@ .content != t('bookmarklet.explanation', :link => link_to(t('bookmarklet.explanation_link_text'), bookmarklet)) - .section - .title - = image_tag('/images/icons/coffee.png') - %h5 - Donate - .content - Keep JoinDiaspora.com running fast, buy our servers their monthly coffee fix! - %br - = render 'shared/donate' + - unless AppConfig[:paypal_hosted_button_id].blank? + .section + .title + = image_tag('/images/icons/coffee.png') + %h5 + = t('.donate') + .content + = t('.keep_us_running', :pod => URI.parse(AppConfig[:pod_url]).host) + %br + = render 'shared/donate' diff --git a/app/views/shared/_donate.html.erb b/app/views/shared/_donate.html.erb new file mode 100644 index 000000000..472aa42a2 --- /dev/null +++ b/app/views/shared/_donate.html.erb @@ -0,0 +1,15 @@ + +
+ + + + + + + +
+ diff --git a/config/application.yml.example b/config/application.yml.example index 6577ffd9d..ddd115f98 100644 --- a/config/application.yml.example +++ b/config/application.yml.example @@ -130,6 +130,8 @@ defaults: &defaults # Set this to true if you want to do everything synchronously instead of using resque, our redis-backed queue system. single_process_mode: true + # Use paypal for recurring donations + paypal_hosted_button_id: '' # Use this section to override default settings in specific environments development: diff --git a/config/locales/diaspora/en.yml b/config/locales/diaspora/en.yml index 22cdb588f..849621c8c 100644 --- a/config/locales/diaspora/en.yml +++ b/config/locales/diaspora/en.yml @@ -147,6 +147,8 @@ en: family: "Family" work: "Work" index: + donate: "Donate" + keep_us_running: "Keep %{pod} running fast, buy our servers their monthly coffee fix!" your_aspects: "Your Aspects" tags_following: "Followed Tags" no_tags: "No tags" diff --git a/public/images/icons/coffee.png b/public/images/icons/coffee.png index ba9540216f5b3461550f8b5047fe201a2640b63c..978cd2a38754e2ff80dbc4212b484ce02010be4e 100644 GIT binary patch delta 235 zcmVs-<0000PbVXQnLvL+uWo~o; zLvm$dbY)~9cWHEJAV*0}P*;Ht7XSbNkV!;AR5;7s(=iS~Q4j^tc0dX8==!$1y-TcNpwoj*F1@c7vIzUNp2>SOy l@H9Wbs>bo8ux`NfJOBukI}OWePr(2H002ovPDHLkV1i)KVK4vy delta 193 zcmV;y06zb<0*eBW7YYgp1^@s6y}sU@ks&{S92Ox9A0%PY0001sNkl_8aPD}2pkH7rUV?<2skWN09D{{Bse6G!@Ns?@WS1jWU|?0GqXEcKCwgf zhXGeCpszhnSmA(kH$&i#Bi5Mb2-N5xo8$(iw1T00X7YuC&ldx3P(E)>X!`K00000NkvXXu0mjf*Aq)X