From 01ed9fc9d90e70356b9a95353b9a3b7822d604a7 Mon Sep 17 00:00:00 2001 From: Lennart Prelle Date: Wed, 4 Apr 2012 11:44:06 +0200 Subject: [PATCH 1/2] fallback to diaspora donation if no paypal-id is present --- app/views/shared/_donate.html.haml | 11 ----------- app/views/shared/_right_sections.html.haml | 23 ++++++++++++---------- config/locales/diaspora/en.yml | 3 ++- 3 files changed, 15 insertions(+), 22 deletions(-) delete mode 100644 app/views/shared/_donate.html.haml diff --git a/app/views/shared/_donate.html.haml b/app/views/shared/_donate.html.haml deleted file mode 100644 index 38a04b6a6..000000000 --- a/app/views/shared/_donate.html.haml +++ /dev/null @@ -1,11 +0,0 @@ -%form{:action => "https://www.paypal.com/cgi-bin/webscr", :method => "post"} - %input{:name => "cmd", :type => "hidden", :value => "_s-xclick"} - %input{:name => "hosted_button_id", :type => "hidden", :value => AppConfig[:paypal_hosted_button_id]} - %input{:name => "on0", :type => "hidden", :value => "Type"} - %input{:name => "modify", :type => "hidden", :value => "2"} - %select{:name => "os0"} - %option{:value => "Mocha"} Mocha : $3.00USD - %option{:value => "Americano"} Americano : $5.00USD - %option{:value => "Box o' Joe"} Box o' Joe : $20.00USD - %input{:name => "currency_code", :type => "hidden", :value => "USD"} - %input{:name => "submit", :type => "submit", :value => t('aspects.index.donate')} diff --git a/app/views/shared/_right_sections.html.haml b/app/views/shared/_right_sections.html.haml index a8dab6be4..dc550ffa9 100644 --- a/app/views/shared/_right_sections.html.haml +++ b/app/views/shared/_right_sections.html.haml @@ -76,14 +76,17 @@ .content != t('bookmarklet.explanation', :link => link_to(t('bookmarklet.explanation_link_text'), bookmarklet)) -- if AppConfig[:paypal_hosted_button_id].present? - .section - .title - = image_tag('icons/coffee.png') - %h5 - = t('aspects.index.donate') - .content - = t('aspects.index.keep_us_running', :pod => URI.parse(AppConfig[:pod_url]).host) +.section + .title + = image_tag('icons/coffee.png') + %h5 + = t('aspects.index.donate') + .content + - if AppConfig[:paypal_hosted_button_id].present? + = t('aspects.index.keep_pod_running', :pod => URI.parse(AppConfig[:pod_url]).host) %br - = render 'shared/donate' - + = render 'shared/donatepod' + - else + = t('aspects.index.keep_diaspora_running') + %br + = render 'shared/donatediaspora' diff --git a/config/locales/diaspora/en.yml b/config/locales/diaspora/en.yml index 975f575cc..eb0e43dc2 100644 --- a/config/locales/diaspora/en.yml +++ b/config/locales/diaspora/en.yml @@ -167,7 +167,8 @@ en: friends: "Friends" index: donate: "Donate" - keep_us_running: "Keep %{pod} running fast and buy servers their coffee fix with a monthly donation!" + keep_pod_running: "Keep %{pod} running fast and buy servers their coffee fix with a monthly donation!" + keep_diaspora_running: "Keep Diaspora development fast with a monthly donation!" no_tags: "+ Find a tag to follow" unfollow_tag: "Stop following #%{tag}" handle_explanation: "This is your Diaspora ID. Like an email address, you can give this to people to reach you." From c2195a3c22016d9ac71f176a891659b3ee0330f1 Mon Sep 17 00:00:00 2001 From: Lennart Prelle Date: Wed, 4 Apr 2012 11:44:57 +0200 Subject: [PATCH 2/2] new forms --- app/views/shared/_donatediaspora.html.haml | 6 ++++++ app/views/shared/_donatepod.html.haml | 11 +++++++++++ 2 files changed, 17 insertions(+) create mode 100644 app/views/shared/_donatediaspora.html.haml create mode 100644 app/views/shared/_donatepod.html.haml diff --git a/app/views/shared/_donatediaspora.html.haml b/app/views/shared/_donatediaspora.html.haml new file mode 100644 index 000000000..1094f0aa3 --- /dev/null +++ b/app/views/shared/_donatediaspora.html.haml @@ -0,0 +1,6 @@ +%form{:action => "https://diaspora-project-site.heroku.com/donate", :method => "get"} + %select{:name => "monthly_amount"} + %option{:value => "1"} Supporter : $5.00USD + %option{:value => "2"} Member : $10.00USD + %option{:value => "3"} Freedom Fighter : $20.00USD + %input{:name => "submit", :type => "submit", :value => t('aspects.index.donate')} diff --git a/app/views/shared/_donatepod.html.haml b/app/views/shared/_donatepod.html.haml new file mode 100644 index 000000000..38a04b6a6 --- /dev/null +++ b/app/views/shared/_donatepod.html.haml @@ -0,0 +1,11 @@ +%form{:action => "https://www.paypal.com/cgi-bin/webscr", :method => "post"} + %input{:name => "cmd", :type => "hidden", :value => "_s-xclick"} + %input{:name => "hosted_button_id", :type => "hidden", :value => AppConfig[:paypal_hosted_button_id]} + %input{:name => "on0", :type => "hidden", :value => "Type"} + %input{:name => "modify", :type => "hidden", :value => "2"} + %select{:name => "os0"} + %option{:value => "Mocha"} Mocha : $3.00USD + %option{:value => "Americano"} Americano : $5.00USD + %option{:value => "Box o' Joe"} Box o' Joe : $20.00USD + %input{:name => "currency_code", :type => "hidden", :value => "USD"} + %input{:name => "submit", :type => "submit", :value => t('aspects.index.donate')}