craigsapp/website-polish-scores

Allow switching of the ID type in the URL.

Closed this issue · 2 comments

Sometimes it is useful to set the ID by cenid, and other times by the shelfmark ID. Allow switching between these displayed in the URL.

Use alt-c to display century ID.

and

alt-s to display shelfmark ID.

Implemented with commit b28a70c

Example: by default whichever ID is used in the id parameter of the URL, this style will be displayed in the URL of the work page:

https://polishscores.org/?id=pl-sa--481-a-viii-121--022

Screenshot 2024-02-10 at 19 19 16

Pressing alt-c will convert the fileid in the id URL parameter to a cenid:

https://polishscores.org/?id=18xx:393

Screenshot 2024-02-10 at 19 20 01

And pressing alt-f will conver the cenid in the id URL parameter into a fileid:

Screenshot 2024-02-10 at 19 21 01

Once you press alt-c or alt-f on a work page, that style will remain until changed in the current session with alt-c or alt-f. Before pressing one of those two keys, which ever the initial ID style of the id is used will be displayed in the URL. When entering the website from the browse page, the cenid is used by default (this could be changed).

Works when configuration options are present in the URL:

https://polishscores.org/?id=18xx:393&config=AsSs

Screenshot 2024-02-10 at 19 27 14