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

38 lines
1.7 KiB
Text

<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'),
clone_modal_experiment_url(experiment),
remote: true,
type: 'button',
class: 'clone-experiment popover_v2',
data: { popoverlink: I18n.t('popover_test.link.experiment.copy'), popovercontent: I18n.t('popover_test.text.experiment.copy') }
%></li>
<% end %>
<% if can_move_experiment?(experiment) %>
<li><%= link_to t('experiments.move.label_title'),
move_modal_experiment_url(experiment),
remote: true,
type: 'button',
class: 'move-experiment popover_v2',
data: { popoverlink: I18n.t('popover_test.link.experiment.move'), popovercontent: I18n.t('popover_test.text.experiment.move') }
%></li>
<% end %>
<% if can_manage_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>