Skip to content

Commit

Permalink
Merge pull request #4024 from ChrisBr/bugfix/outdated_comments
Browse files Browse the repository at this point in the history
[webui] Only show superseded comment box if there are comments
  • Loading branch information
ChrisBr committed Oct 17, 2017
2 parents 8c9e0a0 + 678bbc9 commit e96bbfb
Showing 1 changed file with 9 additions and 5 deletions.
14 changes: 9 additions & 5 deletions src/api/app/views/webui/request/show.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -211,12 +211,16 @@
<div class="grid_10 alpha">
<% if @superseding %>
<% @superseding.each do |supersed| %>
<div class="grid_10 box box-shadow alpha omega">
<h2 class="box-header"><a class="supersed_comments_link">Show outdated comments</a>for superseded <%= link_to "request #{supersed.number}", number: supersed.number %></h2>
<div class="superseded_comments hidden">
<%= render :partial => 'webui/comment/show', locals: { commentable: supersed } %>
<% if supersed.comments.any? %>
<div class="grid_10 box box-shadow alpha omega">
<h2 class="box-header"><a class="supersed_comments_link">
Show outdated comments</a>for superseded <%= link_to "request #{supersed.number}", number: supersed.number %>
</h2>
<div class="superseded_comments hidden">
<%= render :partial => 'webui/comment/show', locals: { commentable: supersed } %>
</div>
</div>
</div>
<% end %>
<% end %>
<% end %>

Expand Down

0 comments on commit e96bbfb

Please sign in to comment.