<div class='rdetail_extras_div'>
[%
-base_expando = ctx.full_path _ "?expand=issues";
FOREACH type IN ctx.holding_summaries.keys;
NEXT UNLESS ctx.holding_summaries.$type.size;
- expanded = CGI.param('expand_holding_type') == type; %]
+ expanded = CGI.param('expand_holding_type') == type;
+ expander_params = {expand => 'issues', holding_limit => holding_limit};
+ IF expanded;
+ expander_omit = ['expand_holding_type'];
+ ELSE;
+ expander_omit = [];
+ expander_params.expand_holding_type = type;
+ END;
+ expander_url = mkurl('', expander_params, expander_omit); %]
<div class="rdetail-issue-type">
- <a href="[% base_expando; expanded ? '' : '&expand_holding_type=' _ type; %]#issues">[[% expanded ? '-' : '+' %]]</a>
+ <a href="[% expander_url %]#issues">[[% expanded ? '-' : '+' %]]</a>
[% ctx.holding_summaries.$type.join(", ") %]
[% IF expanded %]
<table>
</tr>
[% END %]
</table>
+ <div>
+ [% IF CGI.param("holding_offset");
+ prev_offset = CGI.param("holding_offset") - holding_limit;
+ IF prev_offset < 0; prev_offset = 0; END %]
+ <a class="holding-paging" href="[% mkurl('', {'holding_offset' => prev_offset, 'holding_limit' => holding_limit}) %]">
+ [% l("More recent holdings") %]</a>
+ [% END %]
+ [% IF ctx.expanded_holdings.size == holding_limit;
+ next_offset = (CGI.param("holding_offset") || 0) + holding_limit %]
+ <a class="holding-paging" href="[% mkurl('', {'holding_offset' => next_offset, 'holding_limit' => holding_limit}) %]">
+ [% l("Earlier holdings") %]</a>
+ [% END %]
+ </div>
[% END %]
</div>
[% END %]