Skip to content

Commit

Permalink
Added filter for 1> issues on add page (Resolves #203)
Browse files Browse the repository at this point in the history
  • Loading branch information
Casvt committed Nov 25, 2024
1 parent 92ee338 commit a0d7038
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion frontend/static/js/add_volume.js
Original file line number Diff line number Diff line change
Expand Up @@ -151,6 +151,11 @@ function buildResults(results, api_key) {
all_issue_counts_option.innerText = 'All Issue Counts';
all_issue_counts_option.selected = true;
SearchEls.filters.issue_count.appendChild(all_issue_counts_option);
const one_higher_issue_counts_option = document.createElement('option');
one_higher_issue_counts_option.value = '>1 issues';
one_higher_issue_counts_option.innerText = '>1 issues';
one_higher_issue_counts_option.selected = true;
SearchEls.filters.issue_count.appendChild(one_higher_issue_counts_option);

issue_counts.forEach(ic => {
const entry = document.createElement('option');
Expand Down Expand Up @@ -266,7 +271,9 @@ function applyFilters() {
filter += '[data-_translated="false"]';
if (year !== '')
filter += `[data-_year="${year}"]`;
if (issue_count !== '')
if (issue_count === '>1')
filter += `:not([data-_issue_count="0"]):not([data-_issue_count="1"])`
else if (issue_count !== '')
filter += `[data-_issue_count="${issue_count}"]`;
if (volume_number !== '')
filter += `[data-_volume_number="${volume_number}"]`;
Expand Down

0 comments on commit a0d7038

Please sign in to comment.