a830ec1999
pulling the avatars down from the "people" partial, and pulling the add button up from the "assignment" partial. The result is: - the "bubbles/sidebar/assignment" partial is just the dialog box - the "bubbles/assignees" partial contains everything about assignees - the "bubbles/people" partial makes one render call and I've introduced some turbo frames in the expectation of the next commit which will load the dialog in the background.
22 lines
1.1 KiB
Plaintext
22 lines
1.1 KiB
Plaintext
<%= turbo_frame_tag bubble, :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>
|
|
|
|
<%= form_with url: bucket_bubble_assignment_toggles_path(bubble.bucket, bubble), class: "flex flex-column full-width popup__list", data: { controller: "form" } do |form| %>
|
|
<% bubble.bucket.users.active.sort_by(&:name).each do |user| %>
|
|
<div class="btn popup__item">
|
|
<%= form.check_box "assignee_id[]", {
|
|
checked: bubble.assigned_to?(user),
|
|
data: { action: "change->form#submit" },
|
|
id: dom_id(user, :assign),
|
|
include_hidden: false,
|
|
}, user.id %>
|
|
|
|
<%= form.label "assignee_id[]", user.name, for: dom_id(user, :assign), class: "overflow-ellipsis" %>
|
|
<%= image_tag "check.svg", aria: { hidden: true }, size: 18, class: "checked flex-item-justify-end" %>
|
|
</div>
|
|
<% end %>
|
|
<% end %>
|
|
</dialog>
|
|
<% end %>
|