OpenProject is the leading open source project management software for product, project and portfolio management. A powerful Jira alternative with agile planning, issue tracking, roadmaps, Gantt charts, time tracking, collaboration features, and more. Available on premises or in the cloud. ⭐ Star us on GitHub
Ruby agile-developmentangularbcfboardsbug-trackerganttgantt-chartifcissue-trackerjira-alternativekanbanopenprojectproduct-managementproject-managementproject-planningroadmaprubyscrumtimelineworkflows
fix styling for delete button
Klaus Zanders970bad58e770
diff --git a/frontend/src/global_styles/openproject.sass b/frontend/src/global_styles/openproject.sassindex bcede07f87e..027aec2d4cf 100644--- a/frontend/src/global_styles/openproject.sass+++ b/frontend/src/global_styles/openproject.sass@@ -23,6 +23,7 @@@import "../../../modules/overviews/app/components/_index.sass"@import "../../../modules/storages/app/components/_index.sass"@import "../../../modules/auth_saml/app/components/_index.sass"+@import "../../../modules/costs/app/components/_index.sass"// Component specific Styles@import "../../../app/components/_index.sass"diff --git a/modules/costs/app/components/_index.sass b/modules/costs/app/components/_index.sassnew file mode 100644index 00000000000..c2d6cebea24--- /dev/null+++ b/modules/costs/app/components/_index.sass@@ -0,0 +1 @@+@import "time_entries/entry_dialog_component"diff --git a/modules/costs/app/components/time_entries/entry_dialog_component.html.erb b/modules/costs/app/components/time_entries/entry_dialog_component.html.erbindex 61a2f8a377b..230e4e53783 100644--- a/modules/costs/app/components/time_entries/entry_dialog_component.html.erb+++ b/modules/costs/app/components/time_entries/entry_dialog_component.html.erb@@ -1,23 +1,46 @@<%= render(Primer::Alpha::Dialog.new(title: t('caption_log_time_dialog'), size: :large, id: MODAL_ID, data: { "controller" => "time-entry", "application-target" => "dynamic", "time-entry-id" => time_entry.id, "ongoing" => time_entry.ongoing? })) do |d| %><% d.with_header(variant: :large, mb: 3) %><% d.with_body do %>- <%= render(TimeEntries::TimeEntryFormComponent.new(time_entry: time_entry, show_user: show_user, show_work_package: show_work_package)) %>+ <%= render(+ TimeEntries::TimeEntryFormComponent.new(+ time_entry: time_entry,+ show_user: show_user,+ show_work_package: show_work_package,+ ),+ ) %><% end %><% d.with_footer(variant: :large) do %>- <% if time_entry.persisted? %>- <%= render(Primer::ButtonComponent.new(- scheme: :danger,- test_selector: "destroy-time-entry-button",- data: {- "turbo" => true,- "turbo-method" => :delete,- "turbo-confirm" => t('js.text_are_you_sure')- },- href: time_entry_path(time_entry),- tag: :a- )) { t('button_delete') } %>+ <% flex_layout(justify_content: :space_between, classes: 'time-entry-dialog-footer-buttons') do |flex| %>+ <% if time_entry.persisted? %>+ <% flex.with_column do %>+ <%= render(+ Primer::ButtonComponent.new(+ scheme: :danger,+ test_selector: "destroy-time-entry-button",+ data: {+ "turbo" => true,+ "turbo-method" => :delete,+ "turbo-confirm" => t("js.text_are_you_sure"),+ },+ href: time_entry_path(time_entry),+ tag: :a,+ ),+ ) { t("button_delete") } %>+ <% end %>+ <% end %>+ <% flex.with_column do %>+ <%= render(+ Primer::ButtonComponent.new(data: { "close-dialog-id": "time-entry-dialog" }),+ ) { I18n.t("button_cancel") } %>+ <%= render(+ Primer::ButtonComponent.new(+ scheme: :primary,+ type: :submit,+ test_selector: "create-time-entry-button",+ form: "time-entry-form",+ ),+ ) { t("button_log_time") } %>+ <% end %><% end %>- <%= render(Primer::ButtonComponent.new(data: { 'close-dialog-id': "time-entry-dialog" })) { I18n.t("button_cancel") } %>- <%= render(Primer::ButtonComponent.new(scheme: :primary, type: :submit, test_selector: "create-time-entry-button", form: 'time-entry-form')) { t('button_log_time') } %>- <% end %>+ <% end %><% end %>diff --git a/modules/costs/app/components/time_entries/entry_dialog_component.rb b/modules/costs/app/components/time_entries/entry_dialog_component.rbindex 4eaa3c871c8..8ce53c4ce0b 100644--- a/modules/costs/app/components/time_entries/entry_dialog_component.rb+++ b/modules/costs/app/components/time_entries/entry_dialog_component.rb@@ -31,6 +31,7 @@module TimeEntriesclass EntryDialogComponent < ApplicationComponentinclude OpTurbo::Streamable+ include OpPrimer::ComponentHelpersMODAL_ID = "time-entry-dialog"diff --git a/modules/costs/app/components/time_entries/entry_dialog_component.sass b/modules/costs/app/components/time_entries/entry_dialog_component.sassnew file mode 100644index 00000000000..11c5f2f562d--- /dev/null+++ b/modules/costs/app/components/time_entries/entry_dialog_component.sass@@ -0,0 +1,32 @@+/*!+ / -- copyright+ / OpenProject is an open source project management software.+ / Copyright (C) 2024 the OpenProject GmbH+ /+ / This program is free software; you can redistribute it and/or+ / modify it under the terms of the GNU General Public License version 3.+ /+ / OpenProject is a fork of ChiliProject, which is a fork of Redmine. The copyright follows:+ / Copyright (C) 2006-2013 Jean-Philippe Lang+ / Copyright (C) 2010-2013 the ChiliProject Team+ /+ / This program is free software; you can redistribute it and/or+ / modify it under the terms of the GNU General Public License+ / as published by the Free Software Foundation; either version 2+ / of the License, or (at your option) any later version.+ /+ / This program is distributed in the hope that it will be useful,+ / but WITHOUT ANY WARRANTY; without even the implied warranty of+ / MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the+ / GNU General Public License for more details.+ /+ / You should have received a copy of the GNU General Public License+ / along with this program; if not, write to the Free Software+ / Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.+ /+ / See COPYRIGHT and LICENSE files for more details.+ / +++ /++.time-entry-dialog-footer-buttons+ width: 100%