mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2025-09-14 00:54:32 +08:00
Breadcrumbs on label/protocol template page [SCI-8476]
This commit is contained in:
parent
c152df4e71
commit
673718f1db
3 changed files with 13 additions and 2 deletions
|
@ -206,10 +206,14 @@ class LabelTemplatesController < ApplicationController
|
||||||
@breadcrumbs_items = []
|
@breadcrumbs_items = []
|
||||||
|
|
||||||
@breadcrumbs_items.push({
|
@breadcrumbs_items.push({
|
||||||
label: t('breadcrumbs.labels'),
|
label: t('breadcrumbs.templates'),
|
||||||
url: label_templates_path
|
url: label_templates_path
|
||||||
})
|
})
|
||||||
|
|
||||||
|
@breadcrumbs_items.push({
|
||||||
|
label: t('breadcrumbs.labels'),
|
||||||
|
url: label_templates_path
|
||||||
|
})
|
||||||
if @label_template
|
if @label_template
|
||||||
@breadcrumbs_items.push({
|
@breadcrumbs_items.push({
|
||||||
label: @label_template.name,
|
label: @label_template.name,
|
||||||
|
|
|
@ -1162,6 +1162,12 @@ class ProtocolsController < ApplicationController
|
||||||
@breadcrumbs_items = []
|
@breadcrumbs_items = []
|
||||||
archived_branch = params[:type] == 'archived' || @protocol&.archived?
|
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({
|
@breadcrumbs_items.push({
|
||||||
label: t('breadcrumbs.protocols'),
|
label: t('breadcrumbs.protocols'),
|
||||||
url: archived_branch ? protocols_path(type: :archived) : protocols_path,
|
url: archived_branch ? protocols_path(type: :archived) : protocols_path,
|
||||||
|
|
|
@ -3588,10 +3588,11 @@ en:
|
||||||
not_valid: "Not valid URL"
|
not_valid: "Not valid URL"
|
||||||
|
|
||||||
breadcrumbs:
|
breadcrumbs:
|
||||||
|
templates: "Templates"
|
||||||
projects: "Projects"
|
projects: "Projects"
|
||||||
inventories: "Inventories"
|
inventories: "Inventories"
|
||||||
protocols: "Protocol templates"
|
protocols: "Protocol templates"
|
||||||
labels: "Label templates"
|
labels: "Label"
|
||||||
|
|
||||||
Add: "Add"
|
Add: "Add"
|
||||||
Asset: "File"
|
Asset: "File"
|
||||||
|
|
Loading…
Add table
Reference in a new issue