]> git.evergreen-ils.org Git - Evergreen.git/blob - Open-ILS/web/templates/default/opac/parts/result/table.tt2
Merge branch 'master' of git+ssh://yeti.esilibrary.com/home/evergreen/evergreen-equin...
[Evergreen.git] / Open-ILS / web / templates / default / opac / parts / result / table.tt2
1 [%  PROCESS "default/opac/parts/marc_misc.tt2";
2
3     np_link = '?' _ query_string;
4
5     ctx.result_start = 1 + ctx.page_size * page;
6     ctx.result_stop = 1 + ctx.page_size * (page + 1);
7     IF ctx.result_stop > ctx.hit_count; ctx.result_stop = ctx.hit_count; END;
8
9     result_count = ctx.result_start;
10 %]
11 <div style="height: 10px;"></div>
12 [% BLOCK results_count_header %]
13 <div class="results_header_nav1">
14     <table cellpadding="0" cellspacing="0" border="0" width="100%">
15         <tr>
16             <td class="h1" width="116">[% l('Search Results') %]</td>
17             <td valign="bottom" nowrap="nowrap" class="result_number">
18                 [% |l(ctx.result_start, ctx.result_stop, ctx.hit_count) %]
19                 Results <strong>[_1]</strong> - <strong>[_2]</strong> of <strong>[_3]</strong>
20                 [% END %]
21                 <span style='padding-left: 6px;'>
22                     [% |l(page + 1, page_count) %](page <strong>[_1]</strong> of <strong>[_2]</strong>)[% END %]
23                 </span>
24             </td>
25             <td align="right" valign="bottom">
26                 <span class='start_end_links_span'>
27                     [% IF page > 0 %]
28                     <a class='search_page_nav_link'
29                         href="[% np_link _ '&page=' _ (page - 1) %]"
30                         title='[% l("Previous page") %]'>
31                         <span class="nav_arrow_fix">&#9668;</span> Previous
32                     </a>
33                     [% END %]
34                     <span class='hide_me'
35                         style='padding-left: 11px; padding-right:11px;'>
36                         <span></span>
37                     </span>
38                     [% IF (page + 1) < page_count %]
39                     <a class='search_page_nav_link'
40                         href="[% np_link _ '&page=' _ (page + 1) %]"
41                         title='[% l("Next page") %]'>
42                         Next <span class="nav_arrow_fix">&#9658;</span>
43                     </a>
44                     [% END %]
45                 </span>
46             </td>
47         </tr>
48     </table>
49 </div>
50 [% END %]
51 [% ctx.results_count_header = PROCESS results_count_header;
52     ctx.results_count_header %]
53 <div id="result_table_div">
54     <table cellpadding="0" cellspacing="0" border="0" width="100%">
55         <tr>
56             <td valign="top" width="1" style="padding-right:20px;">
57                 <div style="width:174px;" class="hide_me" id="tehSideBar">SIDEBAR TODO
58                 </div>
59             </td>
60             <td class='opac-auto-015' width="1"></td>
61             <td valign="top">
62                 <table id="res_table" cellpadding="0" cellspacing="0"
63                     border="0" width="100%" style="margin-top:10px;">
64                     <tbody id="result_table">
65                     [%  FOR rec IN ctx.records;
66                             attrs = {marc_xml => rec.marc_xml};
67                             PROCESS get_marc_attrs args=attrs %]
68                         <tr>
69                             <td class='result_table_row' align='left' width='100%'>
70                                 <table cellpadding="0" cellspacing="0" class='result_table_subtable'>
71                                     <tbody class='result_table_subtbody'>
72                                         <tr name='counts_row'>
73                                             <td width="58" valign="top"
74                                                 style="font-weight:bold;padding-left:10px;"
75                                                 name="results_row_count">[%
76                                                     result_count; result_count = result_count + 1
77                                                 %].</td>
78                                             <td class='result_table_pic_header'
79                                                 width="78" nowrap="nowrap" valign="top">
80                                                 [% ident = attrs.isbn_clean || attrs.upc; IF ident; %]
81                                                 <a href="[% ctx.opac_root %]/record/[% rec.bre.id %]"><img alt="Image of item"
82                                                         name='item_jacket' class='result_table_pic' width="55"
83                                                         src='[% ctx.media_prefix %]/opac/extras/ac/jacket/small/[% ident %]' /></a><br />
84                                                 [% END %]
85                                             </td>
86                                             <td class='result_table_title_cell'
87                                                 name='result_table_title_cell'
88                                                 valign="top">
89                                                 <div class="bold">
90                                                     <a title="[% attrs.title %]" name='item_title'
91                                                         href="[% ctx.opac_root %]/record/[% rec.bre.id %]"
92                                                         class='search_link'>[% attrs.title %]</a>
93                                                 </div>
94                                                 <span style="font-size:11px;">
95                                                     <div>
96                                                         <em>
97                                                             <a title="[% l("Perform an Author Search") %]"
98                                                                 name='item_author'
99                                                                 href="[% ctx.opac_root %]/results?query=author%3a[% attrs.author | replace('[,\.:;]', '') | uri %]&loc=[% loc %]"
100                                                                 class='search_link'>[% attrs.author %]</a>
101                                                         </em> &nbsp;&nbsp;
102                                                         [% attrs.pubdate %]
103                                                     </div>
104                                                     <table cellpadding="0" cellspacing="0" border="0"
105                                                         class="results_info_table">
106                                                         <tr name='bib_cn_list' class='result_table_title_cell'>
107                                                             <td colspan='2'>
108                                                                 <strong>Call number:</strong>
109                                                                 [% args.kcls_cn %]
110                                                             </td>
111                                                         </tr>
112                                                         <tr name="results_pub_tr" class="[% attrs.publisher ? '' : 'hide_me' %]">
113                                                             <td valign="top">
114                                                                 <strong>Publisher:</strong>
115                                                             </td>
116                                                             <td>[% attrs.publisher; %]</td>
117                                                         </tr>
118                                                         <tr name="results_isbn_tr" class="[% attrs.isbn ? '' : 'hide_me' %]">
119                                                             <td valign="top">
120                                                                 <strong>ISBN:</strong>
121                                                             </td>
122                                                             <td>[% attrs.isbn %]</td>
123                                                         </tr>
124                                                         <tr name="results_edition_tr" class="[% attrs.edition ? '' : 'hide_me' %]">
125                                                             <td valign="top">
126                                                                 <strong>Edition:</strong>
127                                                             </td>
128                                                             <td>[% attrs.edition %]</td>
129                                                         </tr>
130                                                         <tr name="results_phys_desc_tr" class="[% attrs.phys_desc ? '' : 'hide_me' %]">
131                                                             <td nowrap="nowrap" valign="top">
132                                                                 <strong>Phys. Desc.:</strong>
133                                                             </td>
134                                                             <td>
135                                                                 [% args.phys_desc %]
136                                                             </td>
137                                                         </tr>
138                                                     </table>
139                                                     <div>
140                                                         [% l('[_1] of [quant,_2,copy,copies] available',
141                                                             rec.copy_counts.available, rec.copy_counts.visible) %]
142                                                     </div>
143                                                 </span>
144                                                 <div class="hide_me">
145                                                     <span name='result_table_extra_span' class='hide_me'>
146                                                         <span name='result_table_pub_box'
147                                                             style='padding-left: 10px;'>
148                                                             <span name='result_table_edition_span'
149                                                                 style='padding-left: 10px;'></span> |
150                                                             <span name='result_table_pub_span'> </span> |
151                                                             <span name='result_table_phys_span'> </span>
152                                                         </span>
153                                                     </span>
154                                                 </div>
155                                             </td>
156                                             <!-- Copy this td for each copy count appended -->
157                                             <td nowrap='nowrap' name="copy_count_cell"
158                                                 class='copy_count_cell hide_me' width="1"> </td>
159                                             <td name='result_table_format_cell'
160                                                 class='result_table_format_cell' align="center" width="1"
161                                                 style="padding:0px 10px;">
162                                                 <img alt="Format" src="" class="hide_me" name="" />
163                                                 <span class='hide_me opac-auto-031'>
164                                                     <span>[% l("Match Score: ") %] </span>
165                                                     <span name='relevancy_span'> </span>
166                                                 </span>
167                                                 <!-- Empty span used for creating unAPI links -->
168                                                 <span class="hide_me">
169                                                     <abbr style='padding-left: 8px;' name="unapi" class="unapi-id">
170                                                     <!-- unAPI URI goes here -->
171                                                     </abbr>
172                                                 </span>
173                                                 <!-- Empty span used for creating Google Book Search-->
174                                                 <span name="googleBooksLink" class="hide_me">
175                                                     <a style='padding-left: 8px;'
176                                                         class='classic_link hide_me'
177                                                         name="googleBooks-link">[% l("Browse in Google Books Search") %]</a>
178                                                 </span>
179                                             </td>
180                                             <td nowrap='nowrap' width="1" align="right">
181                                                 <div style="width:250px;text-align:left;">
182                                                     <div style="float:right;">
183                                                         <div class="results_aux_utils opac-auto-010"><a
184                                                                 href="[% ctx.opac_root %]/place_hold?hold_target=[% rec.bre.id %]&hold_type=T" name="place_hold_link"><img
185                                                                 src="[% ctx.media_prefix %]/images/green_check.png"
186                                                                 alt="place hold" /><span
187                                                                     style="position:relative;top:-3px;left:3px;">Place Hold</span></a>
188                                                         </div>
189                                                         <div class="results_aux_utils opac-auto-011">
190                                                             <div style="position:absolute;">
191                                                                 <div style="position:relative;top:5px; left: 25px;">
192                                                                     <a title="Add to my list"
193                                                                         name="result_my_list_link"
194                                                                         href="javascript:;">Add to my list</a>
195                                                                 </div>
196                                                             </div>
197                                                             <a href="javascript:;"
198                                                                 name="result_my_list_link_img"><img
199                                                                 alt="add to my list"
200                                                                 src="[% ctx.media_prefix %]/images/clipboard.png" /></a>
201                                                         </div>
202                                                         <div style="padding-top:7px;" class="results_aux_utils">
203                                                             <a title="Reviews and More" target="_blank"
204                                                                 name="reviews_and_more" href="javascript:;"><img
205                                                                 alt="reviews &amp; more"
206                                                                 src="[% ctx.media_prefix %]/images/starz.png" /> <span
207                                                                     style="position:relative;top:-5px;">Reviews &amp; More</span></a>
208                                                         </div>
209                                                     </div>
210                                                     <div style="float:right;margin-right:17px;">
211                                                     [%  key = attrs.mattype;
212                                                         format_desc = ctx.find_citm(key).value;
213                                                         icon_filename = icon_by_mattype.$key;
214                                                         IF icon_filename; %]
215                                                         <img alt="[% format_desc %]" title="[% format_desc %]"
216                                                             src="[% ctx.media_prefix _ '/images/' _ icon_filename %]" />
217                                                     [% END %]
218                                                     </div>
219                                                 </div>
220                                             </td>
221                                         </tr>
222                                         <!-- Placeholder for ChiliFresh Review -->
223                                         <tr class="hide_me" name="chilifreshReview">
224                                             <td></td>
225                                             <td valign="top" colspan="5">
226                                                 <div style="position:relative;left:-19px;">
227                                                     <span name="chilifreshReviewLink" class="chili_review"></span>
228                                                     <div name="chilifreshReviewResult" style="display:none"></div>
229                                                 </div>
230                                             </td>
231                                         </tr>
232                                         <tr>
233                                             <td colspan="5">
234                                                 <div style="height:0px;border-top:1px solid #b7b7b7;border-bottom:1px solid #d4d4d4;margin:15px 0px;"></div>
235                                                 <!-- <hr class='opac-auto-013' color="#FFCC33" /> -->
236                                             </td>
237                                         </tr>
238                                     </tbody>
239                                 </table>
240                             </td>
241                         </tr>
242                     [% END %]
243                     </tbody>
244                 </table>
245             </td>
246         </tr>
247     </table>
248 </div>
249 <div>
250     [% ctx.results_count_header %]
251     <!-- ChiliFresh XXX script TODO -->
252 </div>