diff --git a/app/views/bubbles/cards/common/_assignees.html.erb b/app/views/bubbles/cards/common/_assignees.html.erb new file mode 100644 index 000000000..70cefba5d --- /dev/null +++ b/app/views/bubbles/cards/common/_assignees.html.erb @@ -0,0 +1,16 @@ +<%= turbo_frame_tag bubble, :assignees do %> +
+ <% bubble.assignees.each do |assignee| %> + <%= avatar_tag assignee, loading: :lazy, class: "avatar" %> + <% end %> + +
+ + + <%= yield %> +
+
+<% end %> diff --git a/app/views/bubbles/cards/perma/_assignees.html.erb b/app/views/bubbles/cards/perma/_assignees.html.erb index 603c0ef7d..b9ef3d6db 100644 --- a/app/views/bubbles/cards/perma/_assignees.html.erb +++ b/app/views/bubbles/cards/perma/_assignees.html.erb @@ -1,16 +1,3 @@ -<%= turbo_frame_tag bubble, :assignees do %> -
- <% bubble.assignees.each do |assignee| %> - <%= avatar_tag assignee, loading: :lazy, class: "avatar" %> - <% end %> - -
- - - <%= turbo_frame_tag bubble, :assignment, src: new_bucket_bubble_assignment_toggle_path(bubble.bucket, bubble) %> -
-
+<%= render "bubbles/cards/common/assignees", bubble: bubble do %> + <%= turbo_frame_tag bubble, :assignment, src: new_bucket_bubble_assignment_toggle_path(bubble.bucket, bubble) %> <% end %> diff --git a/app/views/bubbles/cards/preview/_assignees.html.erb b/app/views/bubbles/cards/preview/_assignees.html.erb index b9ba62581..ae3301ea1 100644 --- a/app/views/bubbles/cards/preview/_assignees.html.erb +++ b/app/views/bubbles/cards/preview/_assignees.html.erb @@ -1,7 +1 @@ -<%= turbo_frame_tag bubble, :assignees do %> -
- <% bubble.assignees.each do |assignee| %> - <%= avatar_tag assignee, loading: :lazy, class: "avatar" %> - <% end %> -
-<% end %> +<%= render "bubbles/cards/common/assignees", bubble: bubble %>