diff --git a/Gemfile.lock b/Gemfile.lock index ca1bf896aaf9..f3c89a818753 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -755,7 +755,7 @@ GEM minitest (5.25.1) msgpack (1.7.2) multi_json (1.15.0) - mustermann (3.0.2) + mustermann (3.0.3) ruby2_keywords (~> 0.0.1) mustermann-grape (1.1.0) mustermann (>= 1.0.0) diff --git a/app/components/projects/configure_view_modal_component.html.erb b/app/components/projects/configure_view_modal_component.html.erb index 5a67332542ba..691908997ac1 100644 --- a/app/components/projects/configure_view_modal_component.html.erb +++ b/app/components/projects/configure_view_modal_component.html.erb @@ -26,7 +26,9 @@ selected: selected_columns, protected: helpers.protected_projects_columns_options, name: COLUMN_HTML_NAME, - id: 'columns-select', + id: COLUMN_HTML_ID, + dragAreaName: "#{COLUMN_HTML_ID}_dragarea", + formControlId: "#{COLUMN_HTML_ID}_autocompleter", inputLabel: I18n.t(:'queries.configure_view.columns.input_label'), inputPlaceholder: I18n.t(:'queries.configure_view.columns.input_placeholder'), dragAreaLabel: I18n.t(:'queries.configure_view.columns.drag_area_label'), diff --git a/app/components/projects/configure_view_modal_component.rb b/app/components/projects/configure_view_modal_component.rb index 03dcf504b972..d802e188e9c5 100644 --- a/app/components/projects/configure_view_modal_component.rb +++ b/app/components/projects/configure_view_modal_component.rb @@ -34,6 +34,7 @@ class Projects::ConfigureViewModalComponent < ApplicationComponent MODAL_ID = "op-project-list-configure-dialog" QUERY_FORM_ID = "op-project-list-configure-query-form" COLUMN_HTML_NAME = "columns" + COLUMN_HTML_ID = "columns-select" options :query diff --git a/app/components/projects/row_component.rb b/app/components/projects/row_component.rb index 813360e27a06..d775a4669c73 100644 --- a/app/components/projects/row_component.rb +++ b/app/components/projects/row_component.rb @@ -116,7 +116,7 @@ def name end content << " " - content << helpers.link_to_project(project, {}, {}, false) + content << helpers.link_to_project(project, {}, { data: { turbo: false } }, false) content end diff --git a/app/components/settings/project_custom_fields/project_custom_field_mapping/table_component.html.erb b/app/components/settings/project_custom_fields/project_custom_field_mapping/table_component.html.erb deleted file mode 100644 index 3488dfd23538..000000000000 --- a/app/components/settings/project_custom_fields/project_custom_field_mapping/table_component.html.erb +++ /dev/null @@ -1,32 +0,0 @@ -<%#-- copyright -OpenProject is an open source project management software. -Copyright (C) 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. - -++#%> - -<%= component_wrapper(tag: "div", data: { turbo: true }) do %> - <%= render_parent %> -<% end %> diff --git a/app/components/work_packages/details/tab_component.html.erb b/app/components/work_packages/details/tab_component.html.erb index 6b99f5f2b57c..f684953bf5cd 100644 --- a/app/components/work_packages/details/tab_component.html.erb +++ b/app/components/work_packages/details/tab_component.html.erb @@ -1,12 +1,35 @@ <%= - flex_layout(classes: "op-work-package-details-tab-component") do |flex| + flex_layout(classes: "op-work-package-details-tab-component", data: { + "application-target": "dynamic", + controller: "work-packages--details--tabs" + }) do |flex| + flex.with_column(classes: "op-work-package-details-tab-component--action") do + render(Primer::Beta::IconButton.new(icon: :"chevron-left", + tag: :a, + scheme: :invisible, + data: { + action: "click->work-packages--details--tabs#scrollLeft" + }, + aria: { label: I18n.t(:label_scroll_left) })) + end + + flex.with_column(flex: 1, classes: "op-work-package-details-tab-component--tabs", test_selector: "wp-details-tab-component--tabs") do - render(Primer::Alpha::UnderlineNav.new(align: :left, label: "Tabs", classes: "op-primer-adjustment--UnderlineNav_spaciousLeft")) do |component| + render(Primer::Alpha::UnderlineNav.new(align: :left, + label: "Tabs", + data: { + "work-packages--details--tabs-target": "underlineNav", + })) do |component| menu_items.each do |node| component.with_tab(selected: @tab == node.name, href: helpers.url_for_with_params(**node.url), test_selector: "wp-details-tab-component--tab-#{node.name}", - data: { turbo: true, turbo_stream: true, turbo_action: "replace" } + data: { + turbo: true, + turbo_stream: true, + turbo_action: "replace", + "work-packages--details--tabs-target": @tab == node.name ? "activeElement" : "" + } ) do |c| c.with_text { t("js.work_packages.tabs.#{node.name}") } count = node.badge(work_package:).to_i @@ -16,6 +39,16 @@ end end + flex.with_column(classes: "op-work-package-details-tab-component--action") do + render(Primer::Beta::IconButton.new(icon: :"chevron-right", + tag: :a, + scheme: :invisible, + data: { + action: "click->work-packages--details--tabs#scrollRight" + }, + aria: { label: I18n.t(:label_scroll_right) })) + end + flex.with_column(classes: "op-work-package-details-tab-component--action") do render(Primer::Beta::IconButton.new(icon: :"screen-full", tag: :a, diff --git a/app/components/work_packages/details/tab_component.sass b/app/components/work_packages/details/tab_component.sass index 23c2a467bf4c..4a6fdeb48444 100644 --- a/app/components/work_packages/details/tab_component.sass +++ b/app/components/work_packages/details/tab_component.sass @@ -14,3 +14,6 @@ &:last-of-type padding-right: 10px + + &:first-of-type + padding-left: 5px diff --git a/app/components/work_packages/exports/csv/export_settings_component.html.erb b/app/components/work_packages/exports/csv/export_settings_component.html.erb index 4cc6a176a260..dddd90a2649b 100644 --- a/app/components/work_packages/exports/csv/export_settings_component.html.erb +++ b/app/components/work_packages/exports/csv/export_settings_component.html.erb @@ -1,5 +1,20 @@ -<%= render WorkPackages::Exports::ColumnSelectionComponent.new( - query, - "columns-select-export-csv", - I18n.t("export.dialog.columns.input_caption_table") -) %> +<%= flex_layout do |container| %> + <%= container.with_row do |_columns| %> + <%= render WorkPackages::Exports::ColumnSelectionComponent.new( + query, + "columns-select-export-csv", + I18n.t("export.dialog.columns.input_caption_table") + ) %> + <% end %> + <%= container.with_row do |_csv_include_description| %> + <%= render OpenProject::Common::DividerComponent.new %> + <%= render(Primer::Alpha::CheckBox.new( + id: "show_descriptions_csv", + name: "show_descriptions", + value: "true", + unchecked_value: "false", + label: I18n.t("export.dialog.xls.include_descriptions.label"), + caption: I18n.t("export.dialog.xls.include_descriptions.caption"), + visually_hide_label: false)) %> + <% end %> +<% end %> diff --git a/app/components/work_packages/exports/modal_dialog_component.rb b/app/components/work_packages/exports/modal_dialog_component.rb index 45255b25993a..f01f9b5ca593 100644 --- a/app/components/work_packages/exports/modal_dialog_component.rb +++ b/app/components/work_packages/exports/modal_dialog_component.rb @@ -38,12 +38,12 @@ class ModalDialogComponent < ApplicationComponent attr_reader :query, :project, :query_params - def initialize(query:, project:) + def initialize(query:, project:, title:) super @query = query @project = project - @query_params = ::API::V3::Queries::QueryParamsRepresenter.new(query).to_url_query(merge_params: { columns: [] }) + @query_params = ::API::V3::Queries::QueryParamsRepresenter.new(query).to_url_query(merge_params: { columns: [], title: }) end def export_format_url(format) diff --git a/app/components/work_packages/exports/xls/export_settings_component.html.erb b/app/components/work_packages/exports/xls/export_settings_component.html.erb index 0465d0db5488..7909c0191895 100644 --- a/app/components/work_packages/exports/xls/export_settings_component.html.erb +++ b/app/components/work_packages/exports/xls/export_settings_component.html.erb @@ -8,20 +8,24 @@ <% end %> <%= container.with_row do |_xls_include_relations| %> <%= render OpenProject::Common::DividerComponent.new(mt: 2) %> - <%= render(Primer::Alpha::CheckBox.new(name: "show_relations", - value: "true", - unchecked_value: "false", - label: I18n.t("export.dialog.xls.include_relations.label"), - caption: I18n.t("export.dialog.xls.include_relations.caption"), - visually_hide_label: false)) %> + <%= render(Primer::Alpha::CheckBox.new( + id: "show_relations_xls", + name: "show_relations", + value: "true", + unchecked_value: "false", + label: I18n.t("export.dialog.xls.include_relations.label"), + caption: I18n.t("export.dialog.xls.include_relations.caption"), + visually_hide_label: false)) %> <% end %> <%= container.with_row do |_xls_include_description| %> <%= render OpenProject::Common::DividerComponent.new %> - <%= render(Primer::Alpha::CheckBox.new(name: "show_descriptions", - value: "true", - unchecked_value: "false", - label: I18n.t("export.dialog.xls.include_descriptions.label"), - caption: I18n.t("export.dialog.xls.include_descriptions.caption"), - visually_hide_label: false)) %> + <%= render(Primer::Alpha::CheckBox.new( + id: "show_descriptions_xls", + name: "show_descriptions", + value: "true", + unchecked_value: "false", + label: I18n.t("export.dialog.xls.include_descriptions.label"), + caption: I18n.t("export.dialog.xls.include_descriptions.caption"), + visually_hide_label: false)) %> <% end %> <% end %> diff --git a/app/components/work_packages/split_view_component.sass b/app/components/work_packages/split_view_component.sass index a6dfcb54e1ba..c9d6fd991206 100644 --- a/app/components/work_packages/split_view_component.sass +++ b/app/components/work_packages/split_view_component.sass @@ -7,3 +7,7 @@ @media screen and (max-width: $breakpoint-lg) // Unfortunately, we have to enforce this style via !important as the resizer writes the width directly on the element as inline style min-width: unset !important + + @media screen and (max-width: $breakpoint-sm) + .work-packages--details-toolbar-container + @include hide-button-texts diff --git a/app/controllers/work_packages_controller.rb b/app/controllers/work_packages_controller.rb index 9e68b8b46495..3d8e12986034 100644 --- a/app/controllers/work_packages_controller.rb +++ b/app/controllers/work_packages_controller.rb @@ -87,7 +87,7 @@ def show end def export_dialog - respond_with_dialog WorkPackages::Exports::ModalDialogComponent.new(query: @query, project: @project) + respond_with_dialog WorkPackages::Exports::ModalDialogComponent.new(query: @query, project: @project, title: params[:title]) end protected diff --git a/app/mailers/sharing_mailer.rb b/app/mailers/sharing_mailer.rb index 418bd0ba6393..22bbd9d77d77 100644 --- a/app/mailers/sharing_mailer.rb +++ b/app/mailers/sharing_mailer.rb @@ -15,7 +15,7 @@ def shared_work_package(sharer, membership, group = nil) @role_rights = derive_role_rights(role) @allowed_work_package_actions = derive_allowed_work_package_actions(role) @url = optionally_activated_url(work_package_url(@work_package.id), @invitation_token) - @notification_url = optionally_activated_url(details_notifications_url(@work_package.id), @invitation_token) + @notification_url = optionally_activated_url(details_notifications_url(@work_package.id, tab: :activity), @invitation_token) set_open_project_headers(@work_package) message_id(membership, sharer) diff --git a/app/models/work_package/exports/csv.rb b/app/models/work_package/exports/csv.rb index 052dd3f82925..a16a5309f1e8 100644 --- a/app/models/work_package/exports/csv.rb +++ b/app/models/work_package/exports/csv.rb @@ -39,11 +39,19 @@ def title end def csv_headers + return super unless with_descriptions + super + [WorkPackage.human_attribute_name(:description)] end + def with_descriptions + ActiveModel::Type::Boolean.new.cast(options[:show_descriptions]) + end + # fetch all row values def csv_row(work_package) + return super unless with_descriptions + super.tap do |row| if row.any? row << if work_package.description diff --git a/app/views/layouts/only_logo.html.erb b/app/views/layouts/only_logo.html.erb index 14fa3f9c4dad..ca3bc3a0b1c7 100644 --- a/app/views/layouts/only_logo.html.erb +++ b/app/views/layouts/only_logo.html.erb @@ -34,7 +34,10 @@ See COPYRIGHT and LICENSE files for more details. <%= render partial: 'layouts/common_head' %> - + +>
-
+
+
+