Skip to content

Commit

Permalink
Merge pull request #5190 from Ana06/succeed
Browse files Browse the repository at this point in the history
Refactor how we render superseded requests list
  • Loading branch information
Ana06 committed Jun 22, 2018
2 parents d0450c5 + 4a5709f commit aa0c1fc
Showing 1 changed file with 3 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,10 @@
.ui-state-info.ui-corner-all.ui-widget-shadow.padding-10pt#request-supersedes-hint
%span.ui-icon.ui-icon-info
This request supersedes:
- superseding.each_with_index do |bs_request, index|
- superseding.each do |bs_request|
= link_to "request #{bs_request.number}", request_show_path(number: bs_request.number)
= succeed (', ' if index < superseding.length - 1) do
= surround '(', ')' do
= link_to('Show diff', request_show_path(number: bs_request.superseded_by, diff_to_superseded: bs_request.number))
= surround '(', ")#{', ' unless bs_request == superseding.last }" do
= link_to('Show diff', request_show_path(number: bs_request.superseded_by, diff_to_superseded: bs_request.number))
- if superseded_by.present?
.grid_16.alpha.omega.box-invisible
.ui-state-info.ui-corner-all.ui-widget-shadow.padding-10pt#request-superseded-by-hint
Expand Down

0 comments on commit aa0c1fc

Please sign in to comment.