scinote-web/app/views/my_modules/protocols.html.erb

129 lines
5.7 KiB
Text
Raw Normal View History

<% provide(:head_title, t("my_modules.protocols.head_title", project: h(@project.name), module: h(@my_module.name)).html_safe) %>
2017-06-05 17:31:05 +08:00
<%= render partial: 'shared/drag_n_drop_overlay' %>
<%= render partial: "shared/sidebar", locals: { current_task: @my_module, page: 'task' } %>
<%= render partial: "shared/secondary_navigation" %>
2016-07-21 19:11:15 +08:00
<div class="content-pane my-modules-protocols-index" data-task-id="<%= @my_module.id %>">
<!-- Details -->
<div class="task-section">
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>
<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-04-14 19:08:07 +08:00
<div class="actions-block">
2020-04-01 19:05:35 +08:00
<%= render partial: "my_modules/state_buttons.html.erb" %>
</div>
</div>
<div class="task-details">
2020-03-31 17:22:53 +08:00
<%= 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="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" %>
</div>
2016-07-21 19:11:15 +08:00
</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="fas fa-caret-right"></i>
2020-05-08 23:01:55 +08:00
<span class="task-section-title ">
<h2 class="assigned-items-title" data-assigned-items-count="<%= @assigned_repositories.map{|i| i.assigned_rows_count}.sum %>"><%= t('my_modules.assigned_items.title') %></h2>
</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>
</div>
<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" %>
</div>
<%= render partial: "my_modules/repositories/full_view_modal" %>
<%= render partial: "my_modules/modals/update_repository_records_modal" %>
</div>
<!-- Protocol -->
<div class="task-section hidden">
<div class="task-section-header">
<a class="task-section-caret" role="button" data-toggle="collapse" href="#protocol-container" aria-expanded="true" aria-controls="protocol-container">
<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>
</div>
<div class="collapse in" id="protocol-container" aria-expanded="true">
2020-03-31 17:22:53 +08:00
<%= render partial: "my_module_protocol" %>
</div>
</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" %>
<!-- Complete task modal -->
<%= render partial: 'my_modules/complete_task_modal.html.erb' %>
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-04-08 21:13:21 +08:00
<%= javascript_pack_tag 'emoji_button' %>
<%= javascript_include_tag("my_modules/repositories") %>