scinote-web/app/views/canvas/medium_zoom/_my_module.html.erb
2021-09-14 11:08:35 +02:00

28 lines
1.1 KiB
Text

<div class="panel panel-default module-medium
<%= get_task_alert_color(my_module) %>"
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) %>">
<% if can_manage_my_module?(my_module) %>
<a class="edit-tags-link pull-right" data-remote="true" href="<%= my_module_tags_edit_url(my_module, format: :json) %>">
<%= render partial: "canvas/tags.html.erb", locals: { my_module: my_module } %>
</a>
<% else %>
<span class="edit-tags-link pull-right">
<%= render partial: "canvas/tags.html.erb", locals: { my_module: my_module } %>
</span>
<% end %>
<div class="panel-heading">
<h3 class="panel-title">
<%= link_to_if can_read_experiment?(my_module.experiment), my_module.name, protocols_my_module_path(my_module) %>
</h3>
</div>
</div>