Merge pull request #5586 from G-Chubinidze/gc_SCI_8476

Breadcrumbs on label/protocol template page [SCI-8476]
This commit is contained in:
artoscinote 2023-06-13 14:49:14 +02:00 committed by GitHub
commit 820bf7808a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 13 additions and 2 deletions

View file

@ -206,10 +206,14 @@ class LabelTemplatesController < ApplicationController
@breadcrumbs_items = []
@breadcrumbs_items.push({
label: t('breadcrumbs.labels'),
label: t('breadcrumbs.templates'),
url: label_templates_path
})
@breadcrumbs_items.push({
label: t('breadcrumbs.labels'),
url: label_templates_path
})
if @label_template
@breadcrumbs_items.push({
label: @label_template.name,

View file

@ -1162,6 +1162,12 @@ class ProtocolsController < ApplicationController
@breadcrumbs_items = []
archived_branch = params[:type] == 'archived' || @protocol&.archived?
@breadcrumbs_items.push({
label: t('breadcrumbs.templates'),
url: archived_branch ? protocols_path(type: :archived) : protocols_path,
archived: archived_branch
})
@breadcrumbs_items.push({
label: t('breadcrumbs.protocols'),
url: archived_branch ? protocols_path(type: :archived) : protocols_path,

View file

@ -3588,10 +3588,11 @@ en:
not_valid: "Not valid URL"
breadcrumbs:
templates: "Templates"
projects: "Projects"
inventories: "Inventories"
protocols: "Protocol templates"
labels: "Label templates"
labels: "Label"
Add: "Add"
Asset: "File"