]> git.evergreen-ils.org Git - working/Evergreen.git/blob - Open-ILS/src/templates/default/opac/parts/record/cnbrowse.tt2
Merge branch 'master' of git.evergreen-ils.org:Evergreen into template-toolkit-opac...
[working/Evergreen.git] / Open-ILS / src / templates / default / opac / parts / record / cnbrowse.tt2
1 [% cnoffset = CGI.param('cnoffset') || 0; %]
2
3 <div id='cn_browse' class='cn_browser'>
4     <div id='cn_browse_div'> 
5         <div class='color_4'>
6             <span>[% l("You are now browsing") %]</span>
7             <strong>[% ctx.browsing_ou.name %]</strong>
8         </div>
9         <table class='data_grid bookshelf' width='100%'>
10             <thead>
11                 <tr>
12                     <td>
13                         <a id='cn_browse_prev' class='classic_link' 
14                             href="[% mkurl('', {cnoffset => cnoffset - 1}) %]#cnbrowse"><b>[% l("&lt;&lt; Previous Page") %]</b></a>
15                     </td>
16                     <td colspan='1' align='center'>[% l("Shelf Browser") %]</td>
17                     <td>
18                         <a id='cn_browse_next' class='classic_link' 
19                             href="[% mkurl('', {cnoffset => cnoffset + 1}) %]#cnbrowse"><b>[% l("Next Page &gt;&gt;") %]</b></a>
20                     </td>
21                 </tr>
22             </thead>
23             <tbody id='cn_tbody'>
24             [% tr_open = 0; FOR cn IN ctx.browsed_call_numbers %]
25                 [%- IF loop.index % 3 == 0; tr_open = 1 %]
26                 <tr class='cn_browse_row'>
27                 [% END -%]
28                     <td class='cn_browse_item' width='25%' valign='top'>
29                         [%  rec_attrs = {marc_xml => cn.record.marc};
30                             PROCESS get_marc_attrs args=rec_attrs;
31                             ident = rec_attrs.isbn_clean || rec_attrs.upc;
32                             IF ident %]
33                         <a href="[% mkurl(ctx.opac_root _ '/record/' _ cn.record.id, {}, 1) %]"><img height='60' width='50' 
34                             class='cn_browse_info' name='cn_browse_pic' border='0'
35                             src="[% ctx.media_prefix %]/opac/extras/ac/jacket/small/[% ident %]" /></a>
36                         [% END %]
37                         <div class='cn_browse_info bold' name='cn_browse_cn'>[% cn.label %]</div>
38                         <div class='cn_browse_info'>
39                             <a name='cn_browse_title' class='classic_link' 
40                                 href="[% mkurl(ctx.opac_root _ '/record/' _ cn.record.id, {}, 1) %]">[% rec_attrs.title %]</a>
41                         </div>
42                         [% IF rec_attrs.author %]<div class='cn_browse_info'>
43                             <a name='cn_browse_author' class='classic_link'
44                                 href="[%-
45                                     authorquery = rec_attrs.author | replace('[,\.:;]', '');
46                                     mkurl(ctx.opac_root _ '/results', {qtype => 'author', query => authorquery}, 1)
47                                     -%]">[% rec_attrs.author | html_entity %]</a>
48                         </div>[% END %]
49                         <div class='cn_browse_info' name='cn_browse_lib'>[% cn.owning_lib.name %]</div>
50                     </td>
51                 [% IF loop.index % 3 == 2; tr_open = 0 %]
52                 </tr>
53                 [% END %]
54             [% END; IF tr_open %]</tr>[% END %]
55             </tbody>
56         </table>
57     </div>
58 </div>