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) %>
|
2017-06-02 22:34:09 +08:00
|
|
|
|
2017-06-05 17:31:05 +08:00
|
|
|
<%= render partial: 'shared/drag_n_drop_overlay' %>
|
2018-11-29 18:28:36 +08:00
|
|
|
<%= render partial: "shared/sidebar", locals: { current_task: @my_module, page: 'task' } %>
|
2019-05-20 19:13:31 +08:00
|
|
|
<%= render partial: "shared/secondary_navigation" %>
|
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 %>">
|
2020-03-30 18:51:35 +08:00
|
|
|
<!-- Details -->
|
2020-07-14 17:24:33 +08:00
|
|
|
<div class="task-section task-information">
|
2020-04-01 19:05:35 +08:00
|
|
|
<div class="task-section-header">
|
2020-04-21 21:11:57 +08:00
|
|
|
<span id="taskDetailsLabel" class="task-section-title">
|
|
|
|
<h2>
|
|
|
|
<%= t('my_modules.details.title') %>
|
|
|
|
</h2>
|
2020-04-01 19:05:35 +08:00
|
|
|
</span>
|
2020-05-13 18:20:25 +08:00
|
|
|
<span class="dropdown task-details-dropdown-container">
|
|
|
|
<span id="taskDetailsButton" class="fas block-icon fa-info-circle task-details-button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="true"></span>
|
|
|
|
<div class="dropdown-menu" aria-labelledby="taskDetailsButton">
|
|
|
|
<%= render partial: "module_header_details_popover.html.erb" %>
|
|
|
|
</div>
|
|
|
|
</span>
|
|
|
|
|
2020-07-14 17:24:33 +08:00
|
|
|
|
2020-04-01 19:05:35 +08:00
|
|
|
</div>
|
2020-03-30 18:51:35 +08:00
|
|
|
<div class="task-details">
|
2020-07-15 00:48:18 +08:00
|
|
|
<%= render partial: 'my_module_details' %>
|
2020-03-30 18:51:35 +08:00
|
|
|
</div>
|
2020-07-14 17:24:33 +08:00
|
|
|
<div class="task-flows">
|
2020-09-14 21:56:24 +08:00
|
|
|
<%= render partial: 'my_modules/status_flow/task_flow_button', locals: { my_module: @my_module } if @my_module.my_module_status_flow %>
|
2020-07-14 17:24:33 +08:00
|
|
|
</div>
|
2019-05-11 22:04:28 +08:00
|
|
|
</div>
|
2020-03-30 18:51:35 +08:00
|
|
|
<!-- Notes -->
|
2020-05-18 22:01:26 +08:00
|
|
|
<div class="task-section hidden">
|
2020-03-30 18:51:35 +08:00
|
|
|
<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">
|
2020-03-31 17:22:53 +08:00
|
|
|
<%= render partial: "my_module_notes" %>
|
2018-05-08 22:33:42 +08:00
|
|
|
</div>
|
2016-07-21 19:11:15 +08:00
|
|
|
</div>
|
2020-03-30 18:51:35 +08:00
|
|
|
<!-- Assigned items -->
|
2020-05-18 22:01:26 +08:00
|
|
|
<div class="task-section hidden">
|
2020-03-30 18:51:35 +08:00
|
|
|
<div class="task-section-header">
|
2020-05-15 06:49:23 +08:00
|
|
|
<a class="task-section-caret" role="button" data-toggle="collapse" href="#assigned-items-container" aria-expanded="true" aria-controls="assigned-items-container">
|
2020-03-30 18:51:35 +08:00
|
|
|
<i class="fas fa-caret-right"></i>
|
2020-05-08 23:01:55 +08:00
|
|
|
<span class="task-section-title ">
|
2020-05-28 22:15:05 +08:00
|
|
|
<h2 class="assigned-items-title" data-assigned-items-count="<%= @assigned_repositories.map(&:assigned_rows_count).sum %>">
|
|
|
|
<%= t('my_modules.assigned_items.title') %>
|
|
|
|
</h2>
|
2020-03-30 18:51:35 +08:00
|
|
|
</span>
|
2020-04-09 21:14:55 +08:00
|
|
|
</a>
|
|
|
|
<div class="actions-block">
|
2020-05-18 21:54:32 +08:00
|
|
|
<% if can_assign_repository_rows_to_module?(@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>
|
|
|
|
<ul class="dropdown-menu repositories-dropdown-menu" aria-labelledby="repositories-assign-button">
|
|
|
|
</ul>
|
|
|
|
</div>
|
|
|
|
<% end %>
|
2020-04-09 21:14:55 +08:00
|
|
|
</div>
|
2020-03-30 18:51:35 +08:00
|
|
|
</div>
|
2020-05-15 06:49:23 +08:00
|
|
|
<div class="collapse in panel-group" id="assigned-items-container" aria-expanded="true"
|
2020-04-29 01:12:17 +08:00
|
|
|
data-repositories-list-url="<%= my_module_repositories_list_html_path(@my_module) %>">
|
2020-04-03 19:15:56 +08:00
|
|
|
<%= render partial: "my_modules/repositories/repositories_list" %>
|
2019-03-14 23:08:52 +08:00
|
|
|
</div>
|
2020-04-22 23:55:22 +08:00
|
|
|
<%= render partial: "my_modules/repositories/full_view_modal" %>
|
|
|
|
<%= render partial: "my_modules/modals/update_repository_records_modal" %>
|
2019-03-14 23:08:52 +08:00
|
|
|
</div>
|
2020-03-30 18:51:35 +08:00
|
|
|
<!-- Protocol -->
|
2020-05-18 22:01:26 +08:00
|
|
|
<div class="task-section hidden">
|
2020-03-30 18:51:35 +08:00
|
|
|
<div class="task-section-header">
|
2020-05-15 06:49:23 +08:00
|
|
|
<a class="task-section-caret" role="button" data-toggle="collapse" href="#protocol-container" aria-expanded="true" aria-controls="protocol-container">
|
2020-03-30 18:51:35 +08:00
|
|
|
<i class="fas fa-caret-right"></i>
|
|
|
|
<div class="task-section-title">
|
|
|
|
<h2><%= t('my_modules.protocol.title') %></h2>
|
|
|
|
</div>
|
|
|
|
</a>
|
2020-05-02 02:45:09 +08:00
|
|
|
<%= render partial: "my_modules/protocols/protocol_status_bar" %>
|
2020-04-21 16:03:53 +08:00
|
|
|
<div class="actions-block">
|
|
|
|
<%= render partial: "my_modules/protocols/protocol_options_dropdown" %>
|
2020-05-18 21:54:32 +08:00
|
|
|
<% if can_manage_protocol_in_module?(@protocol) %>
|
|
|
|
<a href="#"
|
|
|
|
class="btn btn-primary"
|
|
|
|
data-action="new-step"
|
|
|
|
data-href="<%= new_protocol_step_path(protocol_id: @protocol.id, format: :json) %>">
|
|
|
|
<span class="fas fa-plus" aria-hidden="true"></span>
|
|
|
|
<span><%=t "protocols.steps.new_step" %></span>
|
|
|
|
</a>
|
|
|
|
<% end %>
|
2020-04-21 16:03:53 +08:00
|
|
|
</div>
|
2020-03-30 18:51:35 +08:00
|
|
|
</div>
|
2020-05-15 06:49:23 +08:00
|
|
|
<div class="collapse in" id="protocol-container" aria-expanded="true">
|
2020-03-31 17:22:53 +08:00
|
|
|
<%= render partial: "my_module_protocol" %>
|
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>
|
|
|
|
|
|
|
|
<!-- 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' %>
|
|
|
|
|
2016-07-21 19:11:15 +08:00
|
|
|
<%= stylesheet_link_tag 'datatables' %>
|
|
|
|
<%= 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") %>
|