As noted in LP1116258, if there is no circ history for a patron, but they
click on the Download CSV button, it leads them to unhappy server errors.
So, hide the Download CSV button unless the number of circs > 0.
Signed-off-by: Ben Shum <bshum@biblio.org>
Signed-off-by: Pasi Kallinen <pasi.kallinen@pttk.fi>
<form action="[% mkurl(ctx.opac_root _ '/myopac/circ_history/export') %]" method="post">
<div>
[%- INCLUDE "opac/parts/preserve_params.tt2" %]
+ [% IF ctx.circs.size > 0 %]
<input type="hidden" name="filename" value="[% l('circ_history.csv') %]"/>
<button type="submit">[% l('Download CSV') %]</button>
+ [% END %]
</div>
</form>
</span>