<% set_page_title 'Materials Manager' %>
<%= render 'import_results', results: @results if @results %>

<%= t('.title') %>

<%= render 'search_form' %>
<%= check_box_tag 'selected_all', 'true' %> Select All on this page
<%= react_component 'admin/MultiSelectedOperation', { text: t('.reimport_selected'), operation: 'reimport', path: reimport_selected_admin_materials_path(query: params[:query]), btn_style: 'primary' } %> <%= react_component 'admin/MultiSelectedOperation', { text: t('.delete_selected'), operation: 'delete', path: delete_selected_admin_materials_path(query: params[:query]), btn_style: 'alert'} %> <%# link_to t('.new_material_pdf'), new_admin_material_path(source_type: 'pdf'), class: 'button primary' %> <%= link_to t('.new_material'), :new_admin_material, class: 'button primary' %>
<% @materials.each do |material| %> <% material = ::Lcms::Engine::DocumentGenerator.material_presenter.new material %> <% end %>
ID Identifier File Name Type Title Grade Guidebook Section Lesson Activity Page Orientation Name-Date Header-Footer Connected Lessons Last Update
<%= check_box_tag 'selected_ids[]', material.id, selected_id?(material.id), class: 'c-selected-ids' %> <%= material.id %> <%= link_to material.metadata['identifier'], ::Lcms::Engine::Admin::AdminController.material_path(material, request.query_parameters), target: '_blank' %> <%= link_to material.name, material.file_url, target: '_blank' %> <%= material.metadata['type'] %> <%= material.metadata['title'] %> <%= material.metadata['grade'] %> <%= material.metadata['guidebook'] %> <%= material.metadata['section'] %> <%= material.metadata['lesson'] %> <%= material.metadata['activity'] %> <%= material.metadata['orientation'] %> <%= material.metadata['name_date'] %> <%= material.metadata['header_footer'] %>
    <% material.documents.each do |lesson| %> <% lesson = ::Lcms::Engine::DocumentGenerator.document_presenter.new lesson %>
  • <%= link_to lesson.title, ::Lcms::Engine::Admin::AdminController.document_path(lesson, request.query_parameters), target: '_blank' %>
  • <% end %>
<%= material.reimported_at.to_s.presence || material.updated_at.to_s %> <%= render partial: 'lcms/engine/admin/materials/reimport', locals: { material: material } %> <%= button_to t('ui.delete'), admin_material_path(material, query: params[:query]), class: 'button small alert', data: { confirm: t('ui.are_you_sure') }, form_class: 'inline', method: :delete %> <% unless material.pdf? %> <%# link_to material.pdf_preview_title, preview_pdf_material_path(material), class: 'button warning', target: '_blank' %> <%# link_to material.gdoc_preview_title, preview_gdoc_material_path(material), class: 'button warning', target: '_blank' %> <% end %>
<%= will_paginate @materials, renderer: BootstrapPagination::Rails %>