Skip to content

Commit

Permalink
Merge branch 'dev' into impl/add-storage-missing-services
Browse files Browse the repository at this point in the history
  • Loading branch information
Kharonus committed Sep 25, 2024
2 parents 59c92f4 + 5bfabef commit d0d5330
Show file tree
Hide file tree
Showing 409 changed files with 5,609 additions and 2,408 deletions.
1 change: 1 addition & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
.*ignore
*.md
*.log
config/database.yml
docker/prod/Dockerfile
docker/ci/Dockerfile
Guardfile
Expand Down
12 changes: 8 additions & 4 deletions .github/workflows/docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -174,8 +174,10 @@ jobs:
with:
context: git
labels: |
io.artifacthub.package.readme-url=https://www.openproject.org/docs/installation-and-operations/installation/docker/
org.opencontainers.image.documentation=https://www.openproject.org/docs/
io.artifacthub.package.readme-url=https://raw.githubusercontent.com/opf/openproject/refs/heads/dev/docker/prod/README.md
io.artifacthub.package.logo-url=https://raw.githubusercontent.com/opf/openproject/refs/heads/dev/docker/prod/logo.png
org.opencontainers.image.source=https://github.com/opf/openproject
org.opencontainers.image.documentation=https://www.openproject.org/docs/installation-and-operations/installation/
org.opencontainers.image.vendor=OpenProject GmbH
tags: |
type=semver,pattern={{version}},value=${{ needs.setup.outputs.version }}
Expand Down Expand Up @@ -272,8 +274,10 @@ jobs:
with:
images: ${{ env.REGISTRY_IMAGE }}
labels: |
io.artifacthub.package.readme-url=https://www.openproject.org/docs/installation-and-operations/installation/docker/
org.opencontainers.image.documentation=https://www.openproject.org/docs/
io.artifacthub.package.readme-url=https://raw.githubusercontent.com/opf/openproject/refs/heads/dev/docker/prod/README.md
io.artifacthub.package.logo-url=https://raw.githubusercontent.com/opf/openproject/refs/heads/dev/docker/prod/logo.png
org.opencontainers.image.source=https://github.com/opf/openproject
org.opencontainers.image.documentation=https://www.openproject.org/docs/installation-and-operations/installation/
org.opencontainers.image.vendor=OpenProject GmbH
flavor: |
latest=false
Expand Down
1 change: 1 addition & 0 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -272,6 +272,7 @@ group :test do
gem "capybara_accessible_selectors", git: "https://github.com/citizensadvice/capybara_accessible_selectors", branch: "main"
gem "capybara-screenshot", "~> 1.0.17"
gem "cuprite", "~> 0.15.0"
gem "rspec-wait"
gem "selenium-devtools"
gem "selenium-webdriver", "~> 4.20"

Expand Down
39 changes: 21 additions & 18 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ PATH
remote: modules/auth_saml
specs:
openproject-auth_saml (1.0.0)
omniauth-saml (~> 1.10.1)
omniauth-saml (~> 1.10.5)

PATH
remote: modules/avatars
Expand Down Expand Up @@ -342,23 +342,23 @@ GEM
activerecord (>= 4.0.0, < 8.0)
awrence (1.2.1)
aws-eventstream (1.3.0)
aws-partitions (1.974.0)
aws-sdk-core (3.205.0)
aws-partitions (1.977.0)
aws-sdk-core (3.208.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.91.0)
aws-sdk-core (~> 3, >= 3.205.0)
aws-sigv4 (~> 1.5)
aws-sdk-s3 (1.162.0)
aws-sdk-s3 (1.163.0)
aws-sdk-core (~> 3, >= 3.205.0)
aws-sdk-kms (~> 1)
aws-sigv4 (~> 1.5)
aws-sdk-sns (1.82.0)
aws-sdk-core (~> 3, >= 3.201.0)
aws-sigv4 (~> 1.5)
aws-sigv4 (1.9.1)
aws-sigv4 (1.10.0)
aws-eventstream (~> 1, >= 1.0.2)
axe-core-api (4.10.0)
dumb_delegator
Expand Down Expand Up @@ -462,9 +462,9 @@ GEM
representable (>= 3.1.1, < 4)
doorkeeper (5.7.1)
railties (>= 5)
dotenv (3.1.2)
dotenv-rails (3.1.2)
dotenv (= 3.1.2)
dotenv (3.1.4)
dotenv-rails (3.1.4)
dotenv (= 3.1.4)
railties (>= 6.1)
drb (2.2.1)
dry-auto_inject (1.0.1)
Expand Down Expand Up @@ -647,7 +647,7 @@ GEM
httpclient (2.8.3)
httpx (1.3.1)
http-2 (>= 1.0.0)
i18n (1.14.5)
i18n (1.14.6)
concurrent-ruby (~> 1.0)
i18n-js (4.2.3)
glob (>= 0.4.0)
Expand All @@ -662,8 +662,9 @@ GEM
rails-i18n
rainbow (>= 2.2.2, < 4.0)
terminal-table (>= 1.5.1)
icalendar (2.10.2)
icalendar (2.10.3)
ice_cube (~> 0.16)
ostruct
ice_cube (0.17.0)
ice_nine (0.11.2)
interception (0.5)
Expand Down Expand Up @@ -699,7 +700,7 @@ GEM
launchy (3.0.1)
addressable (~> 2.8)
childprocess (~> 5.0)
lefthook (1.7.15)
lefthook (1.7.16)
letter_opener (1.10.0)
launchy (>= 2.2, < 4)
letter_opener_web (3.0.0)
Expand Down Expand Up @@ -781,9 +782,9 @@ GEM
bigdecimal (>= 3.0)
ostruct (>= 0.2)
okcomputer (1.18.5)
omniauth-saml (1.10.3)
omniauth-saml (1.10.5)
omniauth (~> 1.3, >= 1.3.2)
ruby-saml (~> 1.9)
ruby-saml (~> 1.17)
op-clamav-client (3.4.2)
open4 (1.3.4)
openid_connect (2.2.1)
Expand Down Expand Up @@ -870,7 +871,7 @@ GEM
eventmachine_httpserver
http_parser.rb (~> 0.6.0)
multi_json
puma (6.4.2)
puma (6.4.3)
nio4r (~> 2.0)
puma-plugin-statsd (2.6.0)
puma (>= 5.0, < 7)
Expand Down Expand Up @@ -1001,6 +1002,8 @@ GEM
rspec-retry (0.6.2)
rspec-core (> 3.3)
rspec-support (3.13.1)
rspec-wait (1.0.1)
rspec (>= 3.4)
rubocop (1.66.1)
json (~> 2.3)
language_server-protocol (>= 3.17.0)
Expand Down Expand Up @@ -1055,7 +1058,7 @@ GEM
secure_headers (6.5.0)
selenium-devtools (0.128.0)
selenium-webdriver (~> 4.2)
selenium-webdriver (4.24.0)
selenium-webdriver (4.25.0)
base64 (~> 0.2)
logger (~> 1.4)
rexml (~> 3.2, >= 3.2.5)
Expand Down Expand Up @@ -1090,7 +1093,7 @@ GEM
sprockets (>= 3.0.0)
ssrf_filter (1.0.8)
stackprof (0.2.26)
store_attribute (1.3.0)
store_attribute (1.3.1)
activerecord (>= 6.1)
stringex (2.8.6)
stringio (3.1.1)
Expand Down Expand Up @@ -1118,9 +1121,8 @@ GEM
openssl-signature_algorithm (~> 1.0)
trailblazer-option (0.1.2)
ttfunk (1.7.0)
turbo-rails (2.0.6)
turbo-rails (2.0.10)
actionpack (>= 6.0.0)
activejob (>= 6.0.0)
railties (>= 6.0.0)
turbo_power (0.6.2)
turbo-rails (>= 1.3.0)
Expand Down Expand Up @@ -1347,6 +1349,7 @@ DEPENDENCIES
rspec (~> 3.13.0)
rspec-rails (~> 7.0.0)
rspec-retry (~> 0.6.1)
rspec-wait
rubocop
rubocop-capybara
rubocop-factory_bot
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,31 @@ def wrapper_uniq_by
end

def more_menu_items
[]
@more_menu_items ||= [more_menu_detach_project].compact
end

private

def more_menu_detach_project
if User.current.allowed_in_project?(:select_custom_fields, project)
{
scheme: :default,
icon: nil,
label: I18n.t("projects.settings.project_custom_fields.actions.remove_from_project"),
href: detach_from_project_url,
data: { turbo_method: :delete }
}
end
end

def detach_from_project_url
url_helpers.custom_field_project_path(
custom_field_id: @table.params[:custom_field].id,
custom_fields_project: { project_id: project.id }
)
end

def project = model.first
end
end
end
Expand Down
48 changes: 48 additions & 0 deletions app/components/admin/design_header_component.html.erb
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
<%#-- 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.
++#%>

<% helpers.html_title t(:label_administration), t(:label_custom_style), selected_tab(@tabs)[:label] %>
<%=
render(Primer::OpenProject::PageHeader.new) do |header|
header.with_title { t(:label_custom_style) }
header.with_breadcrumbs([{ href: admin_index_path, text: t(:label_administration) },
t(:label_custom_style)])
header.with_description { t(:label_custom_style_description) }

if @tabs.present?
header.with_tab_nav(label: nil) do |tab_nav|
@tabs.each do |tab|
tab_nav.with_tab(selected: selected_tab(@tabs) == tab, href: tab[:path]) do |t|
t.with_text { tab[:label] }
end
end
end
end
end
%>
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# frozen_string_literal: true

#-- copyright
# OpenProject is an open source project management software.
# Copyright (C) the OpenProject GmbH
Expand Down Expand Up @@ -26,26 +28,15 @@
# See COPYRIGHT and LICENSE files for more details.
#++

class BannerMessageComponent < ApplicationComponent # rubocop:disable OpenProject/AddPreviewForViewComponent
def initialize(message: nil,
full: true,
full_when_narrow: false,
dismiss_scheme: :hide,
dismiss_label: I18n.t("button_close"),
icon: false,
scheme: :default,
test_selector: "primer-banner-message-component")
super
module Admin
class DesignHeaderComponent < ApplicationComponent
include OpPrimer::ComponentHelpers
include ApplicationHelper
include TabsHelper

@message = message
@full = full
@full_when_narrow = full_when_narrow
@dismiss_scheme = dismiss_scheme
@dismiss_label = dismiss_label
@icon = icon
@scheme = scheme
@test_selector = test_selector
def initialize(tabs: [])
super
@tabs = tabs
end
end

attr_reader :message, :full, :full_when_narrow, :dismiss_scheme, :dismiss_label, :icon, :scheme, :test_selector
end
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
scheme: :link,
data: { "expandable-list-target": "showButton",
action: "expandable-list#showElements" }
)) { I18n.t("label_show_n_more", count: elements.count - @cutoff_limit) }
)) { I18n.t("label_show_more") }
end
end
end
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,12 +28,11 @@ See COPYRIGHT and LICENSE files for more details.
++#%>

<%=
render(Primer::Alpha::Banner.new(full:,
full_when_narrow:,
dismiss_scheme:,
dismiss_label:,
icon:,
scheme:,
test_selector:,
)) { message.html_safe }
render(Primer::BaseComponent.new(
tag: :div,
classes: "op-primer-flash--item",
data: { unique_key: @unique_key }.compact
)) do
render_parent
end
%>
45 changes: 45 additions & 0 deletions app/components/op_primer/flash_component.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
#-- 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 OpPrimer
class FlashComponent < Primer::Alpha::Banner
include ApplicationHelper
include OpTurbo::Streamable
include OpPrimer::ComponentHelpers

def initialize(**system_arguments)
@unique_key = system_arguments.delete(:unique_key)

system_arguments[:test_selector] ||= "primer-banner-message-component"
system_arguments[:dismiss_scheme] ||= :remove
system_arguments[:dismiss_label] ||= I18n.t(:button_close)

super
end
end
end
Loading

0 comments on commit d0d5330

Please sign in to comment.