]> git.evergreen-ils.org Git - Evergreen.git/blob - Open-ILS/src/templates/opac/parts/result/table.tt2
TPAC: Remove more explicit widths from results page
[Evergreen.git] / Open-ILS / src / templates / opac / parts / result / table.tt2
1 [%  PROCESS "opac/parts/misc_util.tt2";
2
3     USE ResolverResolver;
4
5     ctx.result_start = 1 + ctx.page_size * page;
6     ctx.result_stop = 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
12 <div style="height: 10px;"></div>
13
14 [% PROCESS "opac/parts/result/paginate.tt2" %] 
15 [% ctx.results_count_header = PROCESS results_count_header;
16     ctx.results_count_header %]
17
18 <div id="result_table_div">
19     <table cellpadding="0" cellspacing="0" border="0" width="100%">
20         <tr>
21             <td valign="top" width="1">
22                 [% INCLUDE "opac/parts/staff_saved_searches.tt2" %]
23                 [% INCLUDE 'opac/parts/result/facets.tt2' %]
24             </td>
25             <td class="facet_border" width="1"></td>
26             <td valign="top">
27                 <table cellpadding="0" cellspacing="0"
28                     border="0" width="100%" style="margin-top:10px;">
29                     <tbody id="result_table">
30                     [%  FOR rec IN ctx.records;
31                             attrs = {marc_xml => rec.marc_xml};
32                             PROCESS get_marc_attrs args=attrs %]
33                         <tr>
34                             <td class='result_table_row' align='left' width='100%'>
35                                 <table cellpadding="0" cellspacing="0" class='result_table_subtable'>
36                                     <tbody class='result_table_subtbody'>
37                                         <tr name='counts_row'>
38                                             <td valign="top" class="results_row_count"
39                                                 name="results_row_count">[%
40                                                     result_count; result_count = result_count + 1
41                                                 %].</td>
42                                             <td class='result_table_pic_header' align='center'
43                                                 width="78" nowrap="nowrap" valign="top">
44                                                 [% ident = attrs.isbn_clean || attrs.upc; IF ident; %]
45                                                 <a href="[% mkurl(ctx.opac_root _ '/record/' _ rec.id) %]"><img alt="[% l('Image of item') %]"
46                                                         name='item_jacket' class='result_table_pic' width="55"
47                                                         src='[% ctx.media_prefix %]/opac/extras/ac/jacket/small/[% ident | uri %]' /></a><br />
48                                                 [% END %]
49                                             </td>
50                                             <td class='result_table_title_cell'
51                                                 name='result_table_title_cell'
52                                                 valign="top">
53                                                 <div class="bold">
54                                                     <a name='record_[% rec.id %]' title="[% attrs.title | uri %]" name='item_title'
55                                                         href="[% mkurl(ctx.opac_root _ '/record/' _ rec.id) %]"
56                                                         class='search_link'>[% attrs.title | html %]</a>
57                                                 </div>
58                                                 <div style="font-size:11px;">
59                                                     <div>
60                                                         <em><a title="[% l("Perform an Author Search") %]"
61                                                                 name='item_author'
62                                                                 href="[%- 
63                                                                     authorquery = attrs.author | replace('[,\.:;]', '');
64                                                                     mkurl(ctx.opac_root _ '/results', {qtype => 'author', query => authorquery}, ['page'])
65                                                                     -%]">[% attrs.author | html %]</a></em>
66                                                         &nbsp;&nbsp;
67                                                         [% attrs.pubdate | html %]
68                                                     </div>
69                                                     <table cellpadding="0" cellspacing="0" border="0"
70                                                         class="results_info_table">
71                                                         [% IF args.holdings.size > 0 %]
72                                                         <tr name='bib_cn_list' class='result_table_title_cell'>
73                                                             <td valign='top'>
74                                                                 <strong>[% l('Call number:') %]</strong>
75                                                             </td>
76                                                             <td>[% args.holdings.0.label | html %]</td>
77                                                         </tr>
78                                                         [% END %]
79
80                                                         [% IF CGI.param('detail_record_view') %]
81                                                         <!-- These fields are visible when viewing the results page in 'detailed' mode -->
82
83                                                         [% IF attrs.publisher %]
84                                                             <tr name="results_pub_tr">
85                                                                 <td valign="top">
86                                                                     <strong>[% l('Publisher:') %]</strong>
87                                                                 </td>
88                                                                 <td>[% attrs.publisher | html %]</td>
89                                                             </tr>
90                                                         [% END %]
91                                                         [% IF attrs.isbns.size > 0 %]
92                                                             <tr name="results_isbn_tr">
93                                                                 <td valign="top">
94                                                                     <strong>[% l('ISBN:') %]</strong>
95                                                                 </td>
96                                                                 <td>[% attrs.isbns.0 | html %]</td>
97                                                             </tr>
98                                                         [% END %]
99                                                         [%- IF openurl.enabled == 'true';
100                                                             FOR issn IN args.issns;
101                                                                 sfx = ResolverResolver.resolve_issn(issn, openurl.baseurl);
102                                                                 FOR res IN sfx;
103                                                         %]
104                                                         <tr name="results_issn_tr">
105                                                             <td valign="top">
106                                                                 <strong><a href="[% res.target_url %]">
107                                                                 [% res.public_name | html %]</a></strong>
108                                                             </td>
109                                                             <td>[% res.target_coverage | html %]</td>
110                                                         </tr>
111                                                                 [% END %]
112                                                             [% END %]
113                                                         [% END %]
114
115                                                         [% IF attrs.edition %]
116                                                             <tr name="results_edition_tr">
117                                                                 <td valign="top">
118                                                                     <strong>[% l('Edition:') %]</strong>
119                                                                 </td>
120                                                                 <td>[% attrs.edition | html %]</td>
121                                                             </tr>
122                                                         [% END %]
123                                                         [% IF attrs.phys_desc %]
124                                                             <tr name="results_phys_desc_tr">
125                                                                 <td nowrap="nowrap" valign="top">
126                                                                     <strong>[% l('Phys. Desc.:') %]</strong>
127                                                                 </td>
128                                                                 <td>
129                                                                     [% args.phys_desc | html %]
130                                                                 </td>
131                                                             </tr>
132                                                         [% END %]
133                                                         [% FOR uri IN args.uris %]
134                                                             <tr name='bib_uri_list' class='result_table_title_cell'>
135                                                                 <td valign='top'>
136                                                                     <strong>[% l('Electronic resource') %]</strong>
137                                                                 </td>
138                                                                 <td><a href="[% uri.href %]">[% uri.link | html %]</a>[% ' - ' _ uri.note | html IF uri.note %]</td>
139                                                             </tr>
140                                                             [% END %]
141                                                             [% IF args.holdings.size > 0 %]
142                                                             <tr name='bib_cn_list' class='result_table_title_cell'>
143                                                                 <td colspan='2'>
144                                                                     <table class='result_holdings_table'>
145                                                                         <thead><tr>
146                                                                             <th>[% l('Library') %]</th>
147                                                                             <th>[% l('Shelving location') %]</th>
148                                                                             <th>[% l('Call number') %]</th>
149                                                                             <th>[% l('Status') %]</th>
150                                                                         </tr></thead>
151                                                                         <tbody>
152                                                                 [% FOR copy IN args.holdings %]
153                                                                         <tr>
154                                                                             <td>[% copy.library | html %]</td>
155                                                                             <td>[% copy.location | html %]</td>
156                                                                             <td>[% copy.label | html %]</td>
157                                                                             <td>[% copy.status | html %]</td>
158                                                                         </tr>
159                                                                 [% END %]
160                                                                         </tbody>
161                                                                     </table>
162                                                                 </td>
163                                                             </tr>
164                                                         [% END %]
165                                                         [% END %] <!-- END detail_record_view -->
166                                                     </table>
167                                                     <div>
168                                                         [% l('[_1] of [quant,_2,copy,copies] available',
169                                                             attrs.copy_counts.available, attrs.copy_counts.count) # XXX s/count/nshadow/ ?
170                                                             #rec.copy_counts.available, rec.copy_counts.visible) 
171                                                         %]
172                                                     </div>
173                                                 </div>
174                                                 <div class="hide_me">
175                                                     <span name='result_table_extra_span' class='hide_me'>
176                                                         <span name='result_table_pub_box'
177                                                             style='padding-left: 10px;'>
178                                                             <span name='result_table_edition_span'
179                                                                 style='padding-left: 10px;'></span> |
180                                                             <span name='result_table_pub_span'> </span> |
181                                                             <span name='result_table_phys_span'> </span>
182                                                         </span>
183                                                     </span>
184                                                 </div>
185                                             </td>
186
187                                             <td name='result_table_format_cell' class='result_table_format_cell' width="1">
188
189                                                 [% IF attrs.format_icon %]
190                                                 <img title="[% attrs.format_label | html %]" alt="[% attrs.format_label | html %]" src="[% attrs.format_icon %]" />
191                                                 [% END %]
192
193                                                 <!-- unAPI link -->
194                                                 <abbr class="unapi-id" title='tag:[% ctx.hostname %],[% date.format(date.now, '%Y') %]:biblio-record_entry/[% rec.id %]'></abbr>
195
196                                                 <!-- Empty span used for creating Google Book Search-->
197                                                 <span name="googleBooksLink" class="hide_me">
198                                                     <a style='padding-left: 8px;'
199                                                         class='classic_link hide_me'
200                                                         name="googleBooks-link">[% l("Browse in Google Books Search") %]</a>
201                                                 </span>
202
203                                             </td>
204                                             <td nowrap='nowrap' width="1" align="right">
205                                                 <div style="width:250px;text-align:left;">
206                                                     <div style="float:right;">
207                                                         <div class="results_aux_utils opac-auto-010"><a
208                                                                 href="[% mkurl(ctx.opac_root _ '/place_hold', 
209                                                                     {hold_target => rec.id, hold_type => 'T', hold_source_page => mkurl()}) %]" 
210                                                                     name="place_hold_link" class="no-dec"><img
211                                                                 src="[% ctx.media_prefix %]/images/green_check.png"
212                                                                 alt=""/><span style="position:relative;top:-3px;left:3px;">[% l('Place Hold') %]</span></a>
213                                                         </div>
214                                                         <div class="results_aux_utils opac-auto-011">
215                                                             [%  
216                                                                 operation = ctx.mylist.grep(rec.id).size ? "delete" : "add";
217                                                                 label = (operation == "add") ? l("Add to my list") : l("Remove from my list");
218                                                                 href = mkurl(ctx.opac_root _ '/mylist/' _ operation, 
219                                                                         {record => rec.id, anchor => 'record_' _ rec.id}, 1);
220                                                             %]      
221                                                             <a href="[% href %]" class="no-dec">
222                                                                 <img src="[% ctx.media_prefix %]/images/clipboard.png" alt="" />
223                                                                 [% label %]
224                                                             </a>
225                                                         </div>
226                                                         [% IF ENV.OILS_CONTENT_CAFE_USER %]
227                                                         <div class="results_aux_utils opac-auto-011">
228                                                             <a title="[% l('Reviews and More') %]" target='_blank' 
229                                                                 href="[% ctx.proto %]://contentcafe2.btol.com/ContentCafeClient/ContentCafe.aspx?UserID=[%- 
230                                                                     ENV.OILS_CONTENT_CAFE_USER %]&amp;Password=[%-
231                                                                     ENV.OILS_CONTENT_CAFE_PASS %]&amp;ItemKey=[% ident | uri %]&Options=Y">
232                                                                 <img src='[% ctx.media_prefix %]/images/starz.png'/> 
233                                                                 <span style='position:relative;top:-5px;'>[% l('Reviews &amp; More') %]</span>
234                                                             </a>
235                                                         </div>
236                                                         [% END %]
237                                                     </div>
238                                                 </div>
239                                             </td>
240                                         </tr>
241                                         <tr>
242                                             <td/>
243                                             <td align='center'> <!-- Chilifresh reviews link --> 
244                                                 <span class="chili_review" id="isbn_[% attrs.isbn_clean | html %]"> </span>
245                                             </td>
246                                         </tr>
247                                         <tr>
248                                             <td/>
249                                             <td colspan='5'> <!-- Chilifresh reviews panel -->
250                                                 <div id="chili_review_[% attrs.isbn_clean | html %]" style="display: none;" align="center" width="100%"></div>
251                                             </td>
252                                         </tr>
253                                         <tr><td colspan="5"><div style="height:0px;border-top:1px solid #b7b7b7;border-bottom:1px solid #d4d4d4;margin:15px 0px;"></div></td></tr>
254                                     </tbody>
255                                 </table>
256                             </td>
257                         </tr>
258                     [% END %]
259                     </tbody>
260                 </table>
261             </td>
262         </tr>
263     </table>
264 </div>
265 <div>
266     [% ctx.results_count_header %]
267 </div>