Skip to content

Commit

Permalink
Merge branch 'dev' into task/48717-replace-delayedjob
Browse files Browse the repository at this point in the history
  • Loading branch information
ba1ash authored Mar 6, 2024
2 parents dbab61a + 2c0507f commit ccb275b
Show file tree
Hide file tree
Showing 289 changed files with 5,075 additions and 1,735 deletions.
6 changes: 3 additions & 3 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -226,7 +226,7 @@ gem 'turbo-rails', '~> 2.0.0'
gem 'httpx'

group :test do
gem 'launchy', '~> 2.5.0'
gem 'launchy', '~> 3.0.0'
gem 'rack-test', '~> 2.1.0'
gem 'shoulda-context', '~> 2.0'

Expand Down Expand Up @@ -347,7 +347,7 @@ gem 'grape_logging', '~> 1.8.4'
gem 'roar', '~> 1.2.0'

# CORS for API
gem 'rack-cors', '~> 2.0.0'
gem 'rack-cors', '~> 2.0.2'

# Gmail API
gem 'google-apis-gmail_v1', require: false
Expand Down Expand Up @@ -383,4 +383,4 @@ end

gem 'openproject-octicons', '~>19.8.0'
gem 'openproject-octicons_helper', '~>19.8.0'
gem 'openproject-primer_view_components', '~>0.22.2'
gem 'openproject-primer_view_components', '~>0.23.0'
44 changes: 24 additions & 20 deletions Gemfile.lock
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
GIT
remote: https://github.com/citizensadvice/capybara_accessible_selectors
revision: 67bbac702fd039a81ce858f1157701b5a5b70cd1
revision: f9a7261a3c44cead8b40cbc4353c242a2b0ca388
branch: main
specs:
capybara_accessible_selectors (0.11.0)
Expand Down Expand Up @@ -331,7 +331,7 @@ GEM
airbrake-ruby (~> 6.0)
airbrake-ruby (6.2.2)
rbtree3 (~> 0.6)
appsignal (3.6.0)
appsignal (3.6.1)
rack
ast (2.4.2)
attr_required (1.0.2)
Expand Down Expand Up @@ -408,6 +408,7 @@ GEM
carrierwave (>= 1.0.0)
fog-aws
cgi (0.4.1)
childprocess (5.0.0)
climate_control (1.2.0)
closure_tree (7.4.0)
activerecord (>= 4.2.10)
Expand Down Expand Up @@ -608,7 +609,7 @@ GEM
http-2-next (1.0.3)
http_parser.rb (0.6.0)
httpclient (2.8.3)
httpx (1.2.2)
httpx (1.2.3)
http-2-next (>= 1.0.3)
i18n (1.14.1)
concurrent-ruby (~> 1.0)
Expand Down Expand Up @@ -638,7 +639,7 @@ GEM
iso8601 (0.13.0)
jmespath (1.6.2)
json (2.7.1)
json-jwt (1.16.5)
json-jwt (1.16.6)
activesupport (>= 4.2)
aes_key_wrap
base64
Expand All @@ -659,11 +660,12 @@ GEM
ladle (1.0.1)
open4 (~> 1.0)
language_server-protocol (3.17.0.3)
launchy (2.5.2)
launchy (3.0.0)
addressable (~> 2.8)
lefthook (1.6.4)
letter_opener (1.9.0)
launchy (>= 2.2, < 3)
childprocess (~> 5.0)
lefthook (1.6.5)
letter_opener (1.0.0)
launchy (>= 2.0.4)
listen (3.9.0)
rb-fsevent (~> 0.10, >= 0.10.3)
rb-inotify (~> 0.9, >= 0.9.10)
Expand Down Expand Up @@ -757,7 +759,7 @@ GEM
actionview
openproject-octicons (= 19.8.0)
railties
openproject-primer_view_components (0.22.2)
openproject-primer_view_components (0.23.0)
actionview (>= 5.0.0)
activesupport (>= 5.0.0)
openproject-octicons (>= 19.8.0)
Expand All @@ -770,12 +772,12 @@ GEM
activerecord (>= 6.1)
request_store (~> 1.4)
parallel (1.24.0)
parallel_tests (4.5.1)
parallel_tests (4.5.2)
parallel
parser (3.3.0.5)
ast (~> 2.4.1)
racc
pdf-core (0.9.0)
pdf-core (0.10.0)
pdf-inspector (1.3.0)
pdf-reader (>= 1.0, < 3.0.a)
pdf-reader (2.12.0)
Expand All @@ -789,9 +791,10 @@ GEM
activesupport (> 2.2.1)
nokogiri (~> 1.10, >= 1.10.4)
rubyzip (>= 1.2.0)
prawn (2.4.0)
pdf-core (~> 0.9.0)
ttfunk (~> 1.7)
prawn (2.5.0)
matrix (~> 0.4)
pdf-core (~> 0.10.0)
ttfunk (~> 1.8)
prawn-table (0.2.2)
prawn (>= 1.3.0, < 3.0.0)
pry (0.14.2)
Expand Down Expand Up @@ -830,7 +833,7 @@ GEM
rack (>= 0.4)
rack-attack (6.7.0)
rack (>= 1.0, < 4)
rack-cors (2.0.1)
rack-cors (2.0.2)
rack (>= 2.0.0)
rack-mini-profiler (3.3.1)
rack (>= 1.2.0)
Expand Down Expand Up @@ -977,7 +980,7 @@ GEM
rack (>= 1.1)
rubocop (>= 1.33.0, < 2.0)
rubocop-ast (>= 1.31.1, < 2.0)
rubocop-rspec (2.27.0)
rubocop-rspec (2.27.1)
rubocop (~> 1.40)
rubocop-capybara (~> 2.17)
rubocop-factory_bot (~> 2.22)
Expand Down Expand Up @@ -1059,7 +1062,8 @@ GEM
timecop (0.9.8)
timeout (0.4.1)
trailblazer-option (0.1.2)
ttfunk (1.7.0)
ttfunk (1.8.0)
bigdecimal (~> 3.1)
turbo-rails (2.0.4)
actionpack (>= 6.0.0)
activejob (>= 6.0.0)
Expand Down Expand Up @@ -1191,7 +1195,7 @@ DEPENDENCIES
json_schemer (~> 2.1.0)
json_spec (~> 1.1.4)
ladle
launchy (~> 2.5.0)
launchy (~> 3.0.0)
lefthook
letter_opener
listen (~> 3.9.0)
Expand Down Expand Up @@ -1228,7 +1232,7 @@ DEPENDENCIES
openproject-octicons (~> 19.8.0)
openproject-octicons_helper (~> 19.8.0)
openproject-openid_connect!
openproject-primer_view_components (~> 0.22.2)
openproject-primer_view_components (~> 0.23.0)
openproject-recaptcha!
openproject-reporting!
openproject-storages!
Expand All @@ -1253,7 +1257,7 @@ DEPENDENCIES
puma (~> 6.4)
puma-plugin-statsd (~> 2.0)
rack-attack (~> 6.7.0)
rack-cors (~> 2.0.0)
rack-cors (~> 2.0.2)
rack-mini-profiler
rack-protection (~> 3.2.0)
rack-test (~> 2.1.0)
Expand Down
39 changes: 39 additions & 0 deletions app/components/projects/configure_view_modal_component.html.erb
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 %>
43 changes: 43 additions & 0 deletions app/components/projects/configure_view_modal_component.rb
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 app/components/projects/delete_list_modal_component.html.erb
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 %>
35 changes: 35 additions & 0 deletions app/components/projects/delete_list_modal_component.rb
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 app/components/projects/export_list_modal_component.html.erb
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 %>
35 changes: 35 additions & 0 deletions app/components/projects/export_list_modal_component.rb
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
Loading

0 comments on commit ccb275b

Please sign in to comment.