diff --git a/app/assets/stylesheets/admin/table_actions.scss b/app/assets/stylesheets/admin/table_actions.scss index b217105ba..ff9bf0683 100644 --- a/app/assets/stylesheets/admin/table_actions.scss +++ b/app/assets/stylesheets/admin/table_actions.scss @@ -6,33 +6,23 @@ } a { + align-items: center; + display: flex; + flex-direction: column; + font-size: 0.9em; + line-height: $global-lineheight; + margin-right: 1em; position: relative; - - > :first-child { - @include bottom-tooltip; - left: $off-screen-left; - opacity: 0; - transform: translateX(-50%); - transition: opacity 0.3s, left 0s 0.3s; - } + text-align: center; &:hover, &:focus { color: $link-hover; - - > :first-child { - left: 50%; - opacity: 1; - transition: opacity 0.4s 0.2s; - } - } - - &:not(:focus) > :first-child:hover { - left: $off-screen-left; } &::before { - font-size: rem-calc(18); + font-size: 1.6em; + margin-right: 0 !important; } } @@ -42,7 +32,14 @@ .destroy-link { @include has-fa-icon(trash-alt, regular); - color: $alert-color; + } + + .destroy-link, + .destroy-role-link, + .destroy-officer-link, + .reject-link, + .confirm-hide-link { + color: darken($alert-color, 5%); } .show-link, @@ -66,17 +63,23 @@ .destroy-officer-link, .reject-link { @include has-fa-icon(user-times, solid); - color: $alert-color; } .restore-link { @include has-fa-icon(undo, solid); - color: $warning-color; + } + + .restore-link, + .investments-link { + color: darken($warning-color, 20%); + + &::before { + color: $warning-color; + } } .confirm-hide-link { @include has-fa-icon(flag, regular); - color: $alert-color; } .verify-link { @@ -108,7 +111,6 @@ .investments-link { @include has-fa-icon(coins, solid); - color: $warning-color; } .groups-link, diff --git a/app/components/admin/budgets/table_actions_component.rb b/app/components/admin/budgets/table_actions_component.rb index 46c642a86..9a90a3799 100644 --- a/app/components/admin/budgets/table_actions_component.rb +++ b/app/components/admin/budgets/table_actions_component.rb @@ -1,5 +1,4 @@ class Admin::Budgets::TableActionsComponent < ApplicationComponent - include TableActionLink attr_reader :budget def initialize(budget) diff --git a/app/components/admin/hidden_table_actions_component.rb b/app/components/admin/hidden_table_actions_component.rb index 41788be0b..68647d130 100644 --- a/app/components/admin/hidden_table_actions_component.rb +++ b/app/components/admin/hidden_table_actions_component.rb @@ -1,5 +1,4 @@ class Admin::HiddenTableActionsComponent < ApplicationComponent - include TableActionLink attr_reader :record def initialize(record) diff --git a/app/components/admin/organizations/table_actions_component.rb b/app/components/admin/organizations/table_actions_component.rb index 786755b74..d0b29708f 100644 --- a/app/components/admin/organizations/table_actions_component.rb +++ b/app/components/admin/organizations/table_actions_component.rb @@ -1,5 +1,4 @@ class Admin::Organizations::TableActionsComponent < ApplicationComponent - include TableActionLink delegate :can?, to: :controller attr_reader :organization diff --git a/app/components/admin/roles/table_actions_component.rb b/app/components/admin/roles/table_actions_component.rb index d674321af..57d19f169 100644 --- a/app/components/admin/roles/table_actions_component.rb +++ b/app/components/admin/roles/table_actions_component.rb @@ -1,5 +1,4 @@ class Admin::Roles::TableActionsComponent < ApplicationComponent - include TableActionLink attr_reader :record, :actions def initialize(record, actions: [:destroy]) diff --git a/app/components/admin/table_actions_component.rb b/app/components/admin/table_actions_component.rb index 7cc9697c5..f920447bc 100644 --- a/app/components/admin/table_actions_component.rb +++ b/app/components/admin/table_actions_component.rb @@ -1,5 +1,4 @@ class Admin::TableActionsComponent < ApplicationComponent - include TableActionLink include Admin::Namespace attr_reader :record, :options diff --git a/app/components/concerns/table_action_link.rb b/app/components/concerns/table_action_link.rb deleted file mode 100644 index 34a146059..000000000 --- a/app/components/concerns/table_action_link.rb +++ /dev/null @@ -1,7 +0,0 @@ -module TableActionLink - extend ActiveSupport::Concern - - def link_to(text, url, **options) - super(tag.span(text), url, options) - end -end diff --git a/spec/shared/system/admin_milestoneable.rb b/spec/shared/system/admin_milestoneable.rb index 5c7e3f630..a5b41284b 100644 --- a/spec/shared/system/admin_milestoneable.rb +++ b/spec/shared/system/admin_milestoneable.rb @@ -108,12 +108,12 @@ shared_examples "admin_milestoneable" do |factory_name, path_name| end context "Delete" do - scenario "Remove milestone", :no_js do + scenario "Remove milestone" do create(:milestone, milestoneable: milestoneable, title: "Title will it remove") visit path - click_link "Delete milestone" + accept_confirm { click_link "Delete milestone" } expect(page).not_to have_content "Title will it remove" end