Merge pull request #4760 from G-Chubinidze/gc_SCI_7651

Missing experiment table empty state, fix breadcrumbs [SCI-7651]
This commit is contained in:
artoscinote 2023-01-06 10:51:34 +01:00 committed by GitHub
commit 9914f19634
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 44 additions and 0 deletions

View file

@ -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);
});

View file

@ -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;
}

View 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>

View file

@ -37,6 +37,7 @@
</div>
<div class="table-body"></div>
</div>
<%= render partial: 'experiments/no_task_results.html.erb' %>
</div>
</div>

View file

@ -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],