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
|
|
|
|
2020-12-10 22:15:36 +08:00
|
|
|
<% provide(:sidebar_title, t("sidebar.my_module.sidebar_title")) %>
|
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' %>
|
2021-03-04 16:00:58 +08:00
|
|
|
<%= render partial: 'shared/secondary_navigation', locals: { render_breadcrumbs: true, project: @experiment.project, experiment: @experiment } %>
|
2016-07-21 19:11:15 +08:00
|
|
|
|
2020-05-15 06:49:23 +08:00
|
|
|
<div class="content-pane my-modules-protocols-index" data-task-id="<%= @my_module.id %>">
|
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>
|
|
|
|
<div class="task-details-container">
|
|
|
|
<a class="task-section-caret collapsed" role="button" data-toggle="collapse" href="#details-container" aria-expanded="false" aria-controls="details-container">
|
|
|
|
<i class="fas fa-caret-right"></i>
|
|
|
|
<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">
|
|
|
|
<i class="fas fa-info-circle"></i>
|
|
|
|
</a>
|
|
|
|
<div class="dropdown-menu" aria-labelledby="taskDetailsButton">
|
|
|
|
<%= render partial: "module_header_details_popover.html.erb" %>
|
|
|
|
</div>
|
|
|
|
</span>
|
|
|
|
</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">
|
|
|
|
<i class="fas fa-caret-right"></i>
|
|
|
|
<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">
|
|
|
|
<i class="fas fa-caret-right"></i>
|
|
|
|
<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 class="fas fa-file-signature"></span>
|
|
|
|
<span><%= t('my_modules.assigned_items.assign_from') %></span>
|
|
|
|
<span class="caret pull-right"></span>
|
|
|
|
</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>
|
|
|
|
<%= render partial: "my_modules/repositories/full_view_modal" %>
|
|
|
|
<%= render partial: "my_modules/modals/update_repository_records_modal" %>
|
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 %>"
|
|
|
|
>
|
|
|
|
<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>
|
|
|
|
|
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 -->
|
|
|
|
<%= render partial: "my_modules/protocols/copy_to_repository_modal.html.erb" %>
|
|
|
|
|
|
|
|
<!-- 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") %>
|
2020-04-08 21:13:21 +08:00
|
|
|
<%= javascript_pack_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") %>
|
2020-12-22 22:25:30 +08:00
|
|
|
<%= javascript_pack_tag 'pdfjs/pdf_js' %>
|
|
|
|
<%= stylesheet_pack_tag 'pdfjs/pdf_js_styles' %>
|
2022-04-21 21:12:34 +08:00
|
|
|
|
|
|
|
<%= javascript_pack_tag 'vue/protocol' %>
|
2022-05-06 17:59:22 +08:00
|
|
|
|