forked from tip4commit/tip4commit
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
project collaborators can decide tip amount of undecided tips
- Loading branch information
Showing
13 changed files
with
149 additions
and
22 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
= bootstrap_form_for @project, url: decide_tip_amounts_project_path(@project) do |f| | ||
%table.table | ||
%thead | ||
%tr | ||
%th Commit | ||
%th Tip (relative to the project balance) | ||
%tbody | ||
= f.fields_for(:tips, @project.tips.undecided) do |tip_fields| | ||
= tip_fields.hidden_field :id | ||
- tip = tip_fields.object | ||
%tr | ||
%td | ||
= link_to tip.commit, tip.commit_url | ||
%td | ||
- radios = {} | ||
- radios["Undecided"] = "" | ||
- radios["Free: 0%"] = "0" | ||
- radios["Tiny: 0.1%"] = "0.1" | ||
- radios["Small: 0.5%"] = "0.5" | ||
- radios["Normal: 1%"] = "1" | ||
- radios["Big: 2%"] = "2" | ||
- radios["Huge: 5%"] = "5" | ||
= tip_fields.radio_buttons(:amount_percentage, radios, inline: true, label: false) | ||
.text-center | ||
= f.submit 'Send the selected tip amounts' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
When(/^I choose the amount "(.*?)" on commit "(.*?)"$/) do |arg1, arg2| | ||
within find("tr", text: arg2) do | ||
choose arg1 | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters