Skip to content

Commit

Permalink
Merge branch 'dev' into feature/57024-macros-for-work-package-descrip…
Browse files Browse the repository at this point in the history
…tions-which-are-relative-to-respective-work-packages
  • Loading branch information
as-op authored Aug 29, 2024
2 parents 2beb411 + acbcb07 commit a21985f
Show file tree
Hide file tree
Showing 472 changed files with 11,163 additions and 3,021 deletions.
6 changes: 3 additions & 3 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -342,8 +342,8 @@ GEM
activerecord (>= 4.0.0, < 7.2)
awrence (1.2.1)
aws-eventstream (1.3.0)
aws-partitions (1.966.0)
aws-sdk-core (3.201.5)
aws-partitions (1.968.0)
aws-sdk-core (3.202.0)
aws-eventstream (~> 1, >= 1.3.0)
aws-partitions (~> 1, >= 1.651.0)
aws-sigv4 (~> 1.9)
Expand Down Expand Up @@ -1143,7 +1143,7 @@ GEM
public_suffix
vcr (6.3.1)
base64
view_component (3.13.0)
view_component (3.14.0)
activesupport (>= 5.2.0, < 8.0)
concurrent-ruby (~> 1.0)
method_source (~> 1.0)
Expand Down
Binary file not shown.
65 changes: 65 additions & 0 deletions app/components/admin/backups/show_page_header_component.html.erb
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
<%#-- 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.
++#%>
<%=
render(Primer::OpenProject::PageHeader.new) do |header|
header.with_title { t(:label_backup) }
header.with_breadcrumbs([{ href: admin_index_path, text: t(:label_administration) },
t(:label_backup)])

header.with_action_button(tag: :a,
scheme: button_scheme,
mobile_label: button_title,
mobile_icon: button_icon,
size: :medium,
href: reset_token_admin_backups_path,
aria: { label: button_title },
title: button_title) do |button|
button.with_leading_visual_icon(icon: button_icon)
button_title
end

if @backup_token.present?
header.with_action_button(tag: :a,
scheme: :danger,
mobile_icon: :trash,
mobile_label: t("backup.label_delete_token"),
size: :medium,
href: delete_token_admin_backups_path,
aria: { label: I18n.t("backup.label_delete_token") },
data: {
confirm: I18n.t(:text_are_you_sure),
method: :post
},
title: I18n.t(:button_delete)) do |button|
button.with_leading_visual_icon(icon: :trash)
t("backup.label_delete_token")
end
end
end
%>
61 changes: 61 additions & 0 deletions app/components/admin/backups/show_page_header_component.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
# frozen_string_literal: true

# -- 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 Backups
class ShowPageHeaderComponent < ApplicationComponent
include OpPrimer::ComponentHelpers
include ApplicationHelper

def initialize(backup_token:)
super
@backup_token = backup_token
end

def breadcrumb_items
[{ href: admin_index_path, text: t(:label_administration) },
t(:label_backup)]
end

def button_title
button_action = @backup_token.present? ? "reset" : "create"
t("backup.label_#{button_action}_token")
end

def button_icon
@backup_token.present? ? :"op-reload" : :plus
end

def button_scheme
@backup_token.present? ? :default : :primary
end
end
end
end
Original file line number Diff line number Diff line change
Expand Up @@ -26,13 +26,17 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
See COPYRIGHT and LICENSE files for more details.
++#%>

<% html_title t(:label_administration), t(:'attribute_help_texts.label_plural') %>

<%= render template: 'common/upsale',
locals: {
feature_title: t(:'attribute_help_texts.label_plural'),
feature_description: t('attribute_help_texts.enterprise.description'),
feature_reference: 'enterprise-attribute-help-texts',
feature_image: 'enterprise/attribute-help-texts.png'
} %>
<%=
render(Primer::OpenProject::PageHeader.new) do |header|
header.with_title { I18n.t(:"attribute_help_texts.label_plural") }
header.with_breadcrumbs(breadcrumb_items, selected_item_font_weight: :normal)

header.with_tab_nav(label: nil) do |tab_nav|
@tabs.each do |tab|
tab_nav.with_tab(selected: currently_selected_tab == tab, href: tab[:path]) do |t|
t.with_text { I18n.t(tab[:label]) }
end
end
end if @tabs.present?
end
%>
50 changes: 50 additions & 0 deletions app/components/attribute_help_texts/index_page_header_component.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
# frozen_string_literal: true

# -- 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.
# ++

class AttributeHelpTexts::IndexPageHeaderComponent < ApplicationComponent
include OpPrimer::ComponentHelpers
include ApplicationHelper
include TabsHelper

def initialize(tabs: nil)
super
@tabs = tabs
end

def breadcrumb_items
[{ href: admin_index_path, text: t("label_administration") },
I18n.t("menus.breadcrumb.nested_element", section_header: t(:"attribute_help_texts.label_plural"),
title: I18n.t(currently_selected_tab[:label].to_s)).html_safe]
end

def currently_selected_tab
@currently_selected_tab ||= selected_tab(@tabs)
end
end
42 changes: 42 additions & 0 deletions app/components/custom_fields/index_page_header_component.html.erb
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
<%#-- 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.
++#%>
<%=
render(Primer::OpenProject::PageHeader.new) do |header|
header.with_title { I18n.t(:label_custom_field_plural) }
header.with_breadcrumbs(breadcrumb_items, selected_item_font_weight: :normal)

header.with_tab_nav(label: nil, test_selector: "custom-fields--tab-nav") do |tab_nav|
@tabs.each do |tab|
tab_nav.with_tab(selected: currently_selected_tab == tab, href: tab[:path]) do |t|
t.with_text { I18n.t(tab[:label]) }
end
end
end if @tabs.present?
end
%>
50 changes: 50 additions & 0 deletions app/components/custom_fields/index_page_header_component.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
# frozen_string_literal: true

# -- 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.
# ++

class CustomFields::IndexPageHeaderComponent < ApplicationComponent
include OpPrimer::ComponentHelpers
include ApplicationHelper
include TabsHelper

def initialize(tabs: nil)
super
@tabs = tabs
end

def breadcrumb_items
[{ href: admin_index_path, text: t("label_administration") },
I18n.t("menus.breadcrumb.nested_element", section_header: t(:label_custom_field_plural),
title: I18n.t(currently_selected_tab[:label].to_s)).html_safe]
end

def currently_selected_tab
@currently_selected_tab ||= selected_tab(@tabs)
end
end
3 changes: 2 additions & 1 deletion app/components/projects/row_component.rb
Original file line number Diff line number Diff line change
Expand Up @@ -342,7 +342,8 @@ def more_menu_copy_item
scheme: :default,
icon: :copy,
label: I18n.t(:button_copy),
href: copy_project_path(project)
href: copy_project_path(project),
data: { turbo: false }
}
end
end
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
selected: selected_columns,
protected: protected_options,
inputCaption: caption,
inputLabel: I18n.t(:"queries.configure_view.columns.input_label"),
inputLabel: label,
inputPlaceholder: I18n.t(:"queries.configure_view.columns.input_placeholder"),
dragAreaLabel: I18n.t(:"queries.configure_view.columns.drag_area_label"),
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,14 +33,16 @@ module Exports
class ColumnSelectionComponent < ApplicationComponent
include WorkPackagesHelper

attr_reader :query, :id, :caption
attr_reader :query, :id, :caption, :label

def initialize(query, id, caption)
def initialize(query, id, caption,
label = I18n.t(:"queries.configure_view.columns.input_label"))
super()

@query = query
@id = id
@caption = caption
@label = label
end

def available_columns
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@
<%= render WorkPackages::Exports::ColumnSelectionComponent.new(
query,
"columns-select-export-pdf-report",
I18n.t("export.dialog.columns.input_caption_report")
I18n.t("export.dialog.columns.input_caption_report"),
I18n.t("export.dialog.columns.input_label_report")
) %>
<% end %>
<% container.with_row do |_columns| %>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,10 +38,13 @@
<% end %>
<% end %>

<% modal_body.with_row(mt: 3) do |_tooltip| %>
<%= render(Primer::Beta::Text.new(font_weight: :semibold)) { t("work_package.progress.label_note") } %>
<%= render(Primer::Beta::Text.new) { t("work_package.progress.modal.work_based_help_text") } %>
<%= render(Primer::Beta::Link.new(href: learn_more_href)) { t(:label_learn_more) } %>
<%# This condition branch to be removed in 15.0 with :percent_complete_edition feature flag removal %>
<% unless OpenProject::FeatureDecisions.percent_complete_edition_active? %>
<% modal_body.with_row(mt: 3) do |_tooltip| %>
<%= render(Primer::Beta::Text.new(font_weight: :semibold)) { t("work_package.progress.label_note") } %>
<%= render(Primer::Beta::Text.new) { t("work_package.progress.modal.work_based_help_text_pre_14_4_without_percent_complete_edition") } %>
<%= render(Primer::Beta::Link.new(href: learn_more_href)) { t(:label_learn_more) } %>
<% end %>
<% end %>

<% modal_body.with_row(mt: 3) do |_actions_row| %>
Expand Down
1 change: 0 additions & 1 deletion app/components/work_packages/split_view_component.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@
inputs: {
work_package_id: params[:work_package_id] || @work_package.id,
resizerClass: "op-work-package-split-view",
resizeStyle: "width",
activeTab: @tab
}
end
Expand Down
Loading

0 comments on commit a21985f

Please sign in to comment.