Extract common layout for assignees
This commit is contained in:
@@ -0,0 +1,16 @@
|
||||
<%= turbo_frame_tag bubble, :assignees do %>
|
||||
<div class="flex">
|
||||
<% bubble.assignees.each do |assignee| %>
|
||||
<%= avatar_tag assignee, loading: :lazy, class: "avatar" %>
|
||||
<% end %>
|
||||
|
||||
<div class="position-relative" data-controller="dialog" data-action="keydown.esc->dialog#close click@document->dialog#closeOnClickOutside">
|
||||
<button class="btn card__hide-on-index <%= bubble.creating? || bubble.drafted? ? "fill-highlight" : "fill-transparent" %>" data-action="click->dialog#open:stop">
|
||||
<%= icon_tag "add" %>
|
||||
<span class="for-screen-reader">Assign</span>
|
||||
</button>
|
||||
|
||||
<%= yield %>
|
||||
</div>
|
||||
</div>
|
||||
<% end %>
|
||||
@@ -1,16 +1,3 @@
|
||||
<%= turbo_frame_tag bubble, :assignees do %>
|
||||
<div class="flex">
|
||||
<% bubble.assignees.each do |assignee| %>
|
||||
<%= avatar_tag assignee, loading: :lazy, class: "avatar" %>
|
||||
<% end %>
|
||||
|
||||
<div class="position-relative" data-controller="dialog" data-action="keydown.esc->dialog#close click@document->dialog#closeOnClickOutside">
|
||||
<button class="btn card__hide-on-index <%= bubble.creating? || bubble.drafted? ? "fill-highlight" : "fill-transparent" %>" data-action="click->dialog#open:stop">
|
||||
<%= icon_tag "add" %>
|
||||
<span class="for-screen-reader">Assign</span>
|
||||
</button>
|
||||
|
||||
<%= turbo_frame_tag bubble, :assignment, src: new_bucket_bubble_assignment_toggle_path(bubble.bucket, bubble) %>
|
||||
</div>
|
||||
</div>
|
||||
<%= render "bubbles/cards/common/assignees", bubble: bubble do %>
|
||||
<%= turbo_frame_tag bubble, :assignment, src: new_bucket_bubble_assignment_toggle_path(bubble.bucket, bubble) %>
|
||||
<% end %>
|
||||
|
||||
@@ -1,7 +1 @@
|
||||
<%= turbo_frame_tag bubble, :assignees do %>
|
||||
<div class="flex">
|
||||
<% bubble.assignees.each do |assignee| %>
|
||||
<%= avatar_tag assignee, loading: :lazy, class: "avatar" %>
|
||||
<% end %>
|
||||
</div>
|
||||
<% end %>
|
||||
<%= render "bubbles/cards/common/assignees", bubble: bubble %>
|
||||
|
||||
Reference in New Issue
Block a user