sapa / performing-arts-ch-templates

1 stars 3 forks source link

Layout:RecordResource : display Link to PDF on SAPA cloud #595

Closed b2d3c closed 1 week ago

b2d3c commented 1 month ago

After to have seen the complexity to display a PDF (host on our cloud) in the Plateform #555

We would like to propose to implement in a first time the mechanism to display only the activ link to the any kind of file host on SAPA Cloud.

Forms

Add in :

The informations will be add under a label "SAPA Cloud", next to "IIIF Manifest".

image

Sereval statements have to be able to be introduce.

Each statement have two mandatory Fields :

The link follow the format : https://cloud.sapa.swiss/s/[...]

Exemple : https://cloud.sapa.swiss/s/Bpoo56qtRyjtWdA

The Field would create a statement :

?RecordResource rico:hasInstantiation ?OnlineFile.
?OnlineFile rdf:type rico:Instantiation; rico:hasCarrierType <http://vocab.performing-arts.ch/fvonl>; rico:hasRepresentationType <http://vocab.performing-arts.ch/rttx>; rico:descriptiveNote ?OnlineFileValue.

Layout

This statement have to be display in :

add on the top of the Central column.

Under the label "Related documents"

The string of ?OnlineFileValue will display with the active link to the File catch in.

b2d3c commented 1 month ago

We try a new way : see https://github.com/sapa/performing-arts-ch-templates/issues/555#issuecomment-2126567849

fkraeutli commented 1 month ago

Implemented in Dev and added to Record form. Where should the field appear in the Record Set and Record Part forms?

b2d3c commented 1 month ago

Exemple DEV

Form:Record image

Layout:Record image

b2d3c commented 1 month ago

Questions :

fkraeutli commented 1 month ago

Ah so ?OnlineFile should be the URL of the PDF and rico:descriptiveNote ?OnlineFileValue a title for the PDF? That means two input fields?

fkraeutli commented 1 month ago

This is how it currently is:

Screenshot 2024-05-23 at 14 40 43
b2d3c commented 1 month ago

Ah so ?OnlineFile should be the URL of the PDF and rico:descriptiveNote ?OnlineFileValue a title for the PDF? That means two input fields?

I have in mind something like this, a box with to Field URL + DescriptiveNote: image

In Layout only the DescriptiveNote is displayed with the link under.

b2d3c commented 1 month ago

This is how it currently is:

Screenshot 2024-05-23 at 14 40 43

Ok ! DEV https://www.dev.performing-arts.ch/resource/?uri=http%3A%2F%2Fdata.performing-arts.ch%2Fr%2F6312e712-001c-4713-afe1-ad77cb001a65%2Fpdf%2F1dc2b57d3e4e5acdf9b6ba832037f627

For the URI, i have think something like vimeo (DEV) : image

In this way DescriptiveNote will be free for add a string like "Rapport annuel 2022".

fkraeutli commented 1 month ago

Makes sense, I'll adjust accordingly

fkraeutli commented 1 month ago

There is one issue with these sort of composite forms. The form represents a single URI and there is currently no good mechanism for defining the URI in the form field. In this case, the first form field would take the URI and the second one the description, which will be linked to the URI. This works when creating the statements for the first time, but it gets tricky to edit.

I will try to find a workaround. The alternative would be to have an in-between entity, e.g.

  ?RecordResource rico:hasInstantiation ?entity .
  ?entity rdf:type rico:Instantiation ; 
    rico:hasCarrierType <http://vocab.performing-arts.ch/fvonl> ; 
    rico:hasRepresentationType <http://vocab.performing-arts.ch/rttx>;
    rico:descriptiveNote ?OnlineFileValue.
 ?entity owl:sameAs ?OnlineFile .
b2d3c commented 1 month ago

Reminder : URI Instantiation are modelling following .../o/....

fkraeutli commented 1 month ago

I found an experimental field that allows editing the URI. The downside is that it does not (yet) have any checks implemented, so it currently does not verify that the URL entered is correct and corresponds to a SAPA cloud URL. Have a go, it's on DEV.

b2d3c commented 1 month ago

Interresting ! For me it's OK only some little modifications (see below).

Test

I have done a try.

Record DEV image

Instantiation DEV image

Modifications

Just some tinny modifications :

  1. Label in Layout :

    • en : Related documents
    • fr : documents liés
    • de : Verwandte Dokumente
    • it : Documenti correlati
  2. Declaration postion in Layout : in column 3 under the Treeview (Record hierarchy)

  3. to add in Layout:RecordSet, Record and RecordPart.

  4. In Form:RecordSet, add the SAPA Cloud box in "Additional Sources" section

  5. In Form:RecordPart add the SAPA Cloud box with IIIF and Vimeo Section.

fkraeutli commented 3 weeks ago

Changed and deployed to Dev

b2d3c commented 3 weeks ago

Es ist toll !

Es fehlt nur noch :

fkraeutli commented 3 weeks ago

Done and deployed to Dev

b2d3c commented 2 weeks ago

Perfekt! You can deploy in PROD.