2016-07-21 19:11:15 +08:00
|
|
|
<% provide(:head_title, t("protocols.index.head_title")) %>
|
|
|
|
|
2018-05-25 23:14:22 +08:00
|
|
|
<% if current_team %>
|
2022-07-26 19:52:40 +08:00
|
|
|
<% provide(:sidebar_title, t('sidebar.templates.sidebar_title')) %>
|
|
|
|
<%= content_for :sidebar do %>
|
|
|
|
<%= render partial: "/shared/sidebar/templates_sidebar", locals: {active: :protocol} %>
|
|
|
|
<% end %>
|
2022-12-05 20:32:05 +08:00
|
|
|
<% provide(:container_class, 'no-second-nav-container') %>
|
2023-11-20 18:38:41 +08:00
|
|
|
|
|
|
|
<% content_for :head do %>
|
|
|
|
<meta id="cache-directive" name="turbolinks-cache-control" content="no-cache">
|
|
|
|
<% end %>
|
2016-07-21 19:11:15 +08:00
|
|
|
|
2023-01-25 04:17:50 +08:00
|
|
|
<div class="content-pane flexible protocols-index <%= @type %>">
|
2022-12-05 20:32:05 +08:00
|
|
|
<div class="content-header sticky-header">
|
|
|
|
<div class="title-row">
|
2023-03-07 21:55:11 +08:00
|
|
|
<% if templates_view_mode_archived?(type: @type) %>
|
2023-01-25 04:17:50 +08:00
|
|
|
<h1>
|
2023-06-02 08:03:41 +08:00
|
|
|
<span><%= t('labels.archived')%></span>
|
2023-01-25 04:17:50 +08:00
|
|
|
<%= t('protocols.index.head_title_archived') %>
|
|
|
|
</h1>
|
2019-06-12 13:19:14 +08:00
|
|
|
<% else %>
|
2023-01-25 04:17:50 +08:00
|
|
|
<h1><%= t('protocols.index.head_title') %></h1>
|
2019-06-12 13:19:14 +08:00
|
|
|
<% end %>
|
2016-07-21 19:11:15 +08:00
|
|
|
</div>
|
|
|
|
</div>
|
2022-12-05 20:32:05 +08:00
|
|
|
<div class="protocols-container">
|
2023-12-28 03:09:36 +08:00
|
|
|
<div id="ProtocolsTable" class="fixed-content-body">
|
|
|
|
<protocols-table
|
|
|
|
ref="table"
|
|
|
|
:actions-url="'<%= actions_toolbar_protocols_url %>'"
|
|
|
|
:data-source="'<%= protocols_path(format: :json) %>'"
|
|
|
|
:active-page-url="'<%= protocols_path %>'"
|
|
|
|
:archived-page-url="'<%= protocols_path(view_mode: :archived) %>'"
|
|
|
|
current-view-mode="<%= params[:view_mode] || :active %>"
|
|
|
|
:docx-parser-enabled="<%= Protocol.docx_parser_enabled? %>"
|
2024-03-14 20:17:07 +08:00
|
|
|
user-roles-url="<%= user_roles_protocols_path %>"
|
2023-12-28 03:09:36 +08:00
|
|
|
:create-url="'<%= protocols_path if can_create_protocols_in_repository?(current_team) %>'"
|
2024-02-28 22:18:08 +08:00
|
|
|
users-filter-url="<%= users_filter_projects_path %>"
|
2023-12-28 03:09:36 +08:00
|
|
|
/>
|
2023-05-17 20:12:40 +08:00
|
|
|
</div>
|
2016-07-21 19:11:15 +08:00
|
|
|
</div>
|
2018-05-25 23:14:22 +08:00
|
|
|
</div>
|
|
|
|
<% end %>
|
2018-05-08 22:33:42 +08:00
|
|
|
|
2023-12-28 03:09:36 +08:00
|
|
|
<%= javascript_include_tag 'vue_protocols_list' %>
|
|
|
|
|
|
|
|
<!-- Legacy code -->
|
|
|
|
<a class="btn-open-file tw-hidden" data-action='import' >
|
|
|
|
<input type="file" ref="importFileBtn" value="" id="importFileInput" accept=".eln" data-role="import-file-input"
|
|
|
|
data-team-id="<%= current_team.id %>" data-import-url="<%= import_protocols_path %>">
|
|
|
|
</a>
|
|
|
|
<a class="btn-open-file tw-hidden" data-action='import' >
|
|
|
|
<input type="file" value="" id="importDocx" accept=".docx" data-role="import-file-input"
|
|
|
|
data-team-id="<%= @current_team.id %>" data-import-url="<%= import_protocols_path %>">
|
|
|
|
</a>
|
|
|
|
<%= link_to t("protocols.index.import_protocols_io"), '',
|
|
|
|
id: "importProtocolsIo",
|
|
|
|
class: 'tw-hidden',
|
|
|
|
data: { target: '#protocolsioModal', toggle: 'modal' } %>
|
|
|
|
|
2024-02-28 23:08:46 +08:00
|
|
|
<%= render partial: "protocols/index/protocol_preview_modal" %>
|
2023-12-28 03:09:36 +08:00
|
|
|
<%= render partial: "protocols/index/protocolsio_modal" %>
|
|
|
|
<div id="protocolsio-preview-modal-target"></div>
|
|
|
|
<%= javascript_include_tag "protocols/index" %>
|
|
|
|
<%= javascript_include_tag "handsontable.full" %>
|
|
|
|
<%= render partial: "shared/formulas_libraries" %>
|
|
|
|
|
2023-07-11 15:27:15 +08:00
|
|
|
<div id="protocolFileImportModal">
|
2023-11-15 18:02:50 +08:00
|
|
|
<protocol-file-import-modal
|
2023-09-18 21:52:38 +08:00
|
|
|
import-url="<%= import_docx_protocols_path %>"
|
|
|
|
protocol-template-table-url="<%= protocols_path %>"
|
|
|
|
/>
|
2023-07-11 15:27:15 +08:00
|
|
|
</div>
|
2023-06-21 20:13:20 +08:00
|
|
|
|
|
|
|
<%= render partial: "protocols/import_export/import_elements" %>
|
2023-12-28 03:09:36 +08:00
|
|
|
<%= javascript_include_tag 'vue_protocol_file_import_modal' %>
|
2019-04-24 19:34:56 +08:00
|
|
|
<%= javascript_include_tag "assets/wopi/create_wopi_file" %>
|
2023-03-30 19:27:10 +08:00
|
|
|
<%= javascript_include_tag 'pdf_js' %>
|
|
|
|
<%= stylesheet_link_tag 'pdf_js_styles' %>
|