demarches-normaliennes/app/views/administrateurs/_breadcrumbs.html.haml

34 lines
1.7 KiB
Text
Raw Normal View History

#breadcrumbs.sub-header
.container.flex.justify-between.align-baseline.column
%nav.fr-breadcrumb.mt-0{ role: "navigation", aria: { label: t('you_are_here', scope: [:layouts, :breadcrumb]) } }
%button.fr-breadcrumb__button{ aria: { expanded: "false", controls: "breadcrumb-1" } }
= t('show', scope: [:layouts, :breadcrumb])
.fr-collapse#breadcrumb-1
%ol.fr-breadcrumb__list
%li= link_to t('root', scope: [:layouts, :breadcrumb]), root_path, class: 'fr-breadcrumb__link'
- steps.each.with_index do |step, i|
- if i == steps.size - 1
%li{ aria: {current: "page"}}
%span.fr-breadcrumb__link= step[0]
- else
%li= link_to step[0], step[1], class: 'fr-breadcrumb__link'
2018-11-14 16:28:02 +01:00
- if defined?(preview) && preview
.mb-2
= link_to t('preview', scope: [:layouts, :breadcrumb]), apercu_admin_procedure_path(@procedure), target: "_blank", rel: "noopener", class: 'button'
= link_to t('continue', scope: [:layouts, :breadcrumb]), admin_procedure_path(@procedure), title: t('continue_title', scope: [:layouts, :breadcrumb]), class: 'button accepted'
- if defined?(metadatas)
.metadatas.pb-3
%h1= t('created_at', number: @procedure.id, date: @procedure.created_at.strftime('%d/%m/%Y'), scope: [:layouts, :breadcrumb])
- if @procedure.close?
%h2= t('closed_at', date: @procedure.closed_at.strftime('%d/%m/%Y'), scope: [:layouts, :breadcrumb])
%p
- if @procedure.locked?
= t('published', scope: [:layouts, :breadcrumb])
= link_to procedure_lien(@procedure), procedure_lien(@procedure)
- else
= t('draft', scope: [:layouts, :breadcrumb])