]> git.evergreen-ils.org Git - working/Evergreen.git/blob - Open-ILS/web/templates/default/opac/parts/result/table.tt2
TTpac: added simple/detailed record view option to results page
[working/Evergreen.git] / Open-ILS / web / templates / default / opac / parts / result / table.tt2
1 [%  PROCESS "default/opac/parts/misc_util.tt2";
2
3     ctx.result_start = 1 + ctx.page_size * page;
4     ctx.result_stop = ctx.page_size * (page + 1);
5     IF ctx.result_stop > ctx.hit_count; ctx.result_stop = ctx.hit_count; END;
6
7     result_count = ctx.result_start;
8 %]
9 <div style="height: 10px;"></div>
10
11 [% PROCESS "default/opac/parts/result/paginate.tt2" %] 
12 [% ctx.results_count_header = PROCESS results_count_header;
13     ctx.results_count_header %]
14
15 <div id="result_table_div">
16     <table cellpadding="0" cellspacing="0" border="0" width="100%">
17         <tr>
18             <td valign="top" width="1" style="padding-right:20px;">
19                 <div style="width:174px;" class="hide_me" id="tehSideBar">SIDEBAR TODO
20                 </div>
21             </td>
22             <td class='opac-auto-015' width="1"></td>
23             <td valign="top">
24                 <table id="res_table" cellpadding="0" cellspacing="0"
25                     border="0" width="100%" style="margin-top:10px;">
26                     <tbody id="result_table">
27                     [%  FOR rec IN ctx.records;
28                             attrs = {marc_xml => rec.marc_xml};
29                             PROCESS get_marc_attrs args=attrs %]
30                         <tr>
31                             <td class='result_table_row' align='left' width='100%'>
32                                 <table cellpadding="0" cellspacing="0" class='result_table_subtable'>
33                                     <tbody class='result_table_subtbody'>
34                                         <tr name='counts_row'>
35                                             <td width="58" valign="top"
36                                                 style="font-weight:bold;padding-left:10px;"
37                                                 name="results_row_count">[%
38                                                     result_count; result_count = result_count + 1
39                                                 %].</td>
40                                             <td class='result_table_pic_header' align='center'
41                                                 width="78" nowrap="nowrap" valign="top">
42                                                 [% ident = attrs.isbn_clean || attrs.upc; IF ident; %]
43                                                 <a href="[% mkurl(ctx.opac_root _ '/record/' _ rec.id) %]"><img alt="[% l('Image of item') %]"
44                                                         name='item_jacket' class='result_table_pic' width="55"
45                                                         src='[% ctx.media_prefix %]/opac/extras/ac/jacket/small/[% ident %]' /></a><br />
46                                                 [% END %]
47                                             </td>
48                                             <td class='result_table_title_cell'
49                                                 name='result_table_title_cell'
50                                                 valign="top">
51                                                 <div class="bold">
52                                                     <a title="[% attrs.title %]" name='item_title'
53                                                         href="[% mkurl(ctx.opac_root _ '/record/' _ rec.id) %]"
54                                                         class='search_link'>[% attrs.title | html_entity%]</a>
55                                                 </div>
56                                                 <div style="font-size:11px;">
57                                                     <div>
58                                                         <em><a title="[% l("Perform an Author Search") %]"
59                                                                 name='item_author'
60                                                                 href="[%- 
61                                                                     authorquery = attrs.author | replace('[,\.:;]', '');
62                                                                     mkurl(ctx.opac_root _ '/results', {qtype => 'author', query => authorquery})
63                                                                     -%]">[% attrs.author | html_entity %]</a></em>
64                                                         &nbsp;&nbsp;
65                                                         [% attrs.pubdate %]
66                                                     </div>
67                                                     <table cellpadding="0" cellspacing="0" border="0"
68                                                         class="results_info_table">
69                                                         <tr name='bib_cn_list' class='result_table_title_cell'>
70                                                             <td valign='top'>
71                                                                 <strong>[% l('Call number:') %]</strong>
72                                                             </td>
73                                                             <td>[% args.holdings.0 %]</td>
74                                                         </tr>
75
76                                                         [% IF CGI.param('detail_record_view') %]
77                                                         <!-- These fields are visible when viewing the results page in 'detailed' mode -->
78                                                         <tr name="results_pub_tr" class="[% attrs.publisher ? '' : 'hide_me' %]">
79                                                             <td valign="top">
80                                                                 <strong>[% l('Publisher:') %]</strong>
81                                                             </td>
82                                                             <td>[% attrs.publisher; %]</td>
83                                                         </tr>
84                                                         <tr name="results_isbn_tr" class="[% attrs.isbns.0 ? '' : 'hide_me' %]">
85                                                             <td valign="top">
86                                                                 <strong>[% l('ISBN:') %]</strong>
87                                                             </td>
88                                                             <td>[% attrs.isbns.0 %]</td>
89                                                         </tr>
90                                                         <tr name="results_edition_tr" class="[% attrs.edition ? '' : 'hide_me' %]">
91                                                             <td valign="top">
92                                                                 <strong>[% l('Edition:') %]</strong>
93                                                             </td>
94                                                             <td>[% attrs.edition %]</td>
95                                                         </tr>
96                                                         <tr name="results_phys_desc_tr" class="[% attrs.phys_desc ? '' : 'hide_me' %]">
97                                                             <td nowrap="nowrap" valign="top">
98                                                                 <strong>[% l('Phys. Desc.:') %]</strong>
99                                                             </td>
100                                                             <td>
101                                                                 [% args.phys_desc %]
102                                                             </td>
103                                                         </tr>
104                                                         [% END %]
105
106                                                     </table>
107                                                     <div>
108                                                         [% l('[_1] of [quant,_2,copy,copies] available',
109                                                             attrs.copy_counts.available, attrs.copy_counts.count) # XXX s/count/nshadow/ ?
110                                                             #rec.copy_counts.available, rec.copy_counts.visible) 
111                                                         %]
112                                                     </div>
113                                                 </div>
114                                                 <div class="hide_me">
115                                                     <span name='result_table_extra_span' class='hide_me'>
116                                                         <span name='result_table_pub_box'
117                                                             style='padding-left: 10px;'>
118                                                             <span name='result_table_edition_span'
119                                                                 style='padding-left: 10px;'></span> |
120                                                             <span name='result_table_pub_span'> </span> |
121                                                             <span name='result_table_phys_span'> </span>
122                                                         </span>
123                                                     </span>
124                                                 </div>
125                                             </td>
126
127                                             <td name='result_table_format_cell' class='result_table_format_cell' width="1">
128
129                                                 [% IF attrs.format_icon %]
130                                                 <img title="[% attrs.format_label %]" alt="[% attrs.format_label %]" src="[% attrs.format_icon %]" />
131                                                 [% END %]
132
133                                                 <!-- unAPI link -->
134                                                 <abbr class="unapi-id" title='tag:[% ctx.hostname %],[% date.format(date.now, '%Y') %]:biblio-record_entry/[% rec.id %]'></abbr>
135
136                                                 <!-- Empty span used for creating Google Book Search-->
137                                                 <span name="googleBooksLink" class="hide_me">
138                                                     <a style='padding-left: 8px;'
139                                                         class='classic_link hide_me'
140                                                         name="googleBooks-link">[% l("Browse in Google Books Search") %]</a>
141                                                 </span>
142
143                                             </td>
144                                             <td nowrap='nowrap' width="1" align="right">
145                                                 <div style="width:250px;text-align:left;">
146                                                     <div style="float:right;">
147                                                         <div class="results_aux_utils opac-auto-010"><a
148                                                                 href="[% mkurl(ctx.opac_root _ '/place_hold', {hold_target => rec.id, hold_type => 'T'}) %]" 
149                                                                     name="place_hold_link" class="no-dec"><img
150                                                                 src="[% ctx.media_prefix %]/images/green_check.png"
151                                                                 alt="[% l('Place hold') %]"/><span style="position:relative;top:-3px;left:3px;">[% l('Place Hold') %]</span></a>
152                                                         </div>
153                                                         <div class="results_aux_utils opac-auto-011">
154                                                             [%  operation = ctx.mylist.grep(rec.id).size ? "delete" : "add";
155                                                                 label = (operation == "add") ? l("Add to") : l("Remove from"); %]
156                                                             <form action="[% ctx.opac_root %]/mylist/[% operation %]" method="POST">
157                                                                 <input type="hidden" name="record" value="[% rec.id %]" />
158                                                             <div style="position:absolute;">
159                                                                 <div style="position:relative;top:5px; left: 25px;">
160                                                                     <input type="submit" title="[% '[_1] my list' | l(label) %]" 
161                                                                         value="[% '[_1] my list' | l(label) %]" class="subtle-button" />
162                                                                 </div>
163                                                             </div>
164                                                                 <input type="image"
165                                                                 alt="[% '[_1] my list' | l(label) %]"
166                                                                 src="[% ctx.media_prefix %]/images/clipboard.png" />
167                                                             </form>
168                                                         </div>
169                                                     </div>
170                                                 </div>
171                                             </td>
172                                         </tr>
173                                         <tr>
174                                             <td/>
175                                             <td align='center'> <!-- Chilifresh reviews link --> 
176                                                 <div class="chili_review" id="isbn_[% attrs.isbn_clean %]"> </div>
177                                             </td>
178                                         </tr>
179                                         <tr>
180                                             <td/>
181                                             <td colspan='5'> <!-- Chilifresh reviews panel -->
182                                                 <div id="chili_review_[% attrs.isbn_clean %]" style="display: none;" align="center" width="100%"></div>
183                                             </td>
184                                         </tr>
185                                         <tr><td colspan="5"><div style="height:0px;border-top:1px solid #b7b7b7;border-bottom:1px solid #d4d4d4;margin:15px 0px;"></div></td></tr>
186                                     </tbody>
187                                 </table>
188                             </td>
189                         </tr>
190                     [% END %]
191                     </tbody>
192                 </table>
193             </td>
194         </tr>
195     </table>
196 </div>
197 <div>
198     [% ctx.results_count_header %]
199 </div>