mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2024-11-11 01:44:34 +08:00
Merge pull request #4760 from G-Chubinidze/gc_SCI_7651
Missing experiment table empty state, fix breadcrumbs [SCI-7651]
This commit is contained in:
commit
9914f19634
5 changed files with 44 additions and 0 deletions
|
@ -472,6 +472,11 @@ var ExperimnetTable = {
|
|||
});
|
||||
|
||||
this.filterDropdown.on('filter:apply', () => {
|
||||
var tableRowLength = document.getElementsByClassName('table-row').length;
|
||||
document.getElementById('tasksNoResultsContainer').style.display = 'none';
|
||||
if (tableRowLength === 0) {
|
||||
document.getElementById('tasksNoResultsContainer').style.display = 'block';
|
||||
}
|
||||
$.each(this.filters, (_i, filter) => {
|
||||
this.activeFilters[filter.name] = filter.apply($experimentFilter);
|
||||
});
|
||||
|
|
|
@ -541,3 +541,28 @@
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
.tasks-no-results-container {
|
||||
grid-column: 1 / -1;
|
||||
grid-row: 8;
|
||||
display: none;
|
||||
}
|
||||
|
||||
.no-results-img {
|
||||
display: block;
|
||||
margin: auto;
|
||||
max-height: 230px;
|
||||
}
|
||||
|
||||
.no-results-title {
|
||||
@include font-h1;
|
||||
margin-bottom: .25em;
|
||||
margin-top: 1.25em;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.no-results-description {
|
||||
@include font-main;
|
||||
color: $color-silver-chalice;
|
||||
text-align: center;
|
||||
}
|
||||
|
|
5
app/views/experiments/_no_task_results.html.erb
Normal file
5
app/views/experiments/_no_task_results.html.erb
Normal file
|
@ -0,0 +1,5 @@
|
|||
<div class="tasks-no-results-container" id="tasksNoResultsContainer">
|
||||
<%= image_tag('/images/no_search_results.png', class: 'no-results-img') %>
|
||||
<div class="no-results-title"><%= t('projects.index.no_results_found') %></div>
|
||||
<div class="no-results-description"><%= t('projects.index.no_results_description') %></div>
|
||||
</div>
|
|
@ -37,6 +37,7 @@
|
|||
</div>
|
||||
<div class="table-body"></div>
|
||||
</div>
|
||||
<%= render partial: 'experiments/no_task_results.html.erb' %>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
|
|
@ -30,6 +30,14 @@
|
|||
data: link[:data]) %>
|
||||
<span class="delimiter">/</span>
|
||||
<% end %>
|
||||
<% elsif params[:controller] == 'experiments' && %w(canvas table module_archive).include?(params[:action]) %>
|
||||
<% links[0..-2].each do |link| %>
|
||||
<%= link_to(link[:label], link[:url],
|
||||
class: "breadcrumbs-link #{link[:class]}",
|
||||
title: link[:label],
|
||||
data: link[:data]) %>
|
||||
<span class="delimiter">/</span>
|
||||
<% end %>
|
||||
<% else %>
|
||||
<% links.each do |link| %>
|
||||
<%= link_to(link[:label], link[:url],
|
||||
|
|
Loading…
Reference in a new issue