2022-09-05 17:29:19 +08:00
|
|
|
<%= render 'shared/tiny_mce_packs' %>
|
|
|
|
|
2022-04-04 17:04:03 +08:00
|
|
|
<% if flash["repository_snapshot_error"] %>
|
|
|
|
<%= render 'shared/dialog',
|
|
|
|
id: "snapshot-error",
|
|
|
|
type: "error",
|
|
|
|
shown: true,
|
2022-04-12 19:29:11 +08:00
|
|
|
title: t("my_modules.modals.transition_snapshot_error.title"),
|
|
|
|
body:
|
2022-04-04 17:04:03 +08:00
|
|
|
t(
|
2022-04-12 19:29:11 +08:00
|
|
|
"my_modules.modals.transition_snapshot_error.body_html",
|
2022-04-04 17:04:03 +08:00
|
|
|
repository: Repository.find(flash["repository_snapshot_error"]["repository_id"]).name
|
|
|
|
)
|
|
|
|
%>
|
|
|
|
<% end %>
|
|
|
|
|
2017-01-12 23:54:15 +08:00
|
|
|
<% provide(:head_title, t("my_modules.protocols.head_title", project: h(@project.name), module: h(@my_module.name)).html_safe) %>
|
2020-10-26 16:28:44 +08:00
|
|
|
<% content_for :open_mobile_app_button do %>
|
|
|
|
<span class="open-mobile-app-container">
|
|
|
|
<%= link_to(pwa_mobile_app_url(@current_team.id, @project.id, @experiment.id, @my_module.id, @protocol.id, @protocol.first_step_id, request.host),
|
|
|
|
class: 'btn btn-light-link open-mobile-app-button') do %>
|
|
|
|
<%= t('my_modules.open_mobile_app') %>
|
|
|
|
<% end %>
|
|
|
|
</span>
|
|
|
|
<% end %>
|
2017-06-02 22:34:09 +08:00
|
|
|
|
2023-05-15 20:17:41 +08:00
|
|
|
<% provide(:container_class, 'no-second-nav-container') %>
|
2017-06-02 22:34:09 +08:00
|
|
|
|
2021-09-10 18:05:40 +08:00
|
|
|
|
2020-12-10 22:15:36 +08:00
|
|
|
<%= content_for :sidebar do %>
|
2022-01-03 17:48:17 +08:00
|
|
|
<%= render partial: "shared/sidebar/#{@my_module.archived_branch? ? 'archived_my_module' : 'my_module'}.html.erb",
|
2021-09-23 18:31:40 +08:00
|
|
|
locals: {
|
|
|
|
my_modules: @experiment_my_modules,
|
|
|
|
experiment: @my_module.experiment,
|
|
|
|
current_my_module: @my_module
|
|
|
|
}
|
|
|
|
%>
|
2020-12-10 22:15:36 +08:00
|
|
|
<% end %>
|
2017-06-05 17:31:05 +08:00
|
|
|
<%= render partial: 'shared/drag_n_drop_overlay' %>
|
2023-05-15 20:17:41 +08:00
|
|
|
<div class="content-pane flexible my-modules-protocols-index" data-task-id="<%= @my_module.id %>">
|
|
|
|
<%= render partial: 'my_modules/header' %>
|
2022-04-21 18:55:39 +08:00
|
|
|
<div class="my-module-position-container">
|
|
|
|
<!-- Details -->
|
2022-04-28 20:12:08 +08:00
|
|
|
<div class="task-section task-information hidden">
|
|
|
|
<div id="task-details" class="task-section-header">
|
|
|
|
<div class="task-flows">
|
|
|
|
<%= render partial: 'my_modules/status_flow/task_flow_button', locals: { my_module: @my_module } if @my_module.my_module_status_flow %>
|
|
|
|
</div>
|
2023-06-15 21:12:51 +08:00
|
|
|
<div class="task-details-container flex items-center gap-2">
|
2022-04-28 20:12:08 +08:00
|
|
|
<a class="task-section-caret collapsed" role="button" data-toggle="collapse" href="#details-container" aria-expanded="false" aria-controls="details-container">
|
2023-06-15 21:12:51 +08:00
|
|
|
<i class="sn-icon sn-icon-right"></i>
|
2022-04-28 20:12:08 +08:00
|
|
|
<span id="taskDetailsLabel" class="task-section-title">
|
|
|
|
<h2>
|
|
|
|
<%= t('my_modules.details.title') %>
|
|
|
|
</h2>
|
|
|
|
</span>
|
2022-04-21 18:55:39 +08:00
|
|
|
</a>
|
2022-04-28 20:12:08 +08:00
|
|
|
<span class="dropdown task-details-dropdown-container">
|
|
|
|
<a href="#"
|
|
|
|
id="taskDetailsButton"
|
|
|
|
class="block-icon task-details-button dropdown-toggle"
|
|
|
|
data-toggle="dropdown"
|
|
|
|
aria-haspopup="true"
|
|
|
|
aria-expanded="true">
|
2023-06-15 21:12:51 +08:00
|
|
|
<i class="sn-icon sn-icon-info"></i>
|
2022-04-28 20:12:08 +08:00
|
|
|
</a>
|
|
|
|
<div class="dropdown-menu" aria-labelledby="taskDetailsButton">
|
|
|
|
<%= render partial: "module_header_details_popover.html.erb" %>
|
|
|
|
</div>
|
|
|
|
</span>
|
2022-12-06 19:43:30 +08:00
|
|
|
<span class="task-details-code">
|
|
|
|
<%= @my_module.code %>
|
|
|
|
</span>
|
2022-04-28 20:12:08 +08:00
|
|
|
</div>
|
2022-04-21 18:55:39 +08:00
|
|
|
</div>
|
2022-04-28 20:12:08 +08:00
|
|
|
<div id="details-container" class="task-details collapse">
|
2022-04-21 18:55:39 +08:00
|
|
|
<%= render partial: 'my_module_details' %>
|
|
|
|
</div>
|
2020-03-30 18:51:35 +08:00
|
|
|
</div>
|
2022-04-21 18:55:39 +08:00
|
|
|
<!-- Notes -->
|
|
|
|
<div class="task-section hidden">
|
|
|
|
<div class="task-section-header">
|
|
|
|
<a class="task-section-caret" role="button" data-toggle="collapse" href="#notes-container" aria-expanded="true" aria-controls="notes-container">
|
2023-06-15 21:12:51 +08:00
|
|
|
<i class="sn-icon sn-icon-right"></i>
|
2022-04-21 18:55:39 +08:00
|
|
|
<span class="task-section-title">
|
|
|
|
<h2><%= t('my_modules.notes.title') %></h2>
|
|
|
|
</span>
|
|
|
|
</a>
|
|
|
|
</div>
|
|
|
|
<div class="collapse in" id="notes-container" aria-expanded="true">
|
|
|
|
<%= render partial: "my_module_notes" %>
|
|
|
|
</div>
|
2019-03-14 23:08:52 +08:00
|
|
|
</div>
|
2022-04-21 18:55:39 +08:00
|
|
|
<!-- Assigned items -->
|
|
|
|
<div class="task-section hidden">
|
|
|
|
<div class="task-section-header">
|
|
|
|
<a class="task-section-caret" role="button" data-toggle="collapse" href="#assigned-items-container" aria-expanded="true" aria-controls="assigned-items-container">
|
2023-06-15 21:12:51 +08:00
|
|
|
<i class="sn-icon sn-icon-right"></i>
|
2022-04-21 18:55:39 +08:00
|
|
|
<span class="task-section-title ">
|
|
|
|
<h2 class="assigned-items-title" data-assigned-items-count="<%= @assigned_repositories.map(&:assigned_rows_count).sum %>">
|
|
|
|
<%= t('my_modules.assigned_items.title') %>
|
|
|
|
</h2>
|
|
|
|
</span>
|
|
|
|
</a>
|
|
|
|
<div class="actions-block">
|
|
|
|
<% if can_assign_my_module_repository_rows?(@my_module) %>
|
|
|
|
<div class="dropdown repositories-assign-container sci-dropdown" data-repositories-url="<%= my_module_repositories_dropdown_list_path(@my_module) %>">
|
|
|
|
<a href="#" id="repositories-assign-button" class="btn btn-secondary btn-block" data-toggle="dropdown" aria-haspopup="true" aria-expanded="true">
|
|
|
|
<span><%= t('my_modules.assigned_items.assign_from') %></span>
|
2023-06-15 21:12:51 +08:00
|
|
|
<span class="sn-icon sn-icon-down"></span>
|
2022-04-21 18:55:39 +08:00
|
|
|
</a>
|
2022-09-15 20:44:40 +08:00
|
|
|
<ul class="dropdown-menu repositories-dropdown-menu perfect-scrollbar" aria-labelledby="repositories-assign-button">
|
2022-04-21 18:55:39 +08:00
|
|
|
</ul>
|
|
|
|
</div>
|
|
|
|
<% end %>
|
2020-03-30 18:51:35 +08:00
|
|
|
</div>
|
2020-04-21 16:03:53 +08:00
|
|
|
</div>
|
2022-04-21 18:55:39 +08:00
|
|
|
<div class="collapse in panel-group" id="assigned-items-container" aria-expanded="true"
|
|
|
|
data-repositories-list-url="<%= my_module_repositories_list_html_path(@my_module) %>">
|
|
|
|
<%= render partial: "my_modules/repositories/repositories_list" %>
|
|
|
|
</div>
|
2020-03-30 18:51:35 +08:00
|
|
|
</div>
|
2022-04-21 18:55:39 +08:00
|
|
|
<!-- Protocol -->
|
2022-04-21 21:12:34 +08:00
|
|
|
<div class="task-section">
|
|
|
|
<div
|
|
|
|
id="protocolContainer"
|
2022-04-26 20:13:17 +08:00
|
|
|
data-protocol-url="<%= protocol_my_module_path(@my_module) %>"
|
2022-04-21 21:12:34 +08:00
|
|
|
data-date-format="<%= datetime_picker_format_date_only %>"
|
|
|
|
data-user-utc-offset="<%= ActiveSupport::TimeZone.find_tzinfo(current_user.time_zone).utc_offset %>"
|
|
|
|
>
|
2023-05-15 21:38:44 +08:00
|
|
|
<protocol-container
|
|
|
|
:protocol-url="protocolUrl"
|
|
|
|
/>
|
|
|
|
</div>
|
2020-03-30 18:51:35 +08:00
|
|
|
</div>
|
2018-05-08 22:33:42 +08:00
|
|
|
</div>
|
2016-07-21 19:11:15 +08:00
|
|
|
</div>
|
|
|
|
|
2023-05-15 20:17:41 +08:00
|
|
|
<%= render partial: "my_modules/repositories/full_view_modal" %>
|
|
|
|
<%= render partial: "my_modules/modals/update_repository_records_modal" %>
|
|
|
|
<%= render partial: 'label_printers/label_printer_modal' %>
|
|
|
|
|
2022-08-10 21:39:45 +08:00
|
|
|
<%= render partial: "my_modules/protocols/print_protocol_modal", locals: { protocol: @protocol, comments_enabled: true} %>
|
2022-04-26 20:13:17 +08:00
|
|
|
|
2016-07-21 19:11:15 +08:00
|
|
|
<!-- URL for status bar refreshing -->
|
|
|
|
<div class="hidden" data-role="protocol-status-bar-url" data-url="<%= protocol_status_bar_protocol_path(@protocol) %>"></div>
|
|
|
|
|
|
|
|
<!-- Confirm link update modal -->
|
|
|
|
<%= render partial: "my_modules/protocols/confirm_link_update_modal.html.erb" %>
|
|
|
|
|
|
|
|
<!-- Load from repository modal -->
|
|
|
|
<%= render partial: "my_modules/protocols/load_from_repository_modal.html.erb" %>
|
|
|
|
|
|
|
|
<!-- Copy to repository protocol modal -->
|
2023-02-17 21:27:20 +08:00
|
|
|
<%= render partial: "protocols/index/new_protocol_modal.html.erb", locals: {type: 'copy'} %>
|
2016-07-21 19:11:15 +08:00
|
|
|
|
|
|
|
<!-- Import protocol elements -->
|
|
|
|
<%= render partial: "protocols/import_export/import_elements.html.erb" %>
|
|
|
|
|
2020-07-22 15:45:56 +08:00
|
|
|
<!-- Status flow modal -->
|
2020-07-23 21:02:43 +08:00
|
|
|
<% if @my_module.my_module_status_flow %>
|
|
|
|
<%= render partial: 'my_modules/modals/status_flow_modal.html.erb' %>
|
|
|
|
<% end %>
|
2020-07-22 15:45:56 +08:00
|
|
|
|
2019-03-16 03:59:15 +08:00
|
|
|
<!-- Create new office file modal -->
|
|
|
|
<%= render partial: 'assets/wopi/create_wopi_file_modal.html.erb' %>
|
|
|
|
|
2020-11-25 19:50:34 +08:00
|
|
|
<!-- Delete file modal -->
|
|
|
|
<%= render partial: 'assets/asset_delete_modal.html.erb' %>
|
|
|
|
|
2022-01-28 18:10:56 +08:00
|
|
|
<%= render partial: 'my_modules/repositories/consume_stock_modal.html.erb'%>
|
|
|
|
|
2016-07-21 19:11:15 +08:00
|
|
|
<%= stylesheet_link_tag 'datatables' %>
|
2022-05-06 17:59:22 +08:00
|
|
|
<%= javascript_include_tag "handsontable.full" %>
|
|
|
|
<%= render partial: "shared/formulas_libraries.html.erb" %>
|
2016-07-21 19:11:15 +08:00
|
|
|
<%= javascript_include_tag("my_modules/protocols") %>
|
2020-07-22 15:45:56 +08:00
|
|
|
<%= javascript_include_tag("my_modules/status_flow") %>
|
2022-11-02 22:17:10 +08:00
|
|
|
<%= javascript_include_tag("my_modules/tags") %>
|
2023-03-30 19:27:10 +08:00
|
|
|
<%= javascript_include_tag 'emoji_button' %>
|
2020-04-22 23:55:22 +08:00
|
|
|
<%= javascript_include_tag("my_modules/repositories") %>
|
2020-10-19 18:17:03 +08:00
|
|
|
<%= javascript_include_tag("my_modules/pwa_mobile_app") %>
|
2023-03-30 19:27:10 +08:00
|
|
|
<%= javascript_include_tag 'pdf_js' %>
|
|
|
|
<%= stylesheet_link_tag 'pdf_js_styles' %>
|
2023-02-17 21:27:20 +08:00
|
|
|
<%= javascript_include_tag "protocols/new_protocol" %>
|
2022-04-21 21:12:34 +08:00
|
|
|
|
2023-03-30 19:27:10 +08:00
|
|
|
<%= javascript_include_tag 'vue_protocol' %>
|
2022-05-06 17:59:22 +08:00
|
|
|
|