2017-02-10 21:27:20 +08:00
|
|
|
<div class="panel panel-default module-large
|
2019-02-07 21:23:37 +08:00
|
|
|
<%= get_task_alert_color(my_module) %>"
|
2016-02-12 23:52:43 +08:00
|
|
|
id="<%= my_module.id %>"
|
|
|
|
data-module-id="<%= my_module.id %>"
|
|
|
|
data-module-name="<%= my_module.name %>"
|
|
|
|
<% if my_module.my_module_group.present? %>
|
|
|
|
data-module-group="<%= my_module.my_module_group.id %>"
|
|
|
|
<% end %>
|
|
|
|
data-module-x="<%= my_module.x %>"
|
|
|
|
data-module-y="<%= my_module.y %>"
|
|
|
|
data-module-conns="<%= construct_module_connections(my_module) %>"
|
2023-03-21 18:29:23 +08:00
|
|
|
data-module-users-tab-url="<%= designated_users_my_module_user_my_modules_url(my_module_id: my_module.id, format: :json) %>"
|
2019-01-12 00:20:04 +08:00
|
|
|
data-module-tags-url="<%= my_module_tags_experiment_path(my_module.experiment, format: :json) %>">
|
2016-02-12 23:52:43 +08:00
|
|
|
|
2020-12-10 22:18:31 +08:00
|
|
|
<div data-view-mode="active">
|
2023-01-31 22:42:43 +08:00
|
|
|
<a class="edit-tags-link pull-right" data-remote="true" href="<%= my_module_tags_edit_url(my_module, format: :json) %>">
|
2023-06-21 20:13:20 +08:00
|
|
|
<%= render partial: "canvas/tags", locals: { my_module: my_module } %>
|
2023-01-31 22:42:43 +08:00
|
|
|
</a>
|
2020-12-10 22:18:31 +08:00
|
|
|
</div>
|
|
|
|
|
|
|
|
<div data-view-mode="archived">
|
2016-02-12 23:52:43 +08:00
|
|
|
<a class="edit-tags-link pull-right" data-remote="true" href="<%= my_module_tags_edit_url(my_module, format: :json) %>">
|
2023-06-21 20:13:20 +08:00
|
|
|
<%= render partial: "canvas/tags", locals: { my_module: my_module } %>
|
2016-02-12 23:52:43 +08:00
|
|
|
</a>
|
2020-12-10 22:18:31 +08:00
|
|
|
</div>
|
2016-02-12 23:52:43 +08:00
|
|
|
|
2023-06-28 21:57:15 +08:00
|
|
|
<div class="task-selector-container pull-left " data-view-mode="archived" data-task-id="<%= my_module.id %>">
|
|
|
|
<div class="sci-checkbox-container">
|
|
|
|
<input value="1" type="checkbox" class="sci-checkbox task-selector">
|
|
|
|
<span class="sci-checkbox-label"></span>
|
2020-12-11 18:52:24 +08:00
|
|
|
</div>
|
2023-06-28 21:57:15 +08:00
|
|
|
</div>
|
2020-12-11 18:52:24 +08:00
|
|
|
|
2016-02-12 23:52:43 +08:00
|
|
|
<div class="panel-heading">
|
|
|
|
<h3 class="panel-title">
|
2023-06-19 21:45:22 +08:00
|
|
|
<%= link_to my_module.name, protocols_my_module_path(my_module,
|
2023-06-02 23:16:39 +08:00
|
|
|
view_mode: my_module.archived_branch? ? 'archived' : 'active'),
|
|
|
|
title: my_module.name, class: 'my-module-title' %>
|
2016-02-12 23:52:43 +08:00
|
|
|
</h3>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div class="panel-body">
|
2020-12-10 19:07:18 +08:00
|
|
|
<div class="overdue-date" data-view-mode="active">
|
2021-09-14 17:08:35 +08:00
|
|
|
<% if !my_module.completed? && can_manage_my_module?(my_module) %>
|
2020-09-09 20:33:25 +08:00
|
|
|
<%= link_to due_date_my_module_path(my_module, format: :json), remote: true,
|
|
|
|
class: "due-date-link due-date-refresh" do %>
|
2023-06-21 20:13:20 +08:00
|
|
|
<%= render partial: "my_modules/card_due_date_label", locals: { my_module: my_module, format: :full_date } %>
|
2020-09-09 20:33:25 +08:00
|
|
|
<% end %>
|
|
|
|
<% else %>
|
2023-06-21 20:13:20 +08:00
|
|
|
<%= render partial: "my_modules/card_due_date_label", locals: { my_module: my_module, format: :full_date } %>
|
2017-02-10 21:27:20 +08:00
|
|
|
<% end %>
|
2020-09-09 20:33:25 +08:00
|
|
|
</div>
|
2020-12-10 19:07:18 +08:00
|
|
|
|
|
|
|
<div class="archived-overdue-date" data-view-mode="archived">
|
|
|
|
<span class="date-label"><%= t('experiments.canvas.full_zoom.due_date') %></span>
|
|
|
|
<span class="date-value">
|
|
|
|
<%= my_module.due_date ? l(my_module.due_date, format: :full_date) : t('experiments.canvas.full_zoom.no_due_date') %>
|
|
|
|
</span>
|
|
|
|
|
|
|
|
<div>
|
|
|
|
<span class="date-label"><%= t('experiments.module_archive.archived_on') %></span>
|
|
|
|
<span class="date-value">
|
2021-01-12 22:15:57 +08:00
|
|
|
<%= my_module.archived_branch? ? l(my_module_archived_on(my_module), format: :full_date) : t('experiments.canvas.full_zoom.no_due_date') %>
|
2020-12-10 19:07:18 +08:00
|
|
|
</span>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
2020-09-01 20:56:48 +08:00
|
|
|
<div class="status-label" style="--state-color: <%= my_module.my_module_status.color %>">
|
2020-09-11 22:08:03 +08:00
|
|
|
<% if my_module.status_changing %>
|
|
|
|
<i class="fas fa-spinner fa-spin"></i>
|
|
|
|
<span><%= t('experiments.canvas.full_zoom.status_transitioning_label') %></span>
|
|
|
|
<% end %>
|
2020-09-01 20:56:48 +08:00
|
|
|
<%= my_module.my_module_status.name %>
|
2020-07-17 20:48:45 +08:00
|
|
|
</div>
|
2016-02-12 23:52:43 +08:00
|
|
|
</div>
|
|
|
|
|
|
|
|
<div class="panel-footer panel-footer-scinote buttons-container">
|
|
|
|
<ul class="nav nav-tabs nav-tabs-less" role="tablist">
|
2022-05-09 17:40:31 +08:00
|
|
|
<li role="presentation">
|
2023-06-19 21:45:22 +08:00
|
|
|
<a class="btn btn-light task-card-view-users" href="<%= designated_users_my_module_user_my_modules_url(my_module_id: my_module.id, format: :json) %>" aria-controls="<%= my_module.id %>_users" role="tab" data-remote="true">
|
2023-06-08 14:33:37 +08:00
|
|
|
<span class="sn-icon sn-icon-users" aria-hidden="true"></span>
|
2022-05-09 17:40:31 +08:00
|
|
|
<span class="badge badge-indicator users-badge-indicator <%= 'hidden' unless my_module.designated_users_count.positive? %>"
|
|
|
|
data-linked-id="<%= my_module.id %>">
|
|
|
|
<%= my_module.designated_users_count %>
|
|
|
|
</span>
|
|
|
|
</a>
|
|
|
|
</li>
|
|
|
|
<li role="presentation">
|
2023-07-19 15:42:23 +08:00
|
|
|
<a class="btn btn-light task-card-view-activities" href="<%= activities_my_module_url(id: my_module.id, view_mode: my_module.archived_branch? ? 'archived' : 'active') %>"
|
|
|
|
aria-controls="<%= my_module.id %>_activities" role="tab">
|
2023-06-08 14:33:37 +08:00
|
|
|
<span class="sn-icon sn-icon-activities" aria-hidden="true"></span>
|
2022-05-09 17:40:31 +08:00
|
|
|
</a>
|
|
|
|
</li>
|
|
|
|
<li role="presentation">
|
2023-06-19 21:45:22 +08:00
|
|
|
<a href="#" class="btn btn-light open-comments-sidebar" tabindex=0
|
2023-01-16 19:40:44 +08:00
|
|
|
data-object-type="MyModule" data-object-id="<%= my_module.id %>">
|
2023-06-08 14:33:37 +08:00
|
|
|
<span class="sn-icon sn-icon-comments" aria-hidden="true"></span>
|
2023-01-16 19:40:44 +08:00
|
|
|
<span id="comment-count-<%= my_module.id %>" class="badge badge-indicator comments-badge-indicator <%= 'hidden' unless my_module.task_comments_count.positive? %>">
|
2022-05-09 17:40:31 +08:00
|
|
|
<%= my_module.task_comments_count %>
|
|
|
|
</span>
|
|
|
|
</a>
|
|
|
|
</li>
|
2022-12-12 18:45:59 +08:00
|
|
|
<li role="presentation" class="task-code">
|
|
|
|
ID: <%= my_module.code %>
|
|
|
|
</li>
|
2016-02-12 23:52:43 +08:00
|
|
|
</ul>
|
|
|
|
|
|
|
|
<!-- Tab panes -->
|
|
|
|
<div class="tab-content">
|
2022-05-09 17:40:31 +08:00
|
|
|
<div role="tabpanel" class="tab-pane" id="<%= my_module.id %>_info" data-contents="info"></div>
|
|
|
|
<div role="tabpanel" class="tab-pane" id="<%= my_module.id %>_users" data-contents="users"></div>
|
|
|
|
<div role="tabpanel" class="tab-pane" id="<%= my_module.id %>_activities" data-contents="activities"></div>
|
|
|
|
<div role="tabpanel" class="tab-pane" id="<%= my_module.id %>_comments" data-contents="comments"></div>
|
2016-02-12 23:52:43 +08:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
2022-11-11 16:45:07 +08:00
|
|
|
|