From 94b2cda89d9757443ca385d6434dfcee22c22243 Mon Sep 17 00:00:00 2001 From: David Vandorpe Date: Fri, 3 Jul 2015 23:34:20 +0200 Subject: [PATCH 1/4] Don't show option to add bounty when not logged in Fixes #33 --- app/views/bounties/index.html.erb | 48 +++++++++++++++++-------------- 1 file changed, 26 insertions(+), 22 deletions(-) diff --git a/app/views/bounties/index.html.erb b/app/views/bounties/index.html.erb index 7b9e53c..ca32f68 100644 --- a/app/views/bounties/index.html.erb +++ b/app/views/bounties/index.html.erb @@ -17,33 +17,37 @@ Repo Issue Total bounty - My bounty + <% if coder_signed_in? %> + My bounty + <% end %> <% @issues.each do |issue| %> - <% repo = issue.repository %> - - <%= link_to repo.name, repo %> - <%= link_to issue.title, issue.github_url %> - <%= issue.total_bounty_value %> - -
- <%= form_for find_bounty(issue, current_coder), - url: {action: 'update_or_create'}, - method: :post, - remote: true do |f| %> - <%= f.hidden_field :issue_id %> - <%= f.text_field :absolute_value, - autocomplete: 'off', class: 'form-control text-right'%> - - <%= f.submit(value: 'Put', data: {disable_with: 'Saving'}, - class: 'btn btn-default') %> - + <% repo = issue.repository %> + + <%= link_to repo.name, repo %> + <%= link_to issue.title, issue.github_url %> + <%= issue.total_bounty_value %> + <% if coder_signed_in? %> + +
+ <%= form_for find_bounty(issue, current_coder), + url: {action: 'update_or_create'}, + method: :post, + remote: true do |f| %> + <%= f.hidden_field :issue_id %> + <%= f.text_field :absolute_value, + autocomplete: 'off', class: 'form-control text-right'%> + + <%= f.submit(value: 'Put', data: {disable_with: 'Saving'}, + class: 'btn btn-default') %> + + <% end %> +
+ <% end %> -
- - + <% end %> From 332ac2d6f00d622696b4c2ce107cba387ca7b97f Mon Sep 17 00:00:00 2001 From: David Vandorpe Date: Sat, 4 Jul 2015 02:30:49 +0200 Subject: [PATCH 2/4] Make repositories on Top4 page clickable Closes #30 --- app/views/top4/show.html.erb | 150 ++++++++++++++++++++--------------- 1 file changed, 84 insertions(+), 66 deletions(-) diff --git a/app/views/top4/show.html.erb b/app/views/top4/show.html.erb index 5e741b7..961f467 100644 --- a/app/views/top4/show.html.erb +++ b/app/views/top4/show.html.erb @@ -4,7 +4,6 @@ -
@@ -78,8 +77,15 @@
From ca9b095e9fed04a004b72346a99bc8fca20c1cd8 Mon Sep 17 00:00:00 2001 From: David Vandorpe Date: Sat, 4 Jul 2015 15:11:41 +0200 Subject: [PATCH 3/4] Make top4 repo links look like links --- app/assets/stylesheets/application.css.scss | 5 +++++ app/views/top4/show.html.erb | 3 ++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/app/assets/stylesheets/application.css.scss b/app/assets/stylesheets/application.css.scss index 8e59368..502aca5 100644 --- a/app/assets/stylesheets/application.css.scss +++ b/app/assets/stylesheets/application.css.scss @@ -28,3 +28,8 @@ .table:last-child { margin-bottom: 0px; } + +/* Allow non- elements to look exactly like elements */ +.hyperlink { + @extend a; +} diff --git a/app/views/top4/show.html.erb b/app/views/top4/show.html.erb index 961f467..8cc0b59 100644 --- a/app/views/top4/show.html.erb +++ b/app/views/top4/show.html.erb @@ -213,7 +213,8 @@ var xAxis = d3.svg.axis() d3.select(this).on("click",function(){ // on click, redirect window.location.href = urls_map[d]; - }); + }) + .classed("hyperlink",true); return d; } ); From 0f62b8c61c84690a50b3eb544b55c29c1fbec2e7 Mon Sep 17 00:00:00 2001 From: David Vandorpe Date: Sat, 4 Jul 2015 20:45:48 +0200 Subject: [PATCH 4/4] Gave top4 contributors and top4 repos equal height As discussed with iasoon on slack --- app/assets/stylesheets/top4.css.scss | 19 ++++++++++++------- app/views/top4/show.html.erb | 2 +- 2 files changed, 13 insertions(+), 8 deletions(-) diff --git a/app/assets/stylesheets/top4.css.scss b/app/assets/stylesheets/top4.css.scss index 5be90df..84cef4b 100644 --- a/app/assets/stylesheets/top4.css.scss +++ b/app/assets/stylesheets/top4.css.scss @@ -2,15 +2,20 @@ // They will automatically be included in application.css. // You can use Sass (SCSS) here: http://sass-lang.com/ -.top4.toprow { - height: 300px; +.toprow { + // At 992 px the ordinal bar graph drops down + @media (min-width: 992px) { + height: 300px; + } + + .top4, .panel, #top-coders, #top-repos { + height: 100%; + } } div.top4 { margin: auto; - .panel { - height: 100%; - } + #top-coders { td { @@ -21,7 +26,7 @@ div.top4 { font-size: 20pt; text-align: right; width: 45px; - height: 45px; + height: 20%; } .avatar { width: 45px; @@ -39,7 +44,7 @@ div.top4 { tr:first-child { width: 90px; - height: 90px; + height: 40%; .name { font-size: 15pt; } diff --git a/app/views/top4/show.html.erb b/app/views/top4/show.html.erb index 8cc0b59..443bedb 100644 --- a/app/views/top4/show.html.erb +++ b/app/views/top4/show.html.erb @@ -4,7 +4,7 @@ -
+