Skip to content

Commit

Permalink
Merge branch 'release/15.2' into dev
Browse files Browse the repository at this point in the history
  • Loading branch information
openprojectci committed Feb 1, 2025
2 parents 93ccb0c + f033ef9 commit 70acee7
Show file tree
Hide file tree
Showing 84 changed files with 148 additions and 213 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,11 @@ def initialize(tabs: nil)
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]
[
{ href: admin_index_path, text: t("label_administration") },
helpers.nested_breadcrumb_element(t(:"attribute_help_texts.label_plural"),
I18n.t(currently_selected_tab[:label].to_s))
]
end

def currently_selected_tab
Expand Down
8 changes: 5 additions & 3 deletions app/components/custom_fields/index_page_header_component.rb
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,11 @@ def initialize(tabs: nil)
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]
[
{ href: admin_index_path, text: t("label_administration") },
helpers.nested_breadcrumb_element(t(:label_custom_field_plural),
I18n.t(currently_selected_tab[:label].to_s))
]
end

def currently_selected_tab
Expand Down
2 changes: 1 addition & 1 deletion app/components/members/index_page_header_component.rb
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ def current_breadcrumb_element

if @query && query_name
if menu_header.present?
I18n.t("menus.breadcrumb.nested_element", section_header: menu_header, title: query_name).html_safe
helpers.nested_breadcrumb_element(menu_header, query_name)
else
query_name
end
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ def breadcrumb_items

def current_breadcrumb_element
if current_section && current_section.header.present?
I18n.t("menus.breadcrumb.nested_element", section_header: current_section.header, title: page_title).html_safe
helpers.nested_breadcrumb_element(current_section.header, page_title)
else
page_title
end
Expand Down
2 changes: 1 addition & 1 deletion app/components/projects/index_page_header_component.rb
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ def current_breadcrumb_element
return page_title if query.name.blank?

if current_section && current_section.header.present?
I18n.t("menus.breadcrumb.nested_element", section_header: current_section.header, title: query.name).html_safe
helpers.nested_breadcrumb_element(current_section.header, query.name)
else
page_title
end
Expand Down
8 changes: 8 additions & 0 deletions app/helpers/breadcrumb_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,14 @@ def full_breadcrumbs
end
end

def nested_breadcrumb_element(section_header, title)
output = "".html_safe
output << "#{section_header}: "
output << content_tag(:strong, title)

output
end

def breadcrumb_paths(*args)
if args.empty?
@breadcrumb_paths ||= [default_breadcrumb]
Expand Down
12 changes: 8 additions & 4 deletions app/views/enumerations/edit.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,14 @@ See COPYRIGHT and LICENSE files for more details.
<%=
render(Primer::OpenProject::PageHeader.new) do |header|
header.with_title { h @enumeration.name }
header.with_breadcrumbs([{ href: admin_index_path, text: t(:label_administration) },
{ href: enumerations_path, text: t(:label_enumerations) },
I18n.t("menus.breadcrumb.nested_element", section_header: t(@enumeration.option_name), title: h(@enumeration.name)).html_safe],
selected_item_font_weight: :normal)
header.with_breadcrumbs(
[
{ href: admin_index_path, text: t(:label_administration) },
{ href: enumerations_path, text: t(:label_enumerations) },
nested_breadcrumb_element(t(@enumeration.option_name), @enumeration.name)
],
selected_item_font_weight: :normal
)
end
%>

Expand Down
11 changes: 7 additions & 4 deletions app/views/enumerations/new.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,13 @@ See COPYRIGHT and LICENSE files for more details.
<%=
render(Primer::OpenProject::PageHeader.new) do |header|
header.with_title { t(:label_enumeration_new) }
header.with_breadcrumbs([{ href: admin_index_path, text: t(:label_administration) },
{ href: enumerations_path, text: t(:label_enumerations) },
I18n.t("menus.breadcrumb.nested_element", section_header: t(@enumeration.option_name), title: t(:label_enumeration_new)).html_safe],
selected_item_font_weight: :normal)
header.with_breadcrumbs(
[{ href: admin_index_path, text: t(:label_administration) },
{ href: enumerations_path, text: t(:label_enumerations) },
nested_breadcrumb_element(t(@enumeration.option_name), t(:label_enumeration_new))
],
selected_item_font_weight: :normal
)
end
%>

Expand Down
2 changes: 0 additions & 2 deletions config/locales/crowdin/af.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2108,8 +2108,6 @@ af:
api_and_webhooks: "API and webhooks"
quick_add:
label: "Open quick add menu"
breadcrumb:
nested_element: "%{section_header}: <b>%{title}</b>"
my_account:
access_tokens:
no_results:
Expand Down
2 changes: 0 additions & 2 deletions config/locales/crowdin/ar.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2260,8 +2260,6 @@ ar:
api_and_webhooks: "API and webhooks"
quick_add:
label: "Open quick add menu"
breadcrumb:
nested_element: "%{section_header}: <b>%{title}</b>"
my_account:
access_tokens:
no_results:
Expand Down
2 changes: 0 additions & 2 deletions config/locales/crowdin/az.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2108,8 +2108,6 @@ az:
api_and_webhooks: "API and webhooks"
quick_add:
label: "Open quick add menu"
breadcrumb:
nested_element: "%{section_header}: <b>%{title}</b>"
my_account:
access_tokens:
no_results:
Expand Down
2 changes: 0 additions & 2 deletions config/locales/crowdin/be.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2184,8 +2184,6 @@ be:
api_and_webhooks: "API and webhooks"
quick_add:
label: "Open quick add menu"
breadcrumb:
nested_element: "%{section_header}: <b>%{title}</b>"
my_account:
access_tokens:
no_results:
Expand Down
2 changes: 0 additions & 2 deletions config/locales/crowdin/bg.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2108,8 +2108,6 @@ bg:
api_and_webhooks: "API и уеб куки"
quick_add:
label: "Отворете менюто за бързо добавяне"
breadcrumb:
nested_element: "%{section_header}: <b>%{title}</b>"
my_account:
access_tokens:
no_results:
Expand Down
2 changes: 0 additions & 2 deletions config/locales/crowdin/ca.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2105,8 +2105,6 @@ ca:
api_and_webhooks: "API i webhooks"
quick_add:
label: "Obre el menú d'afegir ràpidament"
breadcrumb:
nested_element: "%{section_header}: <b>%{title}</b>"
my_account:
access_tokens:
no_results:
Expand Down
2 changes: 0 additions & 2 deletions config/locales/crowdin/ckb-IR.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2108,8 +2108,6 @@ ckb-IR:
api_and_webhooks: "API and webhooks"
quick_add:
label: "Open quick add menu"
breadcrumb:
nested_element: "%{section_header}: <b>%{title}</b>"
my_account:
access_tokens:
no_results:
Expand Down
2 changes: 0 additions & 2 deletions config/locales/crowdin/cs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2184,8 +2184,6 @@ cs:
api_and_webhooks: "API & Webhooky"
quick_add:
label: "Otevřít nabídku rychlého přidání"
breadcrumb:
nested_element: "%{section_header}: <b>%{title}</b>"
my_account:
access_tokens:
no_results:
Expand Down
2 changes: 0 additions & 2 deletions config/locales/crowdin/da.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2106,8 +2106,6 @@ da:
api_and_webhooks: "API and webhooks"
quick_add:
label: "Åbn hurtig-tilføj menu"
breadcrumb:
nested_element: "%{section_header}: <b>%{title}</b>"
my_account:
access_tokens:
no_results:
Expand Down
2 changes: 0 additions & 2 deletions config/locales/crowdin/de.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2101,8 +2101,6 @@ de:
api_and_webhooks: "API und Webhooks"
quick_add:
label: "Schnellmenue öffnen"
breadcrumb:
nested_element: "%{section_header}: <b>%{title}</b>"
my_account:
access_tokens:
no_results:
Expand Down
2 changes: 0 additions & 2 deletions config/locales/crowdin/el.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2104,8 +2104,6 @@ el:
api_and_webhooks: "API and webhooks"
quick_add:
label: "Άνοιγμα μενού γρήγορης προσθήκης"
breadcrumb:
nested_element: "%{section_header}: <b>%{title}</b>"
my_account:
access_tokens:
no_results:
Expand Down
2 changes: 0 additions & 2 deletions config/locales/crowdin/eo.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2108,8 +2108,6 @@ eo:
api_and_webhooks: "API and webhooks"
quick_add:
label: "Open quick add menu"
breadcrumb:
nested_element: "%{section_header}: <b>%{title}</b>"
my_account:
access_tokens:
no_results:
Expand Down
2 changes: 0 additions & 2 deletions config/locales/crowdin/es.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2105,8 +2105,6 @@ es:
api_and_webhooks: "API y webhooks"
quick_add:
label: "Abrir menú de adición rápida"
breadcrumb:
nested_element: "%{section_header}: <b>%{title}</b>"
my_account:
access_tokens:
no_results:
Expand Down
2 changes: 0 additions & 2 deletions config/locales/crowdin/et.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2108,8 +2108,6 @@ et:
api_and_webhooks: "API and webhooks"
quick_add:
label: "Open quick add menu"
breadcrumb:
nested_element: "%{section_header}: <b>%{title}</b>"
my_account:
access_tokens:
no_results:
Expand Down
2 changes: 0 additions & 2 deletions config/locales/crowdin/eu.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2108,8 +2108,6 @@ eu:
api_and_webhooks: "API and webhooks"
quick_add:
label: "Open quick add menu"
breadcrumb:
nested_element: "%{section_header}: <b>%{title}</b>"
my_account:
access_tokens:
no_results:
Expand Down
2 changes: 0 additions & 2 deletions config/locales/crowdin/fa.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2108,8 +2108,6 @@ fa:
api_and_webhooks: "API and webhooks"
quick_add:
label: "Open quick add menu"
breadcrumb:
nested_element: "%{section_header}: <b>%{title}</b>"
my_account:
access_tokens:
no_results:
Expand Down
2 changes: 0 additions & 2 deletions config/locales/crowdin/fi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2108,8 +2108,6 @@ fi:
api_and_webhooks: "API and webhooks"
quick_add:
label: "Open quick add menu"
breadcrumb:
nested_element: "%{section_header}: <b>%{title}</b>"
my_account:
access_tokens:
no_results:
Expand Down
2 changes: 0 additions & 2 deletions config/locales/crowdin/fil.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2108,8 +2108,6 @@ fil:
api_and_webhooks: "API and webhooks"
quick_add:
label: "Open quick add menu"
breadcrumb:
nested_element: "%{section_header}: <b>%{title}</b>"
my_account:
access_tokens:
no_results:
Expand Down
2 changes: 0 additions & 2 deletions config/locales/crowdin/fr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2106,8 +2106,6 @@ fr:
api_and_webhooks: "API et webhooks"
quick_add:
label: "Ouvrir le menu d'ajout rapide"
breadcrumb:
nested_element: "%{section_header} : <b>%{title}</b>"
my_account:
access_tokens:
no_results:
Expand Down
2 changes: 0 additions & 2 deletions config/locales/crowdin/he.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2184,8 +2184,6 @@ he:
api_and_webhooks: "API and webhooks"
quick_add:
label: "Open quick add menu"
breadcrumb:
nested_element: "%{section_header}: <b>%{title}</b>"
my_account:
access_tokens:
no_results:
Expand Down
2 changes: 0 additions & 2 deletions config/locales/crowdin/hi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2106,8 +2106,6 @@ hi:
api_and_webhooks: "API and webhooks"
quick_add:
label: "Open quick add menu"
breadcrumb:
nested_element: "%{section_header}: <b>%{title}</b>"
my_account:
access_tokens:
no_results:
Expand Down
2 changes: 0 additions & 2 deletions config/locales/crowdin/hr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2146,8 +2146,6 @@ hr:
api_and_webhooks: "API and webhooks"
quick_add:
label: "Open quick add menu"
breadcrumb:
nested_element: "%{section_header}: <b>%{title}</b>"
my_account:
access_tokens:
no_results:
Expand Down
2 changes: 0 additions & 2 deletions config/locales/crowdin/hu.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2106,8 +2106,6 @@ hu:
api_and_webhooks: "API és webhookok"
quick_add:
label: "Gyorsmenü megnyitása"
breadcrumb:
nested_element: "%{section_header}: <b>%{title}</b>"
my_account:
access_tokens:
no_results:
Expand Down
2 changes: 0 additions & 2 deletions config/locales/crowdin/id.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2064,8 +2064,6 @@ id:
api_and_webhooks: "API dan webhook"
quick_add:
label: "Buka cepat tambah menu"
breadcrumb:
nested_element: "%{section_header}: <b>%{title}</b>"
my_account:
access_tokens:
no_results:
Expand Down
2 changes: 0 additions & 2 deletions config/locales/crowdin/it.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2104,8 +2104,6 @@ it:
api_and_webhooks: "API e webhooks"
quick_add:
label: "Apri menu di aggiunta rapida"
breadcrumb:
nested_element: "%{section_header}: <b>%{title}</b>"
my_account:
access_tokens:
no_results:
Expand Down
2 changes: 0 additions & 2 deletions config/locales/crowdin/ja.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2066,8 +2066,6 @@ ja:
api_and_webhooks: "API and webhooks"
quick_add:
label: "クイック追加メニューを開く"
breadcrumb:
nested_element: "%{section_header}: <b>%{title}</b>"
my_account:
access_tokens:
no_results:
Expand Down
2 changes: 0 additions & 2 deletions config/locales/crowdin/ka.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2108,8 +2108,6 @@ ka:
api_and_webhooks: "API and webhooks"
quick_add:
label: "Open quick add menu"
breadcrumb:
nested_element: "%{section_header}: <b>%{title}</b>"
my_account:
access_tokens:
no_results:
Expand Down
2 changes: 0 additions & 2 deletions config/locales/crowdin/kk.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2108,8 +2108,6 @@ kk:
api_and_webhooks: "API and webhooks"
quick_add:
label: "Open quick add menu"
breadcrumb:
nested_element: "%{section_header}: <b>%{title}</b>"
my_account:
access_tokens:
no_results:
Expand Down
2 changes: 0 additions & 2 deletions config/locales/crowdin/ko.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2069,8 +2069,6 @@ ko:
api_and_webhooks: "API 및 webhook"
quick_add:
label: "빠른 추가 메뉴 열기"
breadcrumb:
nested_element: "%{section_header}: <b>%{title}</b>"
my_account:
access_tokens:
no_results:
Expand Down
2 changes: 0 additions & 2 deletions config/locales/crowdin/lt.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2181,8 +2181,6 @@ lt:
api_and_webhooks: "API ir tinklo jungtys"
quick_add:
label: "Atidaryti greitą pridėjimo meniu"
breadcrumb:
nested_element: "%{section_header}: <b>%{title}</b>"
my_account:
access_tokens:
no_results:
Expand Down
2 changes: 0 additions & 2 deletions config/locales/crowdin/lv.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2146,8 +2146,6 @@ lv:
api_and_webhooks: "API and webhooks"
quick_add:
label: "Open quick add menu"
breadcrumb:
nested_element: "%{section_header}: <b>%{title}</b>"
my_account:
access_tokens:
no_results:
Expand Down
2 changes: 0 additions & 2 deletions config/locales/crowdin/mn.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2108,8 +2108,6 @@ mn:
api_and_webhooks: "API and webhooks"
quick_add:
label: "Open quick add menu"
breadcrumb:
nested_element: "%{section_header}: <b>%{title}</b>"
my_account:
access_tokens:
no_results:
Expand Down
Loading

0 comments on commit 70acee7

Please sign in to comment.