From 07983de35f301c2fc557d54399176c71d3028b07 Mon Sep 17 00:00:00 2001 From: RyanTG Date: Sat, 1 Feb 2025 08:10:24 -0800 Subject: [PATCH] trying again with trash button --- app/assets/stylesheets/application.scss.erb | 4 ++-- app/assets/stylesheets/mobile-application.scss.erb | 4 ---- .../location_machine_xrefs/_list_machine.html.haml | 2 +- .../_remove_machine.html.haml | 13 +++++++------ 4 files changed, 10 insertions(+), 13 deletions(-) diff --git a/app/assets/stylesheets/application.scss.erb b/app/assets/stylesheets/application.scss.erb index cb38d2c6..43c8c66b 100644 --- a/app/assets/stylesheets/application.scss.erb +++ b/app/assets/stylesheets/application.scss.erb @@ -1573,9 +1573,9 @@ li.address_full { border-radius: 15px; } -.machine_name_container form { +.machine_name_container .remove_machine_container { height: 33px; - width: auto; + width: 30px; } .w_100 { diff --git a/app/assets/stylesheets/mobile-application.scss.erb b/app/assets/stylesheets/mobile-application.scss.erb index 5d30ed0e..6c3acc6a 100644 --- a/app/assets/stylesheets/mobile-application.scss.erb +++ b/app/assets/stylesheets/mobile-application.scss.erb @@ -718,10 +718,6 @@ div.location_type { line-height: 24px; } -.machine_name { - line-height: 26px; -} - .external_machine_link a:after { margin: 0 5px 0 4px; } diff --git a/app/views/location_machine_xrefs/_list_machine.html.haml b/app/views/location_machine_xrefs/_list_machine.html.haml index a4bf76db..c9e66406 100644 --- a/app/views/location_machine_xrefs/_list_machine.html.haml +++ b/app/views/location_machine_xrefs/_list_machine.html.haml @@ -1,5 +1,5 @@ %div.machine_name_container - %span{:class => "machine_name"} + %div{:class => "machine_name"} #{lmx.machine.name} %span.machine_year_man #{lmx.machine.year_and_manufacturer} = render :partial => 'location_machine_xrefs/remove_machine', :locals => {:lmx => lmx} diff --git a/app/views/location_machine_xrefs/_remove_machine.html.haml b/app/views/location_machine_xrefs/_remove_machine.html.haml index 411f92c0..039fecfd 100644 --- a/app/views/location_machine_xrefs/_remove_machine.html.haml +++ b/app/views/location_machine_xrefs/_remove_machine.html.haml @@ -1,10 +1,11 @@ -- if !user_signed_in? - =link_to new_user_session_path, :class => "no_underline" do - %div.remove_machine_button +%div.remove_machine_container + - if !user_signed_in? + =link_to new_user_session_path, :class => "no_underline" do + %div.remove_machine_button + =image_tag('icons/trash-can-outline.svg', alt: 'Remove Machine') + - else + = button_to location_machine_xref_path(:id => lmx.id), :id => "remove_machine_#{lmx.id}", :method => 'delete', :remote => true, :class => "remove_machine_button" do =image_tag('icons/trash-can-outline.svg', alt: 'Remove Machine') -- else - = button_to location_machine_xref_path(:id => lmx.id), :id => "remove_machine_#{lmx.id}", :method => 'delete', :remote => true, :class => "remove_machine_button" do - =image_tag('icons/trash-can-outline.svg', alt: 'Remove Machine') :javascript $('#remove_machine_#{lmx.id}').click(function () {