scinote-web/app/views/reports/index.html.erb

76 lines
3.4 KiB
Text
Raw Normal View History

<%= stylesheet_link_tag 'datatables' %>
2016-02-12 23:52:43 +08:00
<% if params[:preview_report_id] %>
<%= hidden_field_tag :show_report_preview, nil, class: "file-preview-link", data: { preview_url: document_preview_report_path(params[:preview_report_id], report_type: params[:preview_type]) } %>
<% end %>
<% content_for :head do %>
<meta id="cache-directive" name="turbolinks-cache-control" content="no-cache">
<% end %>
<div class="content-pane flexible reports-index">
2021-03-16 20:11:15 +08:00
<%= render partial: 'reports/index_header' %>
<div id="content-reports-index">
2023-05-25 19:12:27 +08:00
<div class="reports-datatable">
<table id="reports-table"
class="table"
data-source="<%= reports_datatable_path(format: :json) %>">
<thead>
<tr>
<th id="select-all">
<div class="sci-checkbox-container">
<input name="select_all" type="checkbox" class="sci-checkbox">
<span class="sci-checkbox-label"></span>
</div>
</th>
<th id="project-name"><%= t('projects.reports.index.thead_project_name') %></th>
<th id="report-name"><%= t('projects.reports.index.thead_name') %></th>
<th id="report-id"><%= t('projects.reports.index.thead_id') %></th>
<th id="report-pdf"><%= t('projects.reports.index.pdf') %></th>
<th id="report-docx"><%= t('projects.reports.index.docx') %></th>
<th id="report-created-by"><%= t('projects.reports.index.thead_created_by') %></th>
<th id="report-last-modified-by"><%= t('projects.reports.index.thead_last_modified_by') %></th>
<th id="report-created-at"><%= t('projects.reports.index.thead_created_at') %></th>
<th id="report-updated-at"><%= t('projects.reports.index.thead_updated_at') %></th>
</tr>
</thead>
<tbody></tbody>
</table>
</div>
</div>
2016-02-12 23:52:43 +08:00
</div>
<!-- Save report modal -->
<div class="modal" id="delete-reports-modal" tabindex="-1" role="dialog" aria-labelledby="delete-reports-modal-label">
2023-07-03 17:11:51 +08:00
<%= form_with url: reports_destroy_path, method: :post, id: "delete-reports-form" do |f| %>
2016-02-12 23:52:43 +08:00
<input type="hidden" name="report_ids" id="report-ids">
<div class="modal-dialog" role="document">
<div class="modal-content">
<div class="modal-header">
2023-08-17 19:55:17 +08:00
<button type="button" class="close" data-dismiss="modal" aria-label="Close"><i class="sn-icon sn-icon-close"></i></button>
2016-02-12 23:52:43 +08:00
<h4 class="modal-title" id="delete-reports-modal-label"><%=t "projects.reports.index.modal_delete.head_title" %></h4>
</div>
<div class="modal-body">
<%=t "projects.reports.index.modal_delete.message" %>
</div>
<div class="modal-footer">
2023-06-19 21:45:22 +08:00
<button type="button" class="btn btn-secondary" data-dismiss="modal"><%=t "general.cancel" %></button>
<%= f.button t("projects.reports.index.modal_delete.delete"), class: "btn btn-danger", id: "confirm-delete-reports-btn", name: nil %>
2016-02-12 23:52:43 +08:00
</div>
</div>
</div>
<% end %>
</div>
<div id="actionToolbar" data-behaviour="vue">
<action-toolbar actions-url="<%= actions_toolbar_reports_url %>" />
</div>
<%= render partial: 'reports/modals/regenerate' %>
<%= javascript_include_tag 'reports/save_pdf_to_inventory' %>
<%= javascript_include_tag 'reports/reports_datatable' %>
<%= javascript_include_tag 'pdf_js' %>
<%= stylesheet_link_tag 'pdf_js_styles' %>
<%= javascript_include_tag "vue_components_action_toolbar" %>