Skip to content

Commit

Permalink
Move Report component call outside the comment list
Browse files Browse the repository at this point in the history
Project, package and request pages use the comment list. The project and
package pages already call the Report component. The request view didn't.

Call the Report component from the `request/_request_comments partial`,
so we can get rid of the call of the Report component in the
`comment/_show` partial, wich is redundant for projects and packages.
  • Loading branch information
eduardoj authored and danidoni committed Sep 25, 2023
1 parent a028e42 commit ff30e4e
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 0 additions & 2 deletions src/api/app/views/webui/comment/_show.html.haml
@@ -1,4 +1,2 @@
.comments-list{ data: { comment_counter: local_assigns[:comment_counter_id] } }
= render partial: 'webui/comment/comment_list', locals: { commentable: commentable }

= render ReportComponent.new()
2 changes: 2 additions & 0 deletions src/api/app/views/webui/request/_request_comments.html.haml
Expand Up @@ -23,3 +23,5 @@
.tab-pane.fade.show{ id: "superseded-#{superseded.number}" }
= render partial: 'webui/comment/show', locals: { commentable: superseded,
comment_counter_id: "#comment-counter-request-#{superseded.number}" }

= render ReportComponent.new(reportable: bs_request)

0 comments on commit ff30e4e

Please sign in to comment.