mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2025-10-06 11:57:16 +08:00
adds plus button at the bottom of project overview page [fixes SCI-359]
This commit is contained in:
parent
ed1cd193ac
commit
bb11999566
4 changed files with 36 additions and 0 deletions
|
@ -48,6 +48,9 @@
|
||||||
// Bind modal to new-experiment action
|
// Bind modal to new-experiment action
|
||||||
initializeModal($("#new-experiment"), '#new-experiment-modal');
|
initializeModal($("#new-experiment"), '#new-experiment-modal');
|
||||||
|
|
||||||
|
// Bind modal to big-plus new experiment actions
|
||||||
|
initializeModal('.big-plus', '#new-experiment-modal');
|
||||||
|
|
||||||
// Bind modal to all actions listed on dropdown accesible from experiment
|
// Bind modal to all actions listed on dropdown accesible from experiment
|
||||||
// panel
|
// panel
|
||||||
initializeDropdownActions();
|
initializeDropdownActions();
|
||||||
|
|
|
@ -426,3 +426,17 @@ li.module-hover {
|
||||||
display: block;
|
display: block;
|
||||||
max-width: 200px;
|
max-width: 200px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.big-plus{
|
||||||
|
font-size: 250px;
|
||||||
|
color: $color-mystic;
|
||||||
|
text-align: center;
|
||||||
|
display: block;
|
||||||
|
margin: 20px 0;
|
||||||
|
&:hover{
|
||||||
|
color:$color-alto;
|
||||||
|
}
|
||||||
|
&:focus{
|
||||||
|
color:$color-alto;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
|
@ -30,5 +30,8 @@
|
||||||
|
|
||||||
<%= content_tag(:div, '', class: 'clearfix visible-lg-block') if (index + 1) % 2 == 0 %>
|
<%= content_tag(:div, '', class: 'clearfix visible-lg-block') if (index + 1) % 2 == 0 %>
|
||||||
<% end %>
|
<% end %>
|
||||||
|
<% if can_create_experiment(@project) %>
|
||||||
|
<%= render 'projects/show/new_experiment' %>
|
||||||
|
<% end %>
|
||||||
</div>
|
</div>
|
||||||
<%= javascript_include_tag("experiments/dropdown_actions") %>
|
<%= javascript_include_tag("experiments/dropdown_actions") %>
|
||||||
|
|
16
app/views/projects/show/_new_experiment.html.erb
Normal file
16
app/views/projects/show/_new_experiment.html.erb
Normal file
|
@ -0,0 +1,16 @@
|
||||||
|
<div class="col-md-6">
|
||||||
|
<div class="panel panel-default experiment-panel">
|
||||||
|
<div class="panel-heading">
|
||||||
|
|
||||||
|
<h3 class="panel-title"><%= t('experiments.new.modal_title') %></h3>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
<div class="panel-body">
|
||||||
|
<%= link_to fa_icon('plus'),
|
||||||
|
new_project_experiment_url(@project),
|
||||||
|
remote: true,
|
||||||
|
class: 'big-plus' %>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
Loading…
Add table
Reference in a new issue