mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2025-03-05 20:23:16 +08:00
Merge pull request #82 from ZmagoD/zd_SCI_359
Add plus button at the bottom of project overview page [fixes SCI-359]
This commit is contained in:
commit
aa650bbc65
4 changed files with 38 additions and 0 deletions
|
@ -47,6 +47,9 @@
|
|||
|
||||
// Bind modal to new-experiment action
|
||||
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
|
||||
// panel
|
||||
|
|
|
@ -426,3 +426,19 @@ li.module-hover {
|
|||
display: block;
|
||||
max-width: 200px;
|
||||
}
|
||||
|
||||
.big-plus {
|
||||
color: $color-mystic;
|
||||
display: block;
|
||||
font-size: 250px;
|
||||
margin: 20px 0;
|
||||
text-align: center;
|
||||
|
||||
&:hover {
|
||||
color:$color-alto;
|
||||
}
|
||||
|
||||
&:focus {
|
||||
color:$color-alto;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -30,6 +30,9 @@
|
|||
|
||||
<%= content_tag(:div, '', class: 'clearfix visible-lg-block') if (index + 1) % 2 == 0 %>
|
||||
<% end %>
|
||||
<% if can_create_experiment(@project) %>
|
||||
<%= render 'projects/show/new_experiment' %>
|
||||
<% end %>
|
||||
</div>
|
||||
<%= javascript_include_tag("experiments/dropdown_actions") %>
|
||||
<%= javascript_include_tag("projects/show") %>
|
||||
|
|
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…
Reference in a new issue