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

35 lines
1.3 KiB
Text
Raw Normal View History

<ul class="dropdown-menu dropdown-experiment-actions"
aria-labelledby="exActionsMenu-<%= experiment.id %>"
data-id="<%= experiment.id %>">
<% if can_manage_experiment?(experiment) %>
<li><%= link_to t('experiments.edit.label_title'),
edit_project_experiment_url(project, experiment),
remote: true,
type: 'button',
data: { id: experiment.id },
class: 'edit-experiment' %></li>
<% end %>
<li data-hook="experiment-actions-second-child"></li>
<% if can_clone_experiment?(experiment) %>
<li><%= link_to t('experiments.clone.label_title'),
2018-09-14 19:07:09 +08:00
clone_modal_experiment_url(experiment),
remote: true, type: 'button',
2020-04-28 18:30:43 +08:00
class: 'clone-experiment' %>
</li>
<% end %>
<% if can_move_experiment?(experiment) %>
<li><%= link_to t('experiments.move.label_title'),
2018-09-14 19:07:09 +08:00
move_modal_experiment_url(experiment),
remote: true, type: 'button',
2020-04-28 18:30:43 +08:00
class: 'move-experiment'%>
</li>
<% end %>
<% if can_archive_experiment?(experiment) %>
<li><%= link_to t('experiments.archive.label_title'),
archive_experiment_url(experiment),
type: 'button',
data: { confirm: t('experiments.canvas.archive_confirm') } %></li>
<% end %>
</ul>