Skip to content

Commit

Permalink
Merge pull request #2312 from DOAJ/feature/3714_zero_counts_for_artic…
Browse files Browse the repository at this point in the history
…les_in_month_dates

 Zero counts for articles in month dates #3714
  • Loading branch information
RK206 authored Dec 19, 2023
2 parents dab442f + 62eb888 commit c10367f
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 2 deletions.
16 changes: 16 additions & 0 deletions doajtest/testbook/public_site/ToC.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,19 @@ tests:
results:
- On the ToC of the journal with discontinued date in the past or today - the discontinued date is displayed
- On the ToC of the journal with discontinued date in the future - the discontinued date is not displayed
- title: Test articles journal's page
context:
role: anonymous
steps:
- step: To prepare for this test, ensure that a journal is publicly available in DOAJ, containing a minimum of 4 articles, with 2 from one month and 2 from another, and these months must not be consecutive (e.g. 2 articles from January and 2 from March).
- step: Search for the above journal
results:
- On the "Articles" tab in the ToC of the journal, the articles are displayed.
- On the left, the "Month" facet is displayed.
- step: Select one of the years from the Year facet
- step: Select one of the months from the list
results:
- On the "Articles" tab in the ToC of the journal, the articles from the selected month are displayed.
- On the left, the "Month" facet is displayed.
- The selected month is displayed as selected in the "Month" facet.

5 changes: 3 additions & 2 deletions portality/static/js/edges/public.toc.edge.js
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ $.extend(true, doaj, {
interval: "month",
display: "Month",
deactivateThreshold: 1,
active: false,
active: true,
displayFormatter : function(val) {
var months = ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'];
var mi = (new Date(parseInt(val))).getUTCMonth();
Expand All @@ -120,7 +120,8 @@ $.extend(true, doaj, {
open: false,
togglable: true,
countFormat: countFormat,
hideInactive: true
hideInactive: true,
hideEmpty: true
})
}),

Expand Down

0 comments on commit c10367f

Please sign in to comment.