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

63 lines
2.7 KiB
Text
Raw Normal View History

<div class="content-header sticky-header">
<div id="breadcrumbsWrapper">
<%= render partial: 'projects/index/breadcrumbs', locals: {target_folder: @experiment.project.project_folder, project: @experiment.project, experiment: @experiment} %>
</div>
<div class="title-row">
<h1 class="project-name">
<% if @experiment.archived? %>
<i class="fas fa-archive" data-view-mode="archived"></i>
<% end %>
<% if @inline_editable_title_config.present? %>
<%= render partial: "shared/inline_editing",
locals: {
initial_value: @experiment.name,
config: @inline_editable_title_config
} %>
<% else %>
<div class="name-readonly-placeholder">
<%= @experiment.name %>
</div>
<% end %>
</h1>
<div class="header-actions experiment-header">
2022-11-08 23:39:52 +08:00
<%= render layout: 'shared/view_switch', locals: { disabled: false } do %>
<li>
<%= link_to canvas_experiment_path(@experiment), class: ('selected' if action_name == 'canvas') do %>
<i class="fas fa-dice-four button-icon"></i>
<%= t('experiments.table.view.canvas') %>
<% end %>
</li>
<li>
<%= link_to table_experiment_path(@experiment), class: ('selected' if action_name == 'table') do %>
<i class="fas fa-list button-icon"></i>
<%= t('experiments.table.view.table') %>
<% end %>
</li>
<div role="separator" class="divider"></div>
<li>
<%= link_to module_archive_experiment_path(@experiment) do %>
<i class="fas fa-archive button-icon"></i>
<%= t('experiments.table.view.archived_tasks') %>
<% end %>
</li>
<% end %>
<% if can_manage_experiment?(@experiment) || can_clone_experiment?(@experiment) %>
<!-- experiment actions -->
<span class="dropdown actions-button">
<button class="btn btn-light dropdown-toggle" type="button" id="exActionsMenu" data-toggle="dropdown" aria-haspopup="true" aria-expanded="true">
<span class="hidden-xs"><%= t('experiments.canvas.actions') %></span>
<span class="visible-xs-inline"><i class="fas fa-sort"></i></span>
<span class="caret"></span>
</button>
<%= render partial: 'experiments/dropdown_actions.html.erb',
locals: { project: @project, experiment: @experiment } %>
</span>
<% end %>
<% if action_name == 'table' %>
<%= render partial: 'table_filters.html.erb' %>
<% end %>
</div>
</div>
</div>