scinote-web/app/views/experiments/_table_row_actions.html.erb

53 lines
1.9 KiB
Text
Raw Normal View History

<li class="divider-label"><%= t("experiments.table.my_module_actions.title") %></li>
<% if can_restore_my_module?(my_module) %>
<li>
<a href="<%= restore_my_modules_experiment_path(my_module.experiment) %>" class="restore-my-module" data-id="<%= my_module.id %>">
2023-06-08 14:33:37 +08:00
<i class="sn-icon sn-icon-restore"></i>
<%= t("experiments.table.my_module_actions.restore") %>
</a>
</li>
<% end %>
<% if can_manage_my_module?(my_module) %>
<li>
<a href="" class="edit-my-module" data-id="<%= my_module.id %>">
2023-06-15 21:12:51 +08:00
<i class="sn-icon sn-icon-edit"></i>
<%= t("experiments.table.my_module_actions.edit") %>
</a>
</li>
<% end %>
<% if can_manage_my_module_users?(my_module) %>
<% task_access_path = edit_access_permissions_my_module_path(my_module) %>
<% else %>
<% task_access_path = access_permissions_my_module_path(my_module) %>
<% end %>
<li>
<a class="open-access-modal" data-action="remote-modal" href="<%= task_access_path %>">
2023-06-08 14:33:37 +08:00
<i class="sn-icon sn-icon-project-member-access"></i>
<%= t("experiments.table.my_module_actions.access") %>
</a>
</li>
<% if can_move_my_module?(my_module) %>
<li>
<a href="" class="move-my-module" data-id="<%= my_module.id %>">
2023-06-08 14:33:37 +08:00
<i class="sn-icon sn-icon-move"></i>
<%= t("experiments.table.my_module_actions.move") %>
</a>
</li>
<% end %>
<% if can_manage_experiment?(my_module.experiment) && my_module.active? %>
<li>
<a href="" class="duplicate-my-module" data-id="<%= my_module.id %>">
2023-06-08 14:33:37 +08:00
<i class="sn-icon sn-icon-duplicate"></i>
<%= t("experiments.table.my_module_actions.duplicate") %>
</a>
</li>
<% end %>
<% if can_archive_my_module?(my_module) %>
<li>
<a href="<%= archive_my_modules_experiment_path(my_module.experiment) %>" class="archive-my-module" data-id="<%= my_module.id %>">
2023-06-08 14:33:37 +08:00
<i class="sn-icon sn-icon-archive"></i>
<%= t("experiments.table.my_module_actions.archive") %>
</a>
</li>
<% end %>