Missing experiment table empty state, fix breadcrumbs [SCI-7651]

This commit is contained in:
Giga Chubinidze 2023-01-06 11:40:41 +04:00
parent ea661f3c19
commit 79c7e6f0a2
5 changed files with 45 additions and 1 deletions

View file

@ -457,6 +457,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

@ -33,6 +33,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],