2022-11-22 22:01:12 +08:00
|
|
|
<li class="divider-label"><%= t("experiments.table.my_module_actions.title") %></li>
|
|
|
|
<% if can_manage_my_module?(my_module) %>
|
|
|
|
<li>
|
2022-12-01 16:34:29 +08:00
|
|
|
<a href="" class="edit-my-module" data-id="<%= my_module.id %>">
|
2022-11-22 22:01:12 +08:00
|
|
|
<i class="fas fa-pen"></i>
|
|
|
|
<%= t("experiments.table.my_module_actions.edit") %>
|
|
|
|
</a>
|
|
|
|
</li>
|
|
|
|
<% end %>
|
2022-11-24 19:07:52 +08:00
|
|
|
<% if can_manage_experiment?(my_module.experiment) && my_module.active? %>
|
2022-11-22 22:01:12 +08:00
|
|
|
<li>
|
2022-12-01 16:34:29 +08:00
|
|
|
<a href="" class="duplicate-my-module" data-id="<%= my_module.id %>">
|
2022-11-22 22:01:12 +08:00
|
|
|
<i class="fas fa-copy"></i>
|
|
|
|
<%= t("experiments.table.my_module_actions.duplicate") %>
|
|
|
|
</a>
|
|
|
|
</li>
|
|
|
|
<% end %>
|
|
|
|
<% if can_move_my_module?(my_module) %>
|
|
|
|
<li>
|
2022-12-01 16:34:29 +08:00
|
|
|
<a href="" class="move-my-module" data-id="<%= my_module.id %>">
|
2022-11-22 22:01:12 +08:00
|
|
|
<i class="fas fa-arrow-right"></i>
|
|
|
|
<%= t("experiments.table.my_module_actions.move") %>
|
|
|
|
</a>
|
|
|
|
</li>
|
|
|
|
<% end %>
|
2023-01-13 18:50:42 +08:00
|
|
|
<% if can_manage_my_module_users?(my_module) %>
|
2023-01-09 23:04:57 +08:00
|
|
|
<% task_access_path = edit_access_permissions_project_experiment_my_module_path(my_module.experiment.project, my_module.experiment, my_module) %>
|
2023-01-12 19:15:29 +08:00
|
|
|
<% else %>
|
|
|
|
<% task_access_path = access_permissions_project_experiment_my_module_path(my_module.experiment.project, my_module.experiment, my_module) %>
|
2023-01-09 23:04:57 +08:00
|
|
|
<% end %>
|
2022-11-22 22:01:12 +08:00
|
|
|
<li>
|
2023-01-09 23:04:57 +08:00
|
|
|
<a class="open-access-modal" data-action="remote-modal" href="<%= task_access_path %>">
|
2022-11-22 22:01:12 +08:00
|
|
|
<i class="fas fa-door-open"></i>
|
|
|
|
<%= t("experiments.table.my_module_actions.access") %>
|
|
|
|
</a>
|
|
|
|
</li>
|
|
|
|
<% 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 %>">
|
|
|
|
<i class="fas fa-archive"></i>
|
|
|
|
<%= t("experiments.table.my_module_actions.archive") %>
|
|
|
|
</a>
|
|
|
|
</li>
|
|
|
|
<% end %>
|
2022-11-28 19:44:15 +08:00
|
|
|
<% 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 %>">
|
|
|
|
<i class="fas fa-undo"></i>
|
|
|
|
<%= t("experiments.table.my_module_actions.restore") %>
|
|
|
|
</a>
|
|
|
|
</li>
|
|
|
|
<% end %>
|