app/views/documents/show.html.slim
- breadcrumb :document, @workbench, @document
- page_header_content_for @document
- javascript_additional_packs 'documents/show'
.page_content
.container-fluid
.col-lg-6.col-md-6.col-sm-12.col-xs-12
.row
= simple_block_for @document, title: t('documents.form.sections.identification') do |d|
= d.attribute :uuid
= d.attribute :name
= d.attribute :document_type, as: :association
= d.attribute :from, as: :date, value: @document.validity_period&.from
= d.attribute :to, as: :date, value: @document.validity_period&.to
.row
= render 'codes/block', model: @document
.col-lg-6.col-md-6.col-sm-12.col-xs-12
= simple_block_for @document, title: t('documents.form.sections.content') do |d|
= d.attribute :file, value: @document.file.file.filename
= d.attribute :content_type, value: @document.file.file.content_type
= d.attribute :description
= d.attribute :preview, value: "<div x-data='filePreview(#{@document.preview_json})'></div>".html_safe