✨feature: Split summary to separate template
This commit is contained in:
@@ -18,7 +18,7 @@ jQuery(document).ready(function ($) {
|
||||
if (selectedTypes.length > 0) appliedFilters.push(`<strong>Type:</strong> ${selectedTypes.join(', ')}`);
|
||||
if (selectedSubjects.length > 0) appliedFilters.push(`<strong>Subject:</strong> ${selectedSubjects.join(', ')}`);
|
||||
|
||||
$('#applied-filters').html(appliedFilters.length ? appliedFilters.join(' | ') : 'None');
|
||||
$('#applied-filters').html(appliedFilters.length ? appliedFilters.join('<br>') : 'None');
|
||||
|
||||
let formData = {
|
||||
action: 'filter_resources',
|
||||
@@ -36,7 +36,11 @@ jQuery(document).ready(function ($) {
|
||||
response = JSON.parse(response);
|
||||
|
||||
$('#resource-results').html(response.html);
|
||||
$('#result-count').text(response.count);
|
||||
if (response.count !== undefined) {
|
||||
$('#result-count').text(response.count);
|
||||
} else {
|
||||
$('#result-count').text($('#result-count').text()); // Keep initial count
|
||||
}
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
@@ -57,9 +57,11 @@
|
||||
#resource-filter-summary {
|
||||
display: flex;
|
||||
gap: .5rem;
|
||||
justify-content: space-between;
|
||||
margin-bottom: 1.25rem;
|
||||
width: 100%;
|
||||
|
||||
p { margin: 0; }
|
||||
p { margin: 0; padding: 0; }
|
||||
}
|
||||
|
||||
#resource-results {
|
||||
|
||||
Reference in New Issue
Block a user