2 cnoffset = CGI.param('cnoffset');
3 cnoffset = cnoffset.match('^\d+$') ? cnoffset : 0; # verify cnoffset is a sane value
6 <div id='cn_browse' class='cn_browser'>
7 <div id='cn_browse_div'>
9 <span>[% l("You are now browsing") %]</span>
10 <strong>[% ctx.browsing_ou.name | html %]</strong>
12 <table class='data_grid bookshelf' width='100%'>
16 <a class='classic_link'
17 href="[% mkurl('', {cnoffset => cnoffset - 1}) %]#cnbrowse"><b>[% l("<< Previous Page") %]</b></a>
19 <td colspan='1' align='center'>[% l("Shelf Browser") %]</td>
21 <a class='classic_link'
22 href="[% mkurl('', {cnoffset => cnoffset + 1}) %]#cnbrowse"><b>[% l("Next Page >>") %]</b></a>
27 [% tr_open = 0; FOR cn IN ctx.browsed_call_numbers %]
28 [%- IF loop.index % 3 == 0; tr_open = 1 %]
29 <tr class='cn_browse_row'>
31 <td class='cn_browse_item' width='25%' valign='top'>
32 [% rec_attrs = {marc_xml => cn.record.marc};
33 PROCESS get_marc_attrs args=rec_attrs;
34 ident = rec_attrs.isbn_clean || rec_attrs.upc;
36 <a href="[% mkurl(ctx.opac_root _ '/record/' _ cn.record.id, {}, 1) %]"><img height='60' width='50'
37 class='cn_browse_info' name='cn_browse_pic' border='0'
38 src="[% ctx.media_prefix %]/opac/extras/ac/jacket/small/[% ident | uri %]" /></a>
40 <div class='cn_browse_info bold' name='cn_browse_cn'>[% cn.label | html %]</div>
41 <div class='cn_browse_info'>
42 <a name='cn_browse_title' class='classic_link'
43 href="[% mkurl(ctx.opac_root _ '/record/' _ cn.record.id, {}, 1) %]">[% rec_attrs.title | html %]</a>
45 [% IF rec_attrs.author %]<div class='cn_browse_info'>
46 <a name='cn_browse_author' class='classic_link'
48 authorquery = rec_attrs.author | replace('[,\.:;]', '');
49 mkurl(ctx.opac_root _ '/results', {qtype => 'author', query => authorquery}, 1)
50 -%]">[% rec_attrs.author | html %]</a>
52 <div class='cn_browse_info' name='cn_browse_lib'>[% cn.owning_lib.name | html %]</div>
54 [% IF loop.index % 3 == 2; tr_open = 0 %]
57 [% END; IF tr_open %]</tr>[% END %]