Skip to content

Commit

Permalink
Use icon_for(:delete)
Browse files Browse the repository at this point in the history
  • Loading branch information
Alex Dolski committed Dec 21, 2023
1 parent 57473d5 commit 5c3684a
Show file tree
Hide file tree
Showing 16 changed files with 24 additions and 24 deletions.
4 changes: 2 additions & 2 deletions app/views/collections/_show_button_group.html.haml
Original file line number Diff line number Diff line change
Expand Up @@ -17,15 +17,15 @@
class: "dropdown-item",
method: :post,
"data-confirm": "Are you sure you want to delete this collection? This operation is reversible. If you would prefer to delete it permanently, please contact a system administrator.") do
%i.fa.fa-trash
= icon_for(:delete)
Delete
- if can_destroy
%li
= link_to(collection_path(@collection),
class: "dropdown-item",
method: :delete,
"data-confirm": "Are you sure you want to permanently delete this collection? This cannot be undone.") do
%i.fa.fa-trash
= icon_for(:delete)
Delete Permanently
- if @collection.buried? && can_exhume
%li
Expand Down
2 changes: 1 addition & 1 deletion app/views/element_namespaces/_listing.html.haml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
class: "btn btn-danger btn-sm",
method: :delete,
data: { confirm: "Are you sure you want to delete this namespace?" }) do
%i.fa.fa-trash
= icon_for(:delete)
Delete
%td
%code= namespace.prefix
Expand Down
2 changes: 1 addition & 1 deletion app/views/imports/_listing.html.haml
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@
Upload File…
- if (!import.task || [Task::Status::PENDING].include?(import.task&.status)) && policy(import).destroy?
= link_to(import_path(import), method: :delete, class: "btn btn-sm btn-danger", data: { confirm: "Are you sure you want to delete this import? "}) do
%i.fa.fa-trash
= icon_for(:delete)
Delete
- else
%p No imports to show.
Expand Down
2 changes: 1 addition & 1 deletion app/views/index_pages/show.html.haml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
role: "button",
method: :delete,
data: { confirm: "Are you sure you want to delete this index page?" }) do
%i.fa.fa-trash
= icon_for(:delete)
Delete
%h1
Expand Down
8 changes: 4 additions & 4 deletions app/views/institutions/_show_theme_tab.html.haml
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@
.float-end
= link_to(institution_favicon_path(@institution),
method: :delete, class: "btn btn-danger btn-sm") do
%i.fa.fa-trash
= icon_for(:delete)
Delete
.card-body
- if @institution.has_favicon
Expand All @@ -81,7 +81,7 @@
.float-end
= link_to(institution_header_image_path(@institution),
method: :delete, class: "btn btn-danger btn-sm") do
%i.fa.fa-trash
= icon_for(:delete)
Delete
.card-body{style: "background-color: #{@institution.header_background_color}; "\
"color: #{ColorUtils.optimize_text_contrast(@institution.header_background_color)}"}
Expand All @@ -100,7 +100,7 @@
.float-end
= link_to(institution_banner_image_path(@institution),
method: :delete, class: "btn btn-danger btn-sm") do
%i.fa.fa-trash
= icon_for(:delete)
Delete
.card-body
- if @institution.banner_image_filename.present?
Expand All @@ -115,7 +115,7 @@
.float-end
= link_to(institution_footer_image_path(@institution),
method: :delete, class: "btn btn-danger btn-sm") do
%i.fa.fa-trash
= icon_for(:delete)
Delete
.card-body{style: "background-color: #{@institution.footer_background_color}; "\
"color: #{ColorUtils.optimize_text_contrast(@institution.footer_background_color)}"}
Expand Down
2 changes: 1 addition & 1 deletion app/views/institutions/show.html.haml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
role: "button",
method: :delete,
data: { confirm: "Are you sure you want to delete this institution?" }) do
%i.fa.fa-trash
= icon_for(:delete)
Delete

%h1
Expand Down
2 changes: 1 addition & 1 deletion app/views/invitees/_actions_menu.html.haml
Original file line number Diff line number Diff line change
Expand Up @@ -35,5 +35,5 @@
= link_to(invitee_path(invitee),
method: :delete, class: "dropdown-item",
data: { confirm: "Are you sure you want to delete #{invitee.email}?\n\nNo notification will be sent." }) do
%i.fa.fa-trash
= icon_for(:delete)
Delete
4 changes: 2 additions & 2 deletions app/views/items/_show_button_group.html.haml
Original file line number Diff line number Diff line change
Expand Up @@ -45,13 +45,13 @@
= link_to(item_bury_path(@item), class: "dropdown-item",
method: :post,
"data-confirm": "Are you sure you want to delete this item? This operation is reversible. If you would prefer to delete it permanently, please contact a system administrator.") do
%i.fa.fa-trash
= icon_for(:delete)
Delete
- if show_destroy_button
= link_to(item_path(@item), class: "dropdown-item",
method: :delete,
"data-confirm": "Are you sure you want to permanently delete this item? This cannot be undone.") do
%i.fa.fa-trash
= icon_for(:delete)
Delete Permanently
- if show_undelete_button
= link_to(item_exhume_path(@item), class: "dropdown-item",
Expand Down
4 changes: 2 additions & 2 deletions app/views/metadata_profiles/show.html.haml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
role: "button",
method: :delete,
data: { confirm: "Are you sure you want to delete this profile?" }) do
%i.fa.fa-trash
= icon_for(:delete)
Delete
%h1= @profile.name
Expand Down Expand Up @@ -146,7 +146,7 @@
class: 'btn btn-danger btn-sm',
method: :delete,
data: { confirm: 'Are you sure you want to delete this element?' }) do
%i.fa.fa-trash
= icon_for(:delete)
Delete
%td= element.label
%td.boolean= boolean(element.visible)
Expand Down
2 changes: 1 addition & 1 deletion app/views/prebuilt_searches/show.html.haml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
role: "button",
method: :delete,
data: { confirm: "Are you sure you want to delete this prebuilt search?" }) do
%i.fa.fa-trash
= icon_for(:delete)
Delete
%h1= @prebuilt_search.name
Expand Down
2 changes: 1 addition & 1 deletion app/views/registered_elements/_listing.html.haml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
= link_to(registered_element_path(element), class: "btn btn-sm btn-danger",
method: :delete,
data: { confirm: "Are you sure you want to delete this element?" }) do
%i.fa.fa-trash
= icon_for(:delete)
Delete
%h5.card-title.mb-3.element-labe
Expand Down
4 changes: 2 additions & 2 deletions app/views/submission_profiles/show.html.haml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
role: "button",
method: :delete,
data: { confirm: "Are you sure you want to delete this profile?" }) do
%i.fa.fa-trash
= icon_for(:delete)
Delete
%h1= @profile.name
Expand Down Expand Up @@ -82,7 +82,7 @@
class: 'btn btn-danger btn-sm',
method: :delete,
data: { confirm: 'Are you sure you want to delete this element?' }) do
%i.fa.fa-trash
= icon_for(:delete)
Delete
%h5.card-title.mb-3= element.registered_element.label
%dl.mb-0
Expand Down
4 changes: 2 additions & 2 deletions app/views/units/_show_button_group.html.haml
Original file line number Diff line number Diff line change
Expand Up @@ -17,15 +17,15 @@
class: "dropdown-item",
method: :post,
"data-confirm": "Are you sure you want to delete this unit? This operation is reversible. If you would prefer to delete it permanently, please contact a system administrator.") do
%i.fa.fa-trash
= icon_for(:delete)
Delete
- if can_destroy
%li
= link_to(unit_path(@unit),
class: "dropdown-item",
method: :delete,
"data-confirm": "Are you sure you want to permanently delete this unit? This cannot be undone.") do
%i.fa.fa-trash
= icon_for(:delete)
Delete Permanently
- if @unit.buried? && can_exhume
%li
Expand Down
2 changes: 1 addition & 1 deletion app/views/user_groups/show.html.haml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
role: "button",
method: :delete,
data: { confirm: "Are you sure you want to delete this user group?" }) do
%i.fa.fa-trash
= icon_for(:delete)
Delete
%h1
Expand Down
2 changes: 1 addition & 1 deletion app/views/vocabularies/_terms.html.haml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
class: "btn btn-danger btn-sm",
method: :delete,
data: { confirm: "Are you sure you want to delete this term?" }) do
%i.fa.fa-trash
= icon_for(:delete)
Delete
%td= term.displayed_value
%td= term.stored_value
Expand Down
2 changes: 1 addition & 1 deletion app/views/vocabularies/show.html.haml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
role: "button",
method: :delete,
data: { confirm: "Are you sure you want to delete this vocabulary?" }) do
%i.fa.fa-trash
= icon_for(:delete)
Delete
%h1= @vocabulary.name
Expand Down

0 comments on commit 5c3684a

Please sign in to comment.