Dsc 287

This request includes impl for selecting image to represent a work as per dsc-287.
Good points, will consider.

From: Terence Ingram <notifications@github.com<mailto:notifications@github.com>>
Reply-To: nla/banjo <reply@reply.github.com<mailto:reply@reply.github.com>>
Date: Wednesday, 19 November 2014 10:29 am
To: nla/banjo <banjo@noreply.github.com<mailto:banjo@noreply.github.com>>
Cc: Shuang Zhou <szhou@nla.gov.au<mailto:szhou@nla.gov.au>>
Subject: Re: [banjo] Dsc 287 (#836)


In web/WEB-INF/views/works/macros.ftl:

> @@ -2,11 +2,11 @@
>  <p></p>
>      [#if banjoUser.hasImageViewAccess(work) && (displaySensitive=="y"  || !(work.sensitiveMaterial?has_content) || work.sensitiveMaterial=="No") ]
>          [#if withLightbox]
> -            <a href="${(imageServerUrl!) + work.objId + '?wid=800'}" data-source="${(imageServerUrl!) + work.objId + '?wid=800'}" data-toggle="lightbox" data-title="${work.title!work.objId}" data-footer="">
> -              <img class="img-thumbnail" alt="${pi}" width="${width}" src="${(imageServerUrl!) + work.objId + '?wid=${width}'}" onerror="this.src = 'assets/images/sensitive.png';"  alt="${work.objId}"/>
> +            <a href="${(imageServerUrl!) + representationWork.objId + '?wid=800'}" data-source="${(imageServerUrl!) + representationWork.objId + '?wid=800'}" data-toggle="lightbox" data-title="${work.title!work.objId}" data-footer="">


Please read my general comment, but it would be better to have a route to call /image/work.objId/representative that would return the representative image. That gives better control than passing the id of the presentative image.

—
Reply to this email directly or view it on GitHub<https://github.com/nla/banjo/pull/836/files#r20547761>.