Skip to content

Commit

Permalink
Move add_inline_comment content to the view itself
Browse files Browse the repository at this point in the history
Co-authored-by: Bernhard M. Wiedemann <bwiedemann@suse.de>
  • Loading branch information
rubhanazeem and bmwiedemann committed Mar 27, 2023
1 parent aec566d commit 91248ae
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion src/api/app/components/diff_component.html.haml
Original file line number Diff line number Diff line change
Expand Up @@ -29,4 +29,11 @@
locals: { comment: Comment.new, commentable: commentable, diff_ref: id })
- else
.comments-list
= render(partial: 'webui/request/add_inline_comment', locals: { commentable: commentable, diff_ref: id })
-# rubocop:disable ViewComponent/AvoidGlobalState
- if User.session
= link_to(request_inline_comment_path(commentable.bs_request, commentable, id),
class: 'btn btn-sm btn-primary line-new-comment', remote: true, title: 'Add comment') do
%i.fas.fa-comment-medical
.visually-hidden
Add comment
-# rubocop:enable ViewComponent/AvoidGlobalState

0 comments on commit 91248ae

Please sign in to comment.