LP#1507845: Improve search engine optimization
[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                 <tr>
13                     <td>
14                         <a class='classic_link lbl1' 
15                             href="[% mkurl('', {cnoffset => cnoffset - 1}) %]#cnbrowse">[% l("&lt;&lt; Previous Page") %]</a>
16                     </td>
17                     <td colspan='1' align='center'>[% l("Shelf Browser") %]</td>
18                     <td>
19                         <a class='classic_link lbl1' 
20                             href="[% mkurl('', {cnoffset => cnoffset + 1}) %]#cnbrowse">[% l("Next Page &gt;&gt;") %]</a>
21                     </td>
22                 </tr>
23             <tr class='browse_border'>
24                 <td colspan='3'>&nbsp;</td>
25             </tr>
26             <tbody>
27             [%- tr_open = 0;
28                 PROCESS get_library;
29                 FOR cn IN ctx.browsed_call_numbers;
30                   IF loop.index % 3 == 0; tr_open = 1 %]
31                 <tr class='cn_browse_row'>
32                 [% END -%]
33                     <td class='cn_browse_item' width='25%' valign='top'>
34                         [%  rec_attrs = {marc_xml => cn.record.marc};
35                             PROCESS get_marc_attrs args=rec_attrs; %]
36                         <a href="[% mkurl(ctx.opac_root _ '/record/' _ cn.record.id, {$loc_name => loc_value}, 1) %]"><img height='60' width='50' 
37                             class='cn_browse_info' name='cn_browse_pic' border='0' 
38                             [% img_alt(l('Go to record [_1]', rec_attrs.title)) %]
39                             src="[% ctx.media_prefix %]/opac/extras/ac/jacket/small/r/[% cn.record.id | 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 record_title'
43                                 href="[% mkurl(ctx.opac_root _ '/record/' _ cn.record.id, {$loc_name => loc_value}, 1) %]">[% rec_attrs.title | html %]</a>
44                         </div>
45                         [% IF rec_attrs.author %]<div class='cn_browse_info'>
46                             <a name='cn_browse_author' class='classic_link record_author'
47                                 href="[%-
48                                     authorquery = rec_attrs.author | replace('[,\.:;]', '');
49                                     mkurl(ctx.opac_root _ '/results', {qtype => 'author', query => authorquery, $loc_name => loc_value}, 1)
50                                     -%]">[% rec_attrs.author | html %]</a>
51                         </div>[% END %]
52                         <div class='cn_browse_info' name='cn_browse_lib'>[% cn.owning_lib.name | html %]</div>
53                     </td>
54                 [% IF loop.index % 3 == 2; tr_open = 0 %]
55                 </tr>
56                 [% END %]
57             [% END; IF tr_open %]</tr>[% END %]
58             </tbody>
59         </table>
60     </div>
61 </div>