.container-fluid.summary-documents-page .row .col-md-3 = render partial: "respondent_categories/sidebar" .col-md-9 = render_breadcrumbs([ \ { name: 'Home', path: projects_path }, \ { name: @project.title, path: project_path(@project) }, \ { name: @respondent_category.name, path: [@project, @respondent_category] }, \ { name: "Summary Documents" } \ ]) .page-header.d-flex.justify-content-between.align-items-center.mb-4 div h2.fw-bold.mb-1 Summary Documents p.text-muted.mb-0 = @respondent_category.name = link_to new_project_respondent_category_summary_document_path(@project, @respondent_category), class: "new-doc-btn modal-trigger", data: { turbo_frame: "modal_frame" } do i.bi.bi-plus-lg | New Document - if @summary_documents.empty? .empty-state i.bi.bi-file-earmark-text.fs-1 p.mt-2.mb-0 | No summary documents yet. - else - @summary_documents.each do |doc| .document-row data-controller="clickable-row" data-clickable-row-url-value="#{project_respondent_category_summary_document_path(@project, @respondent_category, doc)}" data-action="click->clickable-row#visit" .doc-icon-wrap i.bi.bi-file-earmark-text.fs-5 .doc-info .doc-name = doc.name .doc-meta - if doc.last_edited_by | Edited by #{doc.last_edited_by.name} ยท #{time_ago_in_words(doc.updated_at)} ago - else | Not yet edited - if doc.locked? span.lock-badge i.bi.bi-lock-fill | In use .row-actions data-action="click->clickable-row#stop" / = link_to project_respondent_category_summary_document_path(@project, @respondent_category, doc), class: "action-btn", title: "View" do / i.bi.bi-eye = link_to edit_project_respondent_category_summary_document_path(@project, @respondent_category, doc), class: "action-btn action-btn-primary", title: "Edit" do i.bi.bi-pencil = link_to export_project_respondent_category_summary_document_path(@project, @respondent_category, doc), class: "action-btn", title: "Export" do i.bi.bi-download = button_to project_respondent_category_summary_document_path(@project, @respondent_category, doc), method: :delete, class: "action-btn action-btn-danger", form_class: "action-form", form: { data: { turbo_confirm: "Delete '#{doc.name}'? This can't be undone." } } do i.bi.bi-trash