Merge branch 'max258-develop' into develop

This commit is contained in:
Jonne Haß 2013-08-11 15:32:54 +02:00
commit 041f7b7402
7 changed files with 49 additions and 12 deletions

View file

@ -46,6 +46,7 @@
* Added Wordpress service ability for posts. [#4321](https://github.com/diaspora/diaspora/pull/4321)
* Implement tag search autocomplete in header search box [#4169](https://github.com/diaspora/diaspora/issues/4169)
* Uncheck 'make contacts visible to each other' by default when adding new aspect. [#4343](https://github.com/diaspora/diaspora/issues/4343)
* Add possibility to ask for Bitcoin donations [#4375](https://github.com/diaspora/diaspora/pull/4375)
# 0.1.1.0

View file

@ -1,11 +1,17 @@
%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.settings.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')}
- if AppConfig.settings.paypal_hosted_button_id.present?
PayPal:
%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.settings.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')}
- if AppConfig.settings.bitcoin_wallet_id.present?
Bitcoin:
%input{:type => "text", :id => "bitcoin_address", :value => AppConfig.settings.bitcoin_wallet_id, :readonly => true}

View file

@ -67,7 +67,7 @@
.content
!= t('bookmarklet.explanation', :link => link_to(t('bookmarklet.post_something'), magic_bookmarklet_link))
- if AppConfig.settings.paypal_hosted_button_id.present?
- if AppConfig.settings.paypal_hosted_button_id.present? || AppConfig.settings.bitcoin_wallet_id.present?
.section
.title
.icons-coffee

View file

@ -59,6 +59,7 @@ defaults:
open: true
count: 25
paypal_hosted_button_id:
bitcoin_wallet_id:
community_spotlight:
enable: false
suggest_email:

View file

@ -233,6 +233,11 @@ configuration: ## Section
## we kindly ask your users to donate to the Diaspora Foundation :)
#paypal_hosted_button_id: ""
## Bitcoin donations
## You can provide the bitcoin address here to kindly ask
## your users for donations to run their pod.
#bitcoin_wallet_id: ""
## Community Spotlight
## The community spotlight gives new users a starting point on who
## could be interesting Diasporas community. To add a person

View file

@ -0,0 +1,16 @@
@javascript
Feature: donations
In order to accept donation
As a podmin
I want a donation box shown on the stream page
Background:
Given following user exists:
| username | email |
| Alice | alice@alice.alice |
And I sign in as "alice@alice.alice"
Scenario: Bitcoin donations
Given I have configured a Bitcoin wallet
And I am on the home page
Then I should see the Bitcoin wallet ID

View file

@ -308,3 +308,11 @@ end
When /^I focus the "([^"]+)" field$/ do |field|
find_field(field).click
end
Given /^I have configured a Bitcoin wallet$/ do
AppConfig.settings.bitcoin_wallet_id = "AAAAAA"
end
Then /^I should see the Bitcoin wallet ID$/ do
find("#bitcoin_address")['value'].should == "AAAAAA"
end