2018-07-19 23:56:42 +08:00
|
|
|
<% content_for :head do %>
|
|
|
|
<meta name="turbolinks-cache-control" content="no-cache">
|
|
|
|
<% end %>
|
|
|
|
|
2018-04-18 22:47:52 +08:00
|
|
|
<%= stylesheet_link_tag 'datatables' %>
|
2016-02-12 23:52:43 +08:00
|
|
|
|
2021-05-06 20:00:33 +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 %>
|
|
|
|
|
2021-03-17 19:54:25 +08:00
|
|
|
<div class="content-pane flexible reports-index">
|
2021-03-16 20:11:15 +08:00
|
|
|
<%= render partial: 'reports/index_header' %>
|
2020-03-20 02:43:20 +08:00
|
|
|
<div id="content-reports-index">
|
2018-05-08 22:33:42 +08:00
|
|
|
<div class="row">
|
|
|
|
<div class="col-md-12">
|
|
|
|
<div class="reports-datatable">
|
|
|
|
<table id="reports-table"
|
|
|
|
class="table"
|
|
|
|
data-source="<%= reports_datatable_path(format: :json) %>">
|
|
|
|
<thead>
|
|
|
|
<tr>
|
2020-10-22 22:37:59 +08:00
|
|
|
<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>
|
2021-03-17 19:54:25 +08:00
|
|
|
<th id="project-name"><%= t('projects.reports.index.thead_project_name') %></th>
|
|
|
|
<th id="report-name"><%= t('projects.reports.index.thead_name') %></th>
|
2022-12-02 18:41:32 +08:00
|
|
|
<th id="report-id"><%= t('projects.reports.index.thead_id') %></th>
|
2021-03-17 19:54:25 +08:00
|
|
|
<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>
|
2018-05-08 22:33:42 +08:00
|
|
|
</tr>
|
|
|
|
</thead>
|
|
|
|
<tbody></tbody>
|
|
|
|
</table>
|
|
|
|
</div>
|
2018-04-18 22:47:52 +08:00
|
|
|
</div>
|
|
|
|
</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">
|
2018-04-18 22:47:52 +08:00
|
|
|
<%= bootstrap_form_tag 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">
|
|
|
|
<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span></button>
|
|
|
|
<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">
|
|
|
|
<button type="button" class="btn btn-default" data-dismiss="modal"><%=t "general.cancel" %></button>
|
2018-04-25 19:57:12 +08:00
|
|
|
<%= 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>
|
|
|
|
|
2021-04-15 19:12:01 +08:00
|
|
|
<%= render partial: 'reports/modals/regenerate' %>
|
|
|
|
|
2021-04-13 22:36:52 +08:00
|
|
|
<%= javascript_include_tag 'reports/save_pdf_to_inventory' %>
|
|
|
|
<%= javascript_include_tag 'reports/reports_datatable' %>
|
2023-03-30 19:27:10 +08:00
|
|
|
<%= javascript_include_tag 'pdf_js' %>
|
|
|
|
<%= stylesheet_link_tag 'pdf_js_styles' %>
|