-
Notifications
You must be signed in to change notification settings - Fork 2.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'dev' into task/48717-replace-delayedjob
- Loading branch information
Showing
289 changed files
with
5,075 additions
and
1,735 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
39 changes: 39 additions & 0 deletions
39
app/components/projects/configure_view_modal_component.html.erb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
<%= render(Primer::Alpha::Dialog.new(title: t(:'queries.configure_view.heading'), | ||
size: :large, | ||
id: MODAL_ID, | ||
# Hack to give the draggable autcompleter (ng-select) bound to the dialog | ||
# enough height to display all options. | ||
# This is necessary as long as ng-select does not support popovers. | ||
style: "min-height: 430px")) do |d| %> | ||
<% d.with_header(variant: :large, mb: 3) %> | ||
<%= render(Primer::Alpha::Dialog::Body.new) do %> | ||
<%= primer_form_with( | ||
url: projects_path, | ||
id: COLUMN_FORM_ID, | ||
method: :get, | ||
data: { | ||
controller: "params-from-query", | ||
'application-target': "dynamic", | ||
'params-from-query-allowed-value': '["filters", "query_id", "page", "per_page", "sortBy"]' | ||
}) do %> | ||
<%= helpers.angular_component_tag 'opce-draggable-autocompleter', | ||
inputs: { | ||
options: helpers.projects_columns_options, | ||
selected: selected_columns, | ||
protected: helpers.protected_projects_columns_options, | ||
name: COLUMN_HTML_NAME, | ||
id: 'columns-select', | ||
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'), | ||
appendToComponent: true | ||
}%> | ||
<% end %> | ||
<% end %> | ||
<%= render(Primer::Alpha::Dialog::Footer.new) do %> | ||
<%= render(Primer::ButtonComponent.new(data: { "close-dialog-id": MODAL_ID })) { I18n.t(:button_cancel) } %> | ||
<%= render(Primer::ButtonComponent.new(scheme: :primary, type: :submit, form: COLUMN_FORM_ID)) { I18n.t(:button_apply) } %> | ||
<% end %> | ||
<% end %> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
# frozen_string_literal: true | ||
|
||
# -- copyright | ||
# OpenProject is an open source project management software. | ||
# Copyright (C) 2010-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. | ||
# ++ | ||
|
||
class Projects::ConfigureViewModalComponent < ApplicationComponent | ||
MODAL_ID = 'op-project-list-configure-dialog' | ||
COLUMN_FORM_ID = 'op-project-list-configure-columns-form' | ||
COLUMN_HTML_NAME = 'columns' | ||
|
||
options :query | ||
|
||
def selected_columns | ||
@selected_columns ||= query | ||
.selects | ||
.map { |c| { id: c.attribute, name: c.caption } } | ||
end | ||
end |
16 changes: 16 additions & 0 deletions
16
app/components/projects/delete_list_modal_component.html.erb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
<%= render(Primer::Alpha::Dialog.new(title: t(:'projects.lists.delete_modal.title'), | ||
size: :large, | ||
id: MODAL_ID, | ||
data: { 'test-selector': MODAL_ID })) do |d| %> | ||
<% d.with_header(variant: :large, mb: 2) %> | ||
<% d.with_body { t(:'projects.lists.delete_modal.text') } %> | ||
<% d.with_footer do %> | ||
<%= render(Primer::Beta::Button.new(data: { "close-dialog-id": MODAL_ID })) { I18n.t(:button_cancel) } %> | ||
<%= form_with(url: projects_query_path(query), | ||
method: :delete) do %> | ||
<%= render(Primer::Beta::Button.new(scheme: :danger, | ||
type: :submit)) { I18n.t(:button_delete) } %> | ||
<% end %> | ||
<% end %> | ||
<% end %> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
# frozen_string_literal: true | ||
|
||
# -- copyright | ||
# OpenProject is an open source project management software. | ||
# Copyright (C) 2010-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. | ||
# ++ | ||
|
||
class Projects::DeleteListModalComponent < ApplicationComponent # rubocop:disable OpenProject/AddPreviewForViewComponent | ||
MODAL_ID = 'op-project-list-delete-dialog' | ||
|
||
options :query | ||
end |
21 changes: 21 additions & 0 deletions
21
app/components/projects/export_list_modal_component.html.erb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
<%= render(Primer::Alpha::Dialog.new(title: t('js.label_export'), | ||
id: MODAL_ID)) do |d| %> | ||
<% d.with_header(variant: :large) %> | ||
<% d.with_body do %> | ||
<ul class="op-export-options" | ||
data-controller="params-from-query" | ||
data-application-target="dynamic" | ||
data-params-from-query-all-anchors-value="true" | ||
data-params-from-query-allowed-value='["query_id", "filters", "sortBy", "columns"]'> | ||
<% helpers.supported_export_formats.each do |key| %> | ||
<li class="op-export-options--option"> | ||
<%= link_to url_for(action: 'index', format: key), | ||
class: 'op-export-options--option-link' do %> | ||
<%= helpers.op_icon("icon-big icon-export-#{key}") %> | ||
<span class="op-export-options--option-label"><%= t("export.format.#{key}") %></span> | ||
<% end %> | ||
</li> | ||
<% end %> | ||
</ul> | ||
<% end %> | ||
<% end %> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
# frozen_string_literal: true | ||
|
||
# -- copyright | ||
# OpenProject is an open source project management software. | ||
# Copyright (C) 2010-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. | ||
# ++ | ||
|
||
class Projects::ExportListModalComponent < ApplicationComponent # rubocop:disable OpenProject/AddPreviewForViewComponent | ||
MODAL_ID = 'op-project-list-export-dialog' | ||
|
||
options :query | ||
end |
Oops, something went wrong.