mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2024-11-10 17:36:33 +08:00
Add view dropdown to experiment screen
This commit is contained in:
parent
46ebeeb558
commit
a17cd78c20
3 changed files with 41 additions and 6 deletions
|
@ -90,6 +90,21 @@
|
|||
&:hover {
|
||||
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 %>
|
||||
</h1>
|
||||
<div class="header-actions experiment-header">
|
||||
<span class="dropdown actions-button">
|
||||
<button class="btn btn-light dropdown-toggle" type="button" id="exViewMenu" data-toggle="dropdown" aria-haspopup="true" aria-expanded="true">
|
||||
<span><%= t('experiments.canvas.view') %></span>
|
||||
<span class="caret"></span>
|
||||
</button>
|
||||
</span>
|
||||
<%= 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">
|
||||
|
|
|
@ -1312,6 +1312,10 @@ en:
|
|||
duplicate: 'Duplicate'
|
||||
manage_access: 'Manage access'
|
||||
task_data: 'Task data display'
|
||||
view:
|
||||
canvas: 'Canvas'
|
||||
table: 'Table'
|
||||
archived_tasks: 'Go to Archived tasks'
|
||||
add_tag: '+ Add tag'
|
||||
canvas:
|
||||
archive_confirm: "Are you sure to archive this experiment?"
|
||||
|
|
Loading…
Reference in a new issue