diff --git a/app/controllers/bubbles/assignments_controller.rb b/app/controllers/bubbles/assignments_controller.rb index 4ca0d7031..f7a8774c3 100644 --- a/app/controllers/bubbles/assignments_controller.rb +++ b/app/controllers/bubbles/assignments_controller.rb @@ -9,7 +9,7 @@ class Bubbles::AssignmentsController < ApplicationController def create @bubble.assign(find_assignee) - render :show + redirect_to @bubble end private diff --git a/app/controllers/bubbles_controller.rb b/app/controllers/bubbles_controller.rb index 0b0a6728c..2c8cf0be5 100644 --- a/app/controllers/bubbles_controller.rb +++ b/app/controllers/bubbles_controller.rb @@ -24,16 +24,7 @@ class BubblesController < ApplicationController def update @bubble.update! bubble_params - - if turbo_frame_request? - if params[:bubble][:assignee_ids].present? - render "bubbles/assignments/show" - else - render :show - end - else - redirect_to @bubble - end + redirect_to @bubble end private diff --git a/app/views/bubbles/assignments/new.html.erb b/app/views/bubbles/assignments/new.html.erb deleted file mode 100644 index 60330a618..000000000 --- a/app/views/bubbles/assignments/new.html.erb +++ /dev/null @@ -1,14 +0,0 @@ -<%= turbo_frame_tag dom_id(@bubble, :assignments) do %> - <%= form_with url: bucket_bubble_assignments_path(@bubble.bucket, @bubble), data: { controller: "form" } do |form| %> -
- - <%= form.submit "Save", class: "btn", hidden: true %> -
- <% end %> -<% end %> diff --git a/app/views/bubbles/assignments/show.html.erb b/app/views/bubbles/assignments/show.html.erb index 7d7c7c9fc..e3e9d9662 100644 --- a/app/views/bubbles/assignments/show.html.erb +++ b/app/views/bubbles/assignments/show.html.erb @@ -1,7 +1,7 @@ <%= turbo_frame_tag dom_id(@bubble, :assignments) do %> <% if @bubble.assignments.any? %>
- <%= form_with url: bucket_bubble_assignments_path(@bubble.bucket, @bubble), data: { controller: "form" } do |form| %> + <%= form_with url: bucket_bubble_assignments_path(@bubble.bucket, @bubble), data: { controller: "form", turbo_frame: "_top" } do |form| %> - - <%= form.submit "Save", class: "btn", hidden: true %> <% end %>
<% end %> diff --git a/app/views/bubbles/show.html.erb b/app/views/bubbles/show.html.erb index c8c34bae9..2b6e092f4 100644 --- a/app/views/bubbles/show.html.erb +++ b/app/views/bubbles/show.html.erb @@ -25,12 +25,17 @@ <% end %> - <%= link_to new_bucket_bubble_assignments_path(@bubble.bucket, @bubble), - class: "btn full-width justify-start borderless", - data: { turbo_frame: dom_id(@bubble, :assignments) } do %> - <%= image_tag "person.svg", aria: { hidden: true }, size: 24 %> - Assign to someone + <%= form_with url: bucket_bubble_assignments_path(@bubble.bucket, @bubble), data: { controller: "form" } do |form| %> + <% end %> + + <%= bubble_action_button('new-tag', 'tag', 'Tag this') %> <%= bubble_action_button('new-attachment', 'picture-add', 'Attach a file') %> <%= bubble_action_button('new-boost', 'thumb-up', 'Boost this') %>