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