craigsapp / website-polish-scores

Front-end for digital transcriptions of the Polish Music Heritage in Open Access project
https://polishscores.org
3 stars 1 forks source link

Sort search results by date #42

Closed craigsapp closed 2 years ago

craigsapp commented 2 years ago

Store the most recent edit date for scores in the score index

https://data.nifc.humdrum.org/popc2-score-index.aton

Either from an EST or EEV or END record date.

Then add a keyboard shortcut key such as "t" to sort most recent first and "T" to sort oldest first; or shift-D to sort most recent first (where d is for opening the download menu on the work pages).

craigsapp commented 2 years ago

This will allow an easy method to review the music notation for recently added works, as well as perhaps a recent-works page accessible from an icon in the browse toolbar.

craigsapp commented 2 years ago

Implemented in commit https://github.com/craigsapp/website-polish-scores/commit/2139fdc188dfff9f91982282d91a21616304fb0d

If you press the "d" key on the keyboard, a new column is added to the browse table:

Screen Shot 2021-10-21 at 12 00 26 PM

(I just fixed the Dec 2021 last edited date in the file, so that will be fixed in the next publication of the scores).

If you press "d" again, the last-edited column is removed:

Screen Shot 2021-10-21 at 12 00 22 PM

The sort order is currently left in date mode, but this will be fixed later when sorting by shelf-mark, composer and title are implemented (it should revert to the previous sort method, or go to a default sorting method, such as composer).

The last edited display also works when doing a search, such as here where a single composer's works are listed:

http://127.0.0.1:3434?c=Asola%2C%20Giovanni%20Matteo

Screen Shot 2021-10-21 at 12 08 57 PM