From dfae90efb99a59ada0d6c20dbf35ed971e9242f2 Mon Sep 17 00:00:00 2001 From: Kevin McConnell Date: Thu, 30 Jan 2025 14:06:31 +0000 Subject: [PATCH] Only show own drafts on the bucket preview --- app/views/buckets/_bucket.html.erb | 42 ++++++++++++++---------------- 1 file changed, 20 insertions(+), 22 deletions(-) diff --git a/app/views/buckets/_bucket.html.erb b/app/views/buckets/_bucket.html.erb index 7de49b309..db00a4923 100644 --- a/app/views/buckets/_bucket.html.erb +++ b/app/views/buckets/_bucket.html.erb @@ -1,24 +1,22 @@ -<% cache bucket do %> -
  • - <%= link_to bubbles_path(bucket_ids: [ bucket ]), class: "border border-radius margin-block-end-half windshield__container flex justify-center align-center position-relative" do %> -
    - <% bucket.bubbles.active.ordered_by_activity.limit(10).each do |bubble| %> -
    " style="--bubble-color: <%= bubble.color %>; <%= bubble_rotation(bubble) %> <%= bubble_size(bubble) %>"> - -
    - <% end %> -
    - <% end %> - -
    - <%= link_to bubbles_path(bucket_ids: [ bucket ]), class: "txt-ink flex flex-column" do %> - <%= bucket.name %> - <% end %> - - <%= link_to edit_bucket_path(bucket), class: "btn txt-small bucket__button" do %> - <%= image_tag "settings.svg", aria: { hidden: true }, size: 24 %> - Settings for <%= bucket.name %> +
  • + <%= link_to bubbles_path(bucket_ids: [ bucket ]), class: "border border-radius margin-block-end-half windshield__container flex justify-center align-center position-relative" do %> +
    + <% bucket.bubbles.active.published_or_drafted_by(Current.user).ordered_by_activity.limit(10).each do |bubble| %> +
    " style="--bubble-color: <%= bubble.color %>; <%= bubble_rotation(bubble) %> <%= bubble_size(bubble) %>"> + +
    <% end %>
    -
  • -<% end %> + <% end %> + +
    + <%= link_to bubbles_path(bucket_ids: [ bucket ]), class: "txt-ink flex flex-column" do %> + <%= bucket.name %> + <% end %> + + <%= link_to edit_bucket_path(bucket), class: "btn txt-small bucket__button" do %> + <%= image_tag "settings.svg", aria: { hidden: true }, size: 24 %> + Settings for <%= bucket.name %> + <% end %> +
    +