Skip to content

Commit

Permalink
Merge branch 'dev' into fix/include_subprojects_num
Browse files Browse the repository at this point in the history
  • Loading branch information
Reza98Sh authored Sep 5, 2024
2 parents 022e47f + 756abbf commit f05523c
Show file tree
Hide file tree
Showing 457 changed files with 8,750 additions and 4,101 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -250,7 +250,7 @@ jobs:
- name: Merge digests
uses: actions/upload-artifact/merge@v4
with:
pattern: digests-*
pattern: "digests-${{ matrix.target }}-*"
overwrite: true
name: "merged-digests-${{ matrix.target }}-${{ github.run_number }}-${{ github.run_attempt }}"
- name: Download digests
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/test-core.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ jobs:
labels:
- runs-on
- runner=32cpu-linux-x64
- family=m7
- run-id=${{ github.run_id }}
timeout-minutes: 40
env:
Expand Down
6 changes: 3 additions & 3 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ gem "friendly_id", "~> 5.5.0"

gem "acts_as_list", "~> 1.2.0"
gem "acts_as_tree", "~> 2.9.0"
gem "awesome_nested_set", "~> 3.6.0"
gem "awesome_nested_set", "~> 3.7.0"
gem "closure_tree", "~> 7.4.0"
gem "rubytree", "~> 2.1.0"
# Only used in down migrations now.
Expand Down Expand Up @@ -348,7 +348,7 @@ group :development, :test do
gem "erblint-github", require: false

# Brakeman scanner
gem "brakeman", "~> 6.1.0"
gem "brakeman", "~> 6.2.0"

# i18n-tasks helps find and manage missing and unused translations.
gem "i18n-tasks", "~> 1.0.13", require: false
Expand Down Expand Up @@ -398,4 +398,4 @@ end

gem "openproject-octicons", "~>19.18.0"
gem "openproject-octicons_helper", "~>19.18.0"
gem "openproject-primer_view_components", "~>0.43.0"
gem "openproject-primer_view_components", "~>0.43.1"
68 changes: 34 additions & 34 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -338,21 +338,21 @@ GEM
attr_required (1.0.2)
auto_strip_attributes (2.6.0)
activerecord (>= 4.0)
awesome_nested_set (3.6.0)
activerecord (>= 4.0.0, < 7.2)
awesome_nested_set (3.7.0)
activerecord (>= 4.0.0, < 8.0)
awrence (1.2.1)
aws-eventstream (1.3.0)
aws-partitions (1.968.0)
aws-sdk-core (3.202.0)
aws-partitions (1.970.0)
aws-sdk-core (3.203.0)
aws-eventstream (~> 1, >= 1.3.0)
aws-partitions (~> 1, >= 1.651.0)
aws-sigv4 (~> 1.9)
jmespath (~> 1, >= 1.6.1)
aws-sdk-kms (1.88.0)
aws-sdk-core (~> 3, >= 3.201.0)
aws-sdk-kms (1.89.0)
aws-sdk-core (~> 3, >= 3.203.0)
aws-sigv4 (~> 1.5)
aws-sdk-s3 (1.159.0)
aws-sdk-core (~> 3, >= 3.201.0)
aws-sdk-s3 (1.160.0)
aws-sdk-core (~> 3, >= 3.203.0)
aws-sdk-kms (~> 1)
aws-sigv4 (~> 1.5)
aws-sdk-sns (1.82.0)
Expand Down Expand Up @@ -384,7 +384,7 @@ GEM
bindata (2.5.0)
bootsnap (1.18.4)
msgpack (~> 1.2)
brakeman (6.1.2)
brakeman (6.2.1)
racc
browser (6.0.0)
builder (3.3.0)
Expand Down Expand Up @@ -560,7 +560,8 @@ GEM
websocket-driver (~> 0.7)
ffi (1.17.0)
flamegraph (0.9.5)
fog-aws (3.24.0)
fog-aws (3.25.0)
base64 (~> 0.2.0)
fog-core (~> 2.1)
fog-json (~> 1.1)
fog-xml (~> 0.1)
Expand Down Expand Up @@ -633,7 +634,7 @@ GEM
hashdiff (1.1.1)
hashery (2.1.2)
hashie (3.6.0)
highline (3.1.0)
highline (3.1.1)
reline
html-pipeline (2.14.3)
activesupport (>= 2)
Expand Down Expand Up @@ -698,7 +699,7 @@ GEM
launchy (3.0.1)
addressable (~> 2.8)
childprocess (~> 5.0)
lefthook (1.7.14)
lefthook (1.7.15)
letter_opener (1.10.0)
launchy (>= 2.2, < 4)
letter_opener_web (3.0.0)
Expand Down Expand Up @@ -748,14 +749,14 @@ GEM
method_source (1.1.0)
mime-types (3.5.2)
mime-types-data (~> 3.2015)
mime-types-data (3.2024.0806)
mime-types-data (3.2024.0820)
mini_magick (5.0.1)
mini_mime (1.1.5)
mini_portile2 (2.8.7)
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)
Expand Down Expand Up @@ -802,7 +803,7 @@ GEM
actionview
openproject-octicons (= 19.18.0)
railties
openproject-primer_view_components (0.43.0)
openproject-primer_view_components (0.43.1)
actionview (>= 5.0.0)
activesupport (>= 5.0.0)
openproject-octicons (>= 19.17.0)
Expand All @@ -822,7 +823,7 @@ GEM
parallel (1.26.3)
parallel_tests (4.7.1)
parallel
parser (3.3.4.2)
parser (3.3.5.0)
ast (~> 2.4.1)
racc
pdf-core (0.9.0)
Expand Down Expand Up @@ -982,15 +983,15 @@ GEM
rspec-core (~> 3.13.0)
rspec-expectations (~> 3.13.0)
rspec-mocks (~> 3.13.0)
rspec-core (3.13.0)
rspec-core (3.13.1)
rspec-support (~> 3.13.0)
rspec-expectations (3.13.1)
rspec-expectations (3.13.2)
diff-lcs (>= 1.2.0, < 2.0)
rspec-support (~> 3.13.0)
rspec-mocks (3.13.1)
diff-lcs (>= 1.2.0, < 2.0)
rspec-support (~> 3.13.0)
rspec-rails (6.1.4)
rspec-rails (6.1.5)
actionpack (>= 6.1)
activesupport (>= 6.1)
railties (>= 6.1)
Expand All @@ -1001,18 +1002,17 @@ GEM
rspec-retry (0.6.2)
rspec-core (> 3.3)
rspec-support (3.13.1)
rubocop (1.65.1)
rubocop (1.66.1)
json (~> 2.3)
language_server-protocol (>= 3.17.0)
parallel (~> 1.10)
parser (>= 3.3.0.2)
rainbow (>= 2.2.2, < 4.0)
regexp_parser (>= 2.4, < 3.0)
rexml (>= 3.2.5, < 4.0)
rubocop-ast (>= 1.31.1, < 2.0)
rubocop-ast (>= 1.32.2, < 2.0)
ruby-progressbar (~> 1.7)
unicode-display_width (>= 2.4.0, < 3.0)
rubocop-ast (1.32.1)
rubocop-ast (1.32.3)
parser (>= 3.3.1.0)
rubocop-capybara (2.21.0)
rubocop (~> 1.41)
Expand Down Expand Up @@ -1054,9 +1054,9 @@ GEM
crass (~> 1.0.2)
nokogiri (>= 1.12.0)
secure_headers (6.5.0)
selenium-devtools (0.127.0)
selenium-devtools (0.128.0)
selenium-webdriver (~> 4.2)
selenium-webdriver (4.23.0)
selenium-webdriver (4.24.0)
base64 (~> 0.2)
logger (~> 1.4)
rexml (~> 3.2, >= 3.2.5)
Expand Down Expand Up @@ -1091,8 +1091,8 @@ GEM
sprockets (>= 3.0.0)
ssrf_filter (1.0.8)
stackprof (0.2.26)
store_attribute (1.2.0)
activerecord (>= 6.0)
store_attribute (1.3.0)
activerecord (>= 6.1)
stringex (2.8.6)
stringio (3.1.1)
strscan (3.1.0)
Expand All @@ -1108,9 +1108,9 @@ GEM
table_print (1.5.7)
terminal-table (3.0.2)
unicode-display_width (>= 1.1.1, < 3)
test-prof (1.4.1)
test-prof (1.4.2)
text-hyphen (1.5.0)
thor (1.3.1)
thor (1.3.2)
thread_safe (0.3.6)
timecop (0.9.10)
timeout (0.4.1)
Expand All @@ -1134,7 +1134,7 @@ GEM
tzinfo (>= 1.0.0)
uber (0.1.0)
unicode-display_width (2.5.0)
uri (0.13.0)
uri (0.13.1)
validate_email (0.1.6)
activemodel (>= 3.0)
mail (>= 2.2.5)
Expand Down Expand Up @@ -1184,7 +1184,7 @@ GEM
xpath (3.2.0)
nokogiri (~> 1.8)
yard (0.9.36)
zeitwerk (2.6.17)
zeitwerk (2.6.18)

PLATFORMS
ruby
Expand All @@ -1201,13 +1201,13 @@ DEPENDENCIES
airbrake (~> 13.0.0)
appsignal (~> 3.10.0)
auto_strip_attributes (~> 2.5)
awesome_nested_set (~> 3.6.0)
awesome_nested_set (~> 3.7.0)
aws-sdk-core (~> 3.107)
aws-sdk-s3 (~> 1.91)
axe-core-rspec
bcrypt (~> 3.1.6)
bootsnap (~> 1.18.0)
brakeman (~> 6.1.0)
brakeman (~> 6.2.0)
browser (~> 6.0.0)
budgets!
capybara (~> 3.40.0)
Expand Down Expand Up @@ -1303,7 +1303,7 @@ DEPENDENCIES
openproject-octicons (~> 19.18.0)
openproject-octicons_helper (~> 19.18.0)
openproject-openid_connect!
openproject-primer_view_components (~> 0.43.0)
openproject-primer_view_components (~> 0.43.1)
openproject-recaptcha!
openproject-reporting!
openproject-storages!
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,26 @@ See COPYRIGHT and LICENSE files for more details.
++#%>
<%= component_wrapper(tag: "div", data: { turbo: true }) do %>
<%= render_parent %>
<% end %>
<%=
render(Primer::OpenProject::PageHeader.new(test_selector: "custom-fields--page-header")) do |header|
header.with_title { @custom_field.name }

header.with_breadcrumbs(breadcrumbs_items)

header.with_tab_nav(label: nil, test_selector: :custom_field_detail_header) do |tab_nav|
tab_nav.with_tab(
selected: tab_selected?(:edit),
href: edit_custom_field_path(@custom_field)
) do |tab|
tab.with_text { t(:label_details) }
end

tab_nav.with_tab(
selected: tab_selected?(:custom_field_projects),
href: custom_field_projects_path(@custom_field)
) do |tab|
tab.with_text { t(:label_project_plural) }
end
end
end
%>
57 changes: 57 additions & 0 deletions app/components/admin/custom_fields/edit_form_header_component.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
#-- 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.
#++

module Admin
module CustomFields
class EditFormHeaderComponent < ApplicationComponent
TAB_NAVS = %i[
edit
custom_field_projects
].freeze

def initialize(custom_field:, selected:, **)
@custom_field = custom_field
@selected = selected
super(custom_field, **)
end

def tab_selected?(tab_name)
TAB_NAVS.include?(tab_name) && tab_name == @selected
end

private

def breadcrumbs_items
[{ href: admin_index_path, text: t(:label_administration) },
{ href: custom_fields_path, text: t(:label_custom_field_plural) },
{ href: custom_fields_path(tab: @custom_field.type), text: I18n.t(@custom_field.type_name) },
@custom_field.name]
end
end
end
end
2 changes: 1 addition & 1 deletion app/components/projects/row_component.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ def more_menu_detach_project
{
scheme: :default,
icon: nil,
label: I18n.t("projects.settings.project_custom_fields.actions.deactivate_for_project"),
label: I18n.t("projects.settings.project_custom_fields.actions.remove_from_project"),
href: unlink_admin_settings_project_custom_field_path(
id: @table.params[:custom_field].id,
project_custom_field_project_mapping: { project_id: project.id }
Expand Down
Loading

0 comments on commit f05523c

Please sign in to comment.