Breadcrumbs on label/protocol template page [SCI-8476]

This commit is contained in:
Giga Chubinidze 2023-06-13 11:25:14 +04:00
parent c152df4e71
commit 673718f1db
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"