Closed fsteeg closed 7 years ago
Deployed to staging: http://quaoar1.hbz-nrw.de:5001/collections/akademieschriften.bbaw.b.de
Fixed this for "language" and "subject". The cause was that sometimes these fields come as simple fields or as array (see commit 6218f12c04ef60cffa6f4d99cb5c2976ef3030d3).
But before opening the PR: I have no idea how many other fields can come with arrays or simple fields. I think we have two options:
(1) Control during transformation whether the data comes as an array or a simple field (some fields are arrays with one single element, then, in some cases)
(2) When building the UI table, handle the possibility for every field.
Since you already implemented the conditional logic on the UI level, I'd suggest you extract that to a reusable template block and use that for all the fields (as we discussed offline yesterday).
+1 for fixing the concrete issue
Fixed this now for every field, i.e. every field can come as simple field or array, we don't mind. However, there is something not solved yet: When data comes as an array, we don't know whether the strings should be rendered as a hyperlink or not. The problem is that these arrays can contain strings starting with http and others that don't. But maybe this is already part of the solution: we could check how the string starts and then decide as to whether we have it hyperlinked or not. What do you think, @fsteeg and @acka47?
That's a different issue, and we should approach it after #9, which replaces many links with labels.
Please deploy the fix and I will add another issue for the link issue when needed.
Deployed to production, closing. See http://digitalisiertedrucke.de/collections/akademieschriften.bbaw.b.de
See list of all collections: http://dd.lobid.org/?q=*&t=collection
e.g. http://dd.lobid.org/collections/akademieschriften.bbaw.b.de