The button and dialog need not render in previews
This commit is contained in:
@@ -1,14 +1,20 @@
|
||||
<%= turbo_frame_tag @card, :assignment do %>
|
||||
<dialog class="popup panel flex-column align-start gap-half fill-white shadow" data-dialog-target="dialog">
|
||||
<strong class="popup__title margin-block-start-half pad-inline-half txt-nowrap">Assign this to…</strong>
|
||||
<div class="position-relative" data-controller="dialog" data-action="keydown.esc->dialog#close click@document->dialog#closeOnClickOutside">
|
||||
<button class="btn <%= @card.creating? || @card.drafted? ? "fill-highlight" : "fill-transparent" %>" data-action="click->dialog#open:stop">
|
||||
<%= icon_tag "add" %>
|
||||
<span class="for-screen-reader">Assign</span>
|
||||
</button>
|
||||
<dialog class="popup panel flex-column align-start gap-half fill-white shadow" data-dialog-target="dialog">
|
||||
<strong class="popup__title margin-block-start-half pad-inline-half txt-nowrap">Assign this to…</strong>
|
||||
|
||||
<div class="flex flex-column full-width popup__list">
|
||||
<% @card.collection.users.active.alphabetically.each do |user| %>
|
||||
<%= button_to card_assignments_path(@card, params: { assignee_id: user.id }), method: :post, class: "btn popup__item full-width" do %>
|
||||
<span class="overflow-ellipsis"><%= user.name %></span>
|
||||
<%= icon_tag "check", size: 18, class: "checked flex-item-justify-end" if @card.assignees.include?(user) %>
|
||||
<% end %>
|
||||
<% end %>
|
||||
</div>
|
||||
</dialog>
|
||||
<% end %>
|
||||
<div class="flex flex-column full-width popup__list">
|
||||
<% @card.collection.users.active.alphabetically.each do |user| %>
|
||||
<%= button_to card_assignments_path(@card, params: { assignee_id: user.id }), method: :post, class: "btn popup__item full-width" do %>
|
||||
<span class="overflow-ellipsis"><%= user.name %></span>
|
||||
<%= icon_tag "check", size: 18, class: "checked flex-item-justify-end" if @card.assignees.include?(user) %>
|
||||
<% end %>
|
||||
<% end %>
|
||||
</div>
|
||||
</dialog>
|
||||
</div>
|
||||
<% end %>
|
||||
@@ -3,12 +3,5 @@
|
||||
<%= avatar_tag assignee, 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 <%= card.creating? || card.drafted? ? "fill-highlight" : "fill-transparent" %>" data-action="click->dialog#open:stop">
|
||||
<%= icon_tag "add" %>
|
||||
<span class="for-screen-reader">Assign</span>
|
||||
</button>
|
||||
|
||||
<%= yield %>
|
||||
</div>
|
||||
<%= yield %>
|
||||
</div>
|
||||
|
||||
@@ -3,12 +3,5 @@
|
||||
<% card.assignees.each do |assignee| %>
|
||||
<%= avatar_tag assignee, 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 <%= card.creating? || card.drafted? ? "fill-highlight" : "fill-transparent" %>" data-action="click->dialog#open:stop">
|
||||
<%= icon_tag "add" %>
|
||||
<span class="for-screen-reader">Assign</span>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
<% end %>
|
||||
|
||||
Reference in New Issue
Block a user