2021-01-29 05:47:08 +08:00
|
|
|
<div id="projectShowToolbar" class="project-show-toolbar">
|
|
|
|
<!-- new experiment button -->
|
2021-09-07 17:27:52 +08:00
|
|
|
<% if can_create_project_experiments?(@project) %>
|
2021-02-11 19:36:39 +08:00
|
|
|
<%= button_to new_project_experiment_url(@project),
|
|
|
|
remote: true,
|
|
|
|
form_class: 'new-experiment-form',
|
|
|
|
data: {view_mode: :active},
|
|
|
|
id: 'new-experiment',
|
|
|
|
method: :get,
|
|
|
|
class: 'btn btn-primary' do %>
|
2021-01-29 05:47:08 +08:00
|
|
|
<span class="fas fa-plus" aria-hidden="true"></span>
|
|
|
|
<span class="hidden-xs"><%= t('experiments.toolbar.new_button') %></span>
|
|
|
|
<% end %>
|
|
|
|
<% end %>
|
|
|
|
|
2021-02-09 22:47:15 +08:00
|
|
|
<%= button_to edit_experiments_path(),
|
|
|
|
class: 'btn btn-light edit-experiment-btn single-object-action hidden',
|
|
|
|
form_class: 'edit-experiments-form',
|
|
|
|
data: { for: :editable, view_mode: 'active' },
|
|
|
|
remote: true,
|
|
|
|
method: :get do %>
|
2021-01-29 05:47:08 +08:00
|
|
|
<span class="fas fa-pencil-alt" aria-hidden="true"></span>
|
|
|
|
<span class="hidden-xs"><%= t('experiments.toolbar.edit_button') %></span>
|
2021-02-09 22:47:15 +08:00
|
|
|
<% end %>
|
2021-01-29 05:47:08 +08:00
|
|
|
|
2021-02-09 22:47:15 +08:00
|
|
|
<%= button_to clone_modal_experiments_path(),
|
|
|
|
class: 'btn btn-light clone-experiment-btn single-object-action hidden',
|
|
|
|
form_class: 'clone-experiments-form',
|
|
|
|
data: { for: :duplicable, view_mode: 'active' },
|
|
|
|
remote: true,
|
|
|
|
method: :get do %>
|
2021-01-29 05:47:08 +08:00
|
|
|
<span class="fas fa-copy" aria-hidden="true"></span>
|
|
|
|
<span class="hidden-xs"><%= t('experiments.toolbar.duplicate_button') %></span>
|
2021-02-09 22:47:15 +08:00
|
|
|
<% end %>
|
2021-01-29 05:47:08 +08:00
|
|
|
|
2021-02-09 22:47:15 +08:00
|
|
|
<%= button_to move_modal_experiments_path(),
|
|
|
|
class: 'btn btn-light move-experiment-btn single-object-action hidden',
|
|
|
|
form_class: 'move-experiments-form',
|
2023-03-02 15:35:22 +08:00
|
|
|
data: { for: :moveable },
|
2021-02-09 22:47:15 +08:00
|
|
|
remote: true,
|
|
|
|
method: :get do %>
|
2021-01-29 05:47:08 +08:00
|
|
|
<span class="fas fa-arrow-right" aria-hidden="true"></span>
|
|
|
|
<span class="hidden-xs"><%= t('experiments.toolbar.move_button') %></span>
|
2021-02-09 22:47:15 +08:00
|
|
|
<% end %>
|
2021-01-29 05:47:08 +08:00
|
|
|
|
2021-02-03 21:23:38 +08:00
|
|
|
<%= button_to archive_group_project_experiments_path(@project),
|
|
|
|
class: 'btn btn-light archive-experiments-btn multiple-object-action hidden',
|
|
|
|
form_class: 'archive-experiments-form',
|
|
|
|
data: { for: :archivable, view_mode: 'active' },
|
|
|
|
remote: true,
|
|
|
|
method: :post do %>
|
2021-01-29 05:47:08 +08:00
|
|
|
<span class="fas fa-archive" aria-hidden="true"></span>
|
2021-02-03 21:23:38 +08:00
|
|
|
<span class="hidden-xs"><%= t('projects.index.archive_button') %></span>
|
|
|
|
<% end %>
|
|
|
|
|
|
|
|
<%= button_to restore_group_project_experiments_path(@project),
|
|
|
|
class: 'btn btn-light restore-experiments-btn multiple-object-action hidden',
|
|
|
|
form_class: 'restore-experiments-form',
|
|
|
|
data: { for: :restorable, view_mode: 'archived' },
|
|
|
|
remote: true,
|
|
|
|
method: :post do %>
|
|
|
|
<span class="fas fa-undo" aria-hidden="true"></span>
|
|
|
|
<span class="hidden-xs"><%= t('experiments.toolbar.restore_button') %></span>
|
|
|
|
<% end %>
|
2021-01-29 05:47:08 +08:00
|
|
|
</div>
|