mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2025-02-25 08:14:17 +08:00
Merge pull request #4605 from aignatov-bio/ai-sci-7386-add-view-switcher
Add view dropdown to experiment screen
This commit is contained in:
commit
f39f799e7e
3 changed files with 41 additions and 6 deletions
|
@ -90,6 +90,21 @@
|
||||||
&:hover {
|
&:hover {
|
||||||
background: $color-concrete;
|
background: $color-concrete;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
a {
|
||||||
|
display: inline-block;
|
||||||
|
margin: -1em;
|
||||||
|
padding: 1em;
|
||||||
|
width: calc(100% + 2em);
|
||||||
|
|
||||||
|
&.selected::after {
|
||||||
|
@include font-awesome;
|
||||||
|
content: $font-fas-check;
|
||||||
|
margin-left: auto;
|
||||||
|
position: absolute;
|
||||||
|
right: 1em;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -20,12 +20,28 @@
|
||||||
<% end %>
|
<% end %>
|
||||||
</h1>
|
</h1>
|
||||||
<div class="header-actions experiment-header">
|
<div class="header-actions experiment-header">
|
||||||
<span class="dropdown actions-button">
|
<%= render layout: 'shared/view_switch', locals: { disabled: false } do %>
|
||||||
<button class="btn btn-light dropdown-toggle" type="button" id="exViewMenu" data-toggle="dropdown" aria-haspopup="true" aria-expanded="true">
|
<li>
|
||||||
<span><%= t('experiments.canvas.view') %></span>
|
<%= link_to canvas_experiment_path(@experiment), class: ('selected' if action_name == 'canvas') do %>
|
||||||
<span class="caret"></span>
|
<i class="fas fa-dice-four button-icon"></i>
|
||||||
</button>
|
<%= t('experiments.table.view.canvas') %>
|
||||||
</span>
|
<% 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) %>
|
<% if can_manage_experiment?(@experiment) || can_clone_experiment?(@experiment) %>
|
||||||
<!-- experiment actions -->
|
<!-- experiment actions -->
|
||||||
<span class="dropdown actions-button">
|
<span class="dropdown actions-button">
|
||||||
|
|
|
@ -1312,6 +1312,10 @@ en:
|
||||||
duplicate: 'Duplicate'
|
duplicate: 'Duplicate'
|
||||||
manage_access: 'Manage access'
|
manage_access: 'Manage access'
|
||||||
task_data: 'Task data display'
|
task_data: 'Task data display'
|
||||||
|
view:
|
||||||
|
canvas: 'Canvas'
|
||||||
|
table: 'Table'
|
||||||
|
archived_tasks: 'Go to Archived tasks'
|
||||||
add_tag: '+ Add tag'
|
add_tag: '+ Add tag'
|
||||||
canvas:
|
canvas:
|
||||||
archive_confirm: "Are you sure to archive this experiment?"
|
archive_confirm: "Are you sure to archive this experiment?"
|
||||||
|
|
Loading…
Reference in a new issue