2021-01-29 05:47:08 +08:00
|
|
|
<div class="content-header sticky-header">
|
2021-02-11 06:33:16 +08:00
|
|
|
<div id="breadcrumbsWrapper">
|
2021-03-04 16:00:58 +08:00
|
|
|
<%= render partial: 'projects/index/breadcrumbs', locals: { target_folder: @project.project_folder, project: @project } %>
|
2021-02-11 06:33:16 +08:00
|
|
|
</div>
|
2021-01-25 22:36:23 +08:00
|
|
|
<div class="title-row">
|
|
|
|
<h1 class="project-name">
|
2021-02-03 21:23:38 +08:00
|
|
|
<i class="fas fa-archive" data-view-mode="archived"></i>
|
2021-01-25 22:36:23 +08:00
|
|
|
<% if @inline_editable_title_config.present? %>
|
|
|
|
<%= render partial: "shared/inline_editing",
|
|
|
|
locals: {
|
|
|
|
initial_value: @project.name,
|
|
|
|
config: @inline_editable_title_config
|
|
|
|
} %>
|
|
|
|
<% else %>
|
2021-03-09 05:01:26 +08:00
|
|
|
<div class="name-readonly-placeholder">
|
|
|
|
<%= @project.name %>
|
|
|
|
</div>
|
2020-12-17 20:07:30 +08:00
|
|
|
<% end %>
|
2021-01-25 22:36:23 +08:00
|
|
|
</h1>
|
2021-01-29 05:47:08 +08:00
|
|
|
<div class="sci-btn-group header-actions">
|
|
|
|
<!-- View switch dropdown -->
|
|
|
|
<%= render layout: 'shared/view_switch', locals: { disabled: false } do %>
|
2021-02-11 18:50:59 +08:00
|
|
|
<li class="view-switch-list cards-switch form-dropdown-item">
|
|
|
|
<%= button_to(view_type_project_path(@project, format: :json),
|
|
|
|
method: :put,
|
|
|
|
remote: true,
|
|
|
|
class: "btn btn-light button-to #{ @current_view_type == 'cards' ? 'selected' : ''}",
|
|
|
|
form_class: 'change-experiments-view-type-form',
|
|
|
|
params: { project: { view_type: 'cards', project_id: @project.id } }) do %>
|
|
|
|
<i class="fas fa-th-large"></i>
|
|
|
|
<%= t('projects.index.header.cards') %>
|
|
|
|
<% end %>
|
2021-01-29 05:47:08 +08:00
|
|
|
</li>
|
|
|
|
|
2021-02-11 18:50:59 +08:00
|
|
|
<li class="view-switch-list cards-switch form-dropdown-item">
|
|
|
|
<%= button_to(view_type_project_path(@project, format: :json),
|
|
|
|
method: :put,
|
|
|
|
remote: true,
|
|
|
|
class: "btn btn-light button-to #{ @current_view_type == 'table' ? 'selected' : ''}",
|
|
|
|
form_class: 'change-experiments-view-type-form',
|
|
|
|
params: { project: { view_type: 'table', project_id: @project.id } }) do %>
|
|
|
|
<i class="fas fa-list"></i>
|
|
|
|
<%= t('projects.index.header.table') %>
|
|
|
|
<% end %>
|
2021-01-29 05:47:08 +08:00
|
|
|
</li>
|
|
|
|
|
|
|
|
<div role="separator" class="divider"></div>
|
|
|
|
<li class="view-switch-active archive-switch" data-view-mode="archived" data-url="<%= project_path(@project) %>">
|
|
|
|
<i class="fas fa-rocket button-icon"></i> <%= t('experiments.header.active_experiments') %>
|
|
|
|
</li>
|
|
|
|
|
|
|
|
<li class="view-switch-archived archive-switch" data-view-mode="active" data-url="<%= project_path(@project, view_mode: 'archived') %>">
|
|
|
|
<i class="fas fa-archive button-icon"></i> <%= t('experiments.header.archived_experiments') %>
|
|
|
|
</li>
|
|
|
|
<% end %>
|
2021-01-29 20:24:02 +08:00
|
|
|
<%= render layout: 'shared/filter_dropdown', locals: {
|
|
|
|
container_class: 'experiments-filters',
|
|
|
|
dropdown_title: t("filters_modal.title"),
|
|
|
|
search_field_history_key: 'experiment_filters_per_team'
|
|
|
|
} do %>
|
|
|
|
<%= render partial: 'shared/filter_dropdown/text_search', locals: {container_class: ''} %>
|
|
|
|
<%= render partial: 'shared/filter_dropdown/datetime_search', locals: {container_class: 'started-on-filter', label: t("filters_modal.created_on.label"), view_mode: nil } %>
|
|
|
|
<%= render partial: 'shared/filter_dropdown/datetime_search', locals: {container_class: 'modified-on-filter', label: t("filters_modal.updated_on.label"), view_mode: nil } %>
|
|
|
|
<%= render partial: 'shared/filter_dropdown/datetime_search', locals: {container_class: 'archived-on-filter', label: t("filters_modal.archived_on.label"), view_mode: 'archived' } %>
|
|
|
|
|
|
|
|
<% end %>
|
2021-01-29 05:47:08 +08:00
|
|
|
<!-- Sort menu dropdown -->
|
|
|
|
<div class="dropdown sort-menu">
|
2021-01-25 22:36:23 +08:00
|
|
|
<button class="btn btn-light icon-btn dropdown-toggle" type="button" id="sortMenu" data-toggle="dropdown" aria-haspopup="true" aria-expanded="true">
|
|
|
|
<i class="fas fa-sort-amount-up"></i>
|
|
|
|
</button>
|
2021-02-02 18:17:29 +08:00
|
|
|
<ul id="sortMenuDropdown" class="dropdown-menu sort-experiments-menu dropdown-menu-right" aria-labelledby="sortMenu">
|
|
|
|
<% %w(new old atoz ztoa archived_new archived_old).each_with_index do |sort, i| %>
|
2021-01-25 22:36:23 +08:00
|
|
|
<% if i.even? && i.positive? %>
|
2021-02-02 18:17:29 +08:00
|
|
|
<li class="divider" <%= i > 3 ? 'data-view-mode=archived' : '' %>></li>
|
2021-01-25 22:36:23 +08:00
|
|
|
<% end %>
|
2021-02-02 18:17:29 +08:00
|
|
|
<li <%= %w(archived_new archived_old).include?(sort) ? 'data-view-mode=archived' : '' %>>
|
|
|
|
<a class="<%= 'selected' if @current_sort == sort %>"
|
|
|
|
data-sort="<%= sort %>" >
|
|
|
|
<%= t("general.sort.#{sort}_html") %>
|
|
|
|
</a>
|
2021-01-25 22:36:23 +08:00
|
|
|
</li>
|
2020-12-17 20:07:30 +08:00
|
|
|
<% end %>
|
2021-02-02 18:17:29 +08:00
|
|
|
</ul>
|
2021-01-25 22:36:23 +08:00
|
|
|
</div>
|
2020-12-17 20:07:30 +08:00
|
|
|
</div>
|
|
|
|
</div>
|
2021-01-29 05:47:08 +08:00
|
|
|
<div id="toolbarWrapper" class="toolbar-row">
|
|
|
|
<%= render partial: 'projects/show/toolbar' %>
|
|
|
|
</div>
|
2020-12-17 20:07:30 +08:00
|
|
|
</div>
|