Link from colections list to collection page
cziaarm opened this issue · comments
Hello,
Looks like "1#thumbs" is being appended to all the table links including the ones from the collection list to the collection page: eg library/3/1#thumbs from library/3
Resulting in:
"document_page() missing 1 required positional argument: 'page'"
Similar error triggered when using the "up" button from a document page
eg from library/3/331/1#thumbs up leads to library/3/331
This all stems for requirement for an extra digit on the url for a document page (to set the page number)
The nav will expect that
[collId] => a collection
[collId]/[docId] => a document
[collId]/[docId]/[page_num] => a page
possible solution:
As we currently don't have dedicated view for library/[collId]/[docId]/[page_num] we can make the [page_num] element an optional parameter for the document view.
If [page_num] is not supplied the view can default to the first page. Though this would only solve the first issue, the link down rather than the link up...
At the moment I go from the collections list directly to a documents first page. The URL is made in the utils/read.js. So if this is deployed the link downwards should work. But the navigation upwards is broken at the moment. Not sure how to fix this.
Implemented solution like suggested: If [page_num] is not supplied the view can default to the first page.
Seems that this works also for the navigation upwards
Nice one!
As I thought this fixes things in almost all the cases. Last thing is the up button when we have a page number in the url. I wouldn't want to not have the page nnumber in the url as it gives us a uri for the view of "document-on-page-x".
I guess the only thing to do is to deal with the exception in the nav code.
Deployed: https://transkribus.eu/readTest/
I'll close this and make an issue against TWI-nav for the other thing.
Cheers!