mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2024-11-18 23:21:30 +08:00
200 lines
8.3 KiB
Text
200 lines
8.3 KiB
Text
<%= render 'shared/tiny_mce_packs' %>
|
|
|
|
<% if flash["repository_snapshot_error"] %>
|
|
<%= render 'shared/dialog',
|
|
id: "snapshot-error",
|
|
type: "error",
|
|
shown: true,
|
|
title: t("my_modules.modals.transition_snapshot_error.title"),
|
|
body:
|
|
t(
|
|
"my_modules.modals.transition_snapshot_error.body_html",
|
|
repository: Repository.find(flash["repository_snapshot_error"]["repository_id"]).name
|
|
)
|
|
%>
|
|
<% end %>
|
|
|
|
<% provide(:head_title, t("my_modules.protocols.head_title", project: h(@project.name), module: h(@my_module.name)).html_safe) %>
|
|
<% 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 %>
|
|
|
|
<% provide(:container_class, 'no-second-nav-container') %>
|
|
|
|
|
|
<%= content_for :sidebar do %>
|
|
<%= render partial: "shared/sidebar/#{@my_module.archived_branch? ? 'archived_my_module' : 'my_module'}",
|
|
locals: {
|
|
my_modules: @experiment_my_modules,
|
|
experiment: @my_module.experiment,
|
|
current_my_module: @my_module
|
|
}
|
|
%>
|
|
<% end %>
|
|
<%= render partial: 'shared/drag_n_drop_overlay' %>
|
|
<div class="content-pane flexible my-modules-protocols-index" data-task-id="<%= @my_module.id %>">
|
|
<%= render partial: 'my_modules/header' %>
|
|
<div class="my-module-position-container">
|
|
<!-- Header Actions -->
|
|
<%= render partial: 'my_modules/header_actions' %>
|
|
<!-- Details -->
|
|
<div class="task-section task-information hidden">
|
|
<div id="task-details" class="task-section-header">
|
|
<div class="task-sharing-and-flows">
|
|
<%= render partial: 'my_modules/status_flow/task_flow_button', locals: { my_module: @my_module } if @my_module.my_module_status_flow %>
|
|
<% if current_team.shareable_links_enabled? %>
|
|
<div class="share-task-container" data-behaviour="vue">
|
|
<share-task-container
|
|
shareable-link-url="<%= my_module_shareable_link_path(@my_module) %>"
|
|
:shared="<%= @my_module.shared? %>"
|
|
:disabled="<%= !can_share_my_module?(@my_module) %>" />
|
|
</div>
|
|
|
|
<%= javascript_include_tag 'vue_share_task_container' %>
|
|
<% end %>
|
|
</div>
|
|
<div class="task-details-container flex items-center mr-auto gap-2">
|
|
<a class="task-section-caret collapsed" role="button" data-toggle="collapse" href="#details-container" aria-expanded="false" aria-controls="details-container">
|
|
<i class="sn-icon sn-icon-right"></i>
|
|
<span id="taskDetailsLabel" class="task-section-title">
|
|
<h2>
|
|
<%= t('my_modules.details.title') %>
|
|
</h2>
|
|
</span>
|
|
</a>
|
|
<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="sn-icon sn-icon-info"></i>
|
|
</a>
|
|
<div class="dropdown-menu" aria-labelledby="taskDetailsButton">
|
|
<%= render partial: "module_header_details_popover" %>
|
|
</div>
|
|
</span>
|
|
<span class="task-details-code">
|
|
<%= @my_module.code %>
|
|
</span>
|
|
</div>
|
|
</div>
|
|
<div id="details-container" class="task-details collapse">
|
|
<%= render partial: 'my_module_details' %>
|
|
</div>
|
|
</div>
|
|
<!-- 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="sn-icon sn-icon-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>
|
|
</div>
|
|
<!-- 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="sn-icon sn-icon-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><%= t('my_modules.assigned_items.assign_from') %></span>
|
|
<span class="sn-icon sn-icon-down"></span>
|
|
</a>
|
|
<ul class="dropdown-menu repositories-dropdown-menu perfect-scrollbar" aria-labelledby="repositories-assign-button">
|
|
</ul>
|
|
</div>
|
|
<% end %>
|
|
</div>
|
|
</div>
|
|
<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" %>
|
|
</div>
|
|
<!-- Protocol -->
|
|
<div class="task-section">
|
|
<div
|
|
id="protocolContainer"
|
|
data-protocol-url="<%= protocol_my_module_path(@my_module) %>"
|
|
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>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<%= render partial: "my_modules/modals/update_repository_records_modal" %>
|
|
|
|
|
|
<%= render partial: "my_modules/protocols/print_protocol_modal", locals: { protocol: @protocol, comments_enabled: true} %>
|
|
|
|
<!-- 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" %>
|
|
|
|
<!-- Load from repository modal -->
|
|
<%= render partial: "my_modules/protocols/load_from_repository_modal" %>
|
|
|
|
<!-- Copy to repository protocol modal -->
|
|
<%= render partial: "protocols/index/new_protocol_modal", locals: {type: 'copy'} %>
|
|
|
|
<!-- Import protocol elements -->
|
|
<%= render partial: "protocols/import_export/import_elements" %>
|
|
|
|
<!-- Status flow modal -->
|
|
<% if @my_module.my_module_status_flow %>
|
|
<%= render partial: 'my_modules/modals/status_flow_modal' %>
|
|
<% end %>
|
|
|
|
<!-- Create new office file modal -->
|
|
<%= render partial: 'assets/wopi/create_wopi_file_modal' %>
|
|
|
|
<!-- Delete file modal -->
|
|
<%= render partial: 'assets/asset_delete_modal' %>
|
|
|
|
<%= render partial: 'my_modules/repositories/consume_stock_modal'%>
|
|
|
|
<%= stylesheet_link_tag 'datatables' %>
|
|
<%= javascript_include_tag "handsontable.full" %>
|
|
<%= render partial: "shared/formulas_libraries" %>
|
|
<%= javascript_include_tag("my_modules/protocols") %>
|
|
<%= javascript_include_tag("my_modules/status_flow") %>
|
|
<%= javascript_include_tag("my_modules/tags") %>
|
|
<%= javascript_include_tag 'emoji_button' %>
|
|
<%= javascript_include_tag("my_modules/repositories") %>
|
|
<%= javascript_include_tag("my_modules/pwa_mobile_app") %>
|
|
<%= javascript_include_tag 'pdf_js' %>
|
|
<%= stylesheet_link_tag 'pdf_js_styles' %>
|
|
<%= javascript_include_tag "protocols/new_protocol" %>
|
|
|
|
<%= javascript_include_tag 'vue_protocol' %>
|
|
|