LP#1268636 alt tags and cleanup continued
[working/Evergreen.git] / Open-ILS / src / templates / opac / parts / record / cnbrowse.tt2
1 [% 
2     cnoffset = CGI.param('cnoffset');
3     cnoffset = cnoffset.match('^-?\d+$') ? cnoffset : 0; # verify cnoffset is a sane value
4 %]
5
6 <div id='cn_browse' class='cn_browser'>
7     <div id='cn_browse_div'> 
8         <p class='color_4'>
9             [% l("You are now browsing [_1]", ctx.browsing_ou.name) | html %]
10         </p>
11         <table class='data_grid bookshelf' width='100%'>
12             <thead>
13                 <tr>
14                     <td>
15                         <a class='classic_link lbl1' 
16                             href="[% mkurl('', {cnoffset => cnoffset - 1}) %]#cnbrowse">[% l("&lt;&lt; Previous Page") %]</a>
17                     </td>
18                     <td colspan='1' align='center'>[% l("Shelf Browser") %]</td>
19                     <td>
20                         <a class='classic_link lbl1' 
21                             href="[% mkurl('', {cnoffset => cnoffset + 1}) %]#cnbrowse">[% l("Next Page &gt;&gt;") %]</a>
22                     </td>
23                 </tr>
24             </thead>
25             <tbody>
26             [%- tr_open = 0;
27                 PROCESS get_library;
28                 FOR cn IN ctx.browsed_call_numbers;
29                   IF loop.index % 3 == 0; tr_open = 1 %]
30                 <tr class='cn_browse_row'>
31                 [% END -%]
32                     <td class='cn_browse_item' width='25%' valign='top'>
33                         [%  rec_attrs = {marc_xml => cn.record.marc};
34                             PROCESS get_marc_attrs args=rec_attrs; %]
35                         <a href="[% mkurl(ctx.opac_root _ '/record/' _ cn.record.id, {$loc_name => loc_value}, 1) %]"><img height='60' width='50' 
36                             class='cn_browse_info' name='cn_browse_pic' border='0' 
37                             [% img_alt(l('Go to record [_1]', rec_attrs.title)) %]
38                             src="[% ctx.media_prefix %]/opac/extras/ac/jacket/small/r/[% cn.record.id | uri %]" /></a>
39                         <div class='cn_browse_info bold' name='cn_browse_cn'>[% cn.label | html %]</div>
40                         <div class='cn_browse_info'>
41                             <a name='cn_browse_title' class='classic_link record_title'
42                                 href="[% mkurl(ctx.opac_root _ '/record/' _ cn.record.id, {$loc_name => loc_value}, 1) %]">[% rec_attrs.title | html %]</a>
43                         </div>
44                         [% IF rec_attrs.author %]<div class='cn_browse_info'>
45                             <a name='cn_browse_author' class='classic_link record_author'
46                                 href="[%-
47                                     authorquery = rec_attrs.author | replace('[,\.:;]', '');
48                                     mkurl(ctx.opac_root _ '/results', {qtype => 'author', query => authorquery, $loc_name => loc_value}, 1)
49                                     -%]">[% rec_attrs.author | html %]</a>
50                         </div>[% END %]
51                         <div class='cn_browse_info' name='cn_browse_lib'>[% cn.owning_lib.name | html %]</div>
52                     </td>
53                 [% IF loop.index % 3 == 2; tr_open = 0 %]
54                 </tr>
55                 [% END %]
56             [% END; IF tr_open %]</tr>[% END %]
57             </tbody>
58         </table>
59     </div>
60 </div>