<% if experiment.archived? && can_restore_experiment?(experiment) %>
-
<%= button_to(experiment_path(experiment, format: :json),
method: :put,
remote: true,
class: 'btn btn-light justify-start',
form_class: 'experiment-action-form',
params: { experiment: { archived: false } }) do %>
<%= t('experiments.index.restore_option') %>
<% end %>
<% end %>
<% if experiment.active? && can_manage_experiment?(experiment) %>
-
<%= link_to edit_experiment_url(experiment),
remote: true,
class: 'edit-experiment experiment-action-link' do %>
<%= t('experiments.index.edit_option') %>
<% end %>
<% end %>
<% if can_manage_experiment_users?(experiment) %>
-
<%= link_to edit_access_permissions_experiment_path(experiment), data: { action: 'remote-modal'} do %>
<%= t('experiments.index.experiment_access') %>
<% end %>
<% else %>
-
<%= link_to access_permissions_experiment_path(experiment), data: { action: 'remote-modal'} do %>
<%= t('experiments.index.experiment_access') %>
<% end %>
<% end %>
<% if can_move_experiment?(experiment) %>
-
<%= link_to move_modal_experiment_url(experiment),
remote: true,
class: 'move-experiment experiment-action-link' do %>
<%= t('experiments.index.move_option') %>
<% end %>
<% end %>
<% if can_clone_experiment?(experiment) %>
-
<%= link_to clone_modal_experiment_url(experiment),
remote: true, type: 'button',
class: 'clone-experiment experiment-action-link' do %>
<%= t('experiments.index.clone_option') %>
<% end %>
<% end %>
<% if experiment.active? && can_archive_experiment?(experiment) %>
-
<%= button_to(archive_experiment_path(experiment),
method: :post,
remote: true,
class: 'btn btn-light justify-start',
form_class: 'experiment-action-form',
data: { confirm: t('experiments.index.archive_confirm') } ) do %>
<%= t('experiments.index.archive_option') %>
<% end %>
<% end %>