@( doc: services.document.ExtendedDocumentMetadata, annotationCount: Long, spatialCoverage: Option[com.vividsolutions.jts.geom.Envelope] = None, currentPart: Option[services.generated.tables.records.DocumentFilepartRecord] = None, content: Option[String] = None )(implicit request: RequestHeader) @thumbnailURL(part: services.generated.tables.records.DocumentFilepartRecord)={@if(part.getContentType == "IMAGE_IIIF"){@part.getFile.substring(0, part.getFile.length - 9)square/256,256/0/default.jpg}else{@controllers.document.routes.DocumentController.getImageTile(doc.id, part.getSequenceNo, "TileGroup0/2-1-1.jpg").absoluteURL}} @if(doc.isOpenToPublic) { @currentPart match { case Some(part) if (part.getContentType.startsWith("TEXT")) => { s" ($d)") | @annotationCount annotations" /> s" ($d)") | @annotationCount annotations" /> @content.map { c => } } case Some(part) if (part.getContentType.startsWith("IMAGE")) => { s" ($d)")" /> s" ($d)")" /> } case _ => { } } }