pulibrary / ares

ARES web source code and templates
0 stars 0 forks source link

View Item "Print" Item Link is Broken #12

Closed axamei closed 5 years ago

axamei commented 6 years ago

On the "View Item" page a link to the catalog is rendered. It seems to be expecting a bib ID which isn't in the data we have. We need to convert this link into a Call Number search using the call number values which are present in the data.

axamei commented 6 years ago

It is using <#ITEM field="ISXN">

<a href="https://catalog.princeton.edu/catalog/<#ITEM field="ISXN">" target="_blank">Click to see the availabilty of: <#ITEM field="Title"></a>

kevinreiss commented 6 years ago

I think if we go to:

<a href="https://catalog.princeton.edu/catalog?utf8=%E2%9C%93&search_field=all_fields&q=<#ITEM field="CallNumber">" target="_blank">Click to see the availabilty of: <#ITEM field="Title"></a> we'd get to where we want. If the test for empty actually works it might be good to do this:

If ISXN isn't empty do

<a href="https://catalog.princeton.edu/catalog?utf8=%E2%9C%93&search_field=all_fields&q=<#ITEM field="ISXN">" target="_blank">Click to see the availabilty of: <#ITEM field="Title"></a>

Else

<a href="https://catalog.princeton.edu/catalog?utf8=%E2%9C%93&search_field=all_fields&q=<#ITEM field="CallNumber">" target="_blank">Click to see the availabilty of: <#ITEM field="Title"></a>

axamei commented 6 years ago

Added to aresauth/testweb:

<#CONDITIONAL type="NotEmpty" test="<#ITEM field="ISXN">" true="<a href='https://catalog.princeton.edu/catalog?utf8=%E2%9C%93&search_field=all_fields&q=<#ITEM field='ISXN'>' target='_blank'>Click to see the availabilty of: <#ITEM field='Title'></a>" false="<a href='https://catalog.princeton.edu/catalog?utf8=%E2%9C%93&search_field=all_fields&q=<#ITEM field='CallNumber'>' target='_blank'>Click to see the availabilty of: <#ITEM field='Title'></a>">