]> git.evergreen-ils.org Git - working/Evergreen.git/blob - Open-ILS/web/templates/default/opac/parts/result/table.tt2
TTpac: minor i18n and other cleanup
[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 [% BLOCK results_count_header %]
11 <div class="results_header_nav1">
12     <table cellpadding="0" cellspacing="0" border="0" width="100%">
13         <tr>
14             <td class="h1" width="116">[% l('Search Results') %]</td>
15             <td valign="bottom" nowrap="nowrap" class="result_number">
16                 [% |l(ctx.result_start, ctx.result_stop, ctx.hit_count) %]
17                 Results <strong>[_1]</strong> - <strong>[_2]</strong> of <strong>[_3]</strong>
18                 [% END %]
19                 <span style='padding-left: 6px;'>
20                     [% |l(page + 1, page_count) %](page <strong>[_1]</strong> of <strong>[_2]</strong>)[% END %]
21                 </span>
22             </td>
23             <td align="right" valign="bottom">
24                 <span class='start_end_links_span'>
25                     [%  class = 'search_page_nav_link';
26                         href = '#';
27                         IF page > 0;
28                             href = mkurl('', {page => page - 1});
29                         ELSE; class = class _ ' invisible'; END;
30                     %]
31                     <a class='[% class %]' href='[% href %]' 
32                         title='[% l("Previous page") %]'><span class="nav_arrow_fix">&#9668;</span> [% l('Previous') %] </a>
33                     <span class='hide_me'
34                         style='padding-left: 11px; padding-right:11px;'>
35                         <span></span>
36                     </span>
37                     [%  class = 'search_page_nav_link';
38                         href = '#';
39                         IF (page + 1) < page_count;
40                             href = mkurl('', {page => page + 1});
41                         ELSE; class = class _ ' invisible'; END;
42                     %]
43                     <a class='[% class %]' href='[% href %]' 
44                         title='[% l("Next page") %]'> [% l('Next') %] <span class="nav_arrow_fix">&#9658;</span></a>
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' align='center'
79                                                 width="78" nowrap="nowrap" valign="top">
80                                                 [% ident = attrs.isbn_clean || attrs.upc; IF ident; %]
81                                                 <a href="[% mkurl(ctx.opac_root _ '/record/' _ rec.id) %]"><img alt="[% l('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="[% mkurl(ctx.opac_root _ '/record/' _ rec.id) %]"
92                                                         class='search_link'>[% attrs.title | html_entity%]</a>
93                                                 </div>
94                                                 <div style="font-size:11px;">
95                                                     <div>
96                                                         <em><a title="[% l("Perform an Author Search") %]"
97                                                                 name='item_author'
98                                                                 href="[%- 
99                                                                     authorquery = attrs.author | replace('[,\.:;]', '');
100                                                                     mkurl(ctx.opac_root _ '/results', {qtype => 'author', query => authorquery})
101                                                                     -%]">[% attrs.author | html_entity %]</a></em>
102                                                         &nbsp;&nbsp;
103                                                         [% attrs.pubdate %]
104                                                     </div>
105                                                     <table cellpadding="0" cellspacing="0" border="0"
106                                                         class="results_info_table">
107                                                         <tr name='bib_cn_list' class='result_table_title_cell'>
108                                                             <td valign='top'>
109                                                                 <strong>[% l('Call number:') %]</strong>
110                                                             </td>
111                                                             <td>[% args.holdings.0 %]</td>
112                                                         </tr>
113                                                         <tr name="results_pub_tr" class="[% attrs.publisher ? '' : 'hide_me' %]">
114                                                             <td valign="top">
115                                                                 <strong>[% l('Publisher:') %]</strong>
116                                                             </td>
117                                                             <td>[% attrs.publisher; %]</td>
118                                                         </tr>
119                                                         <tr name="results_isbn_tr" class="[% attrs.isbns.0 ? '' : 'hide_me' %]">
120                                                             <td valign="top">
121                                                                 <strong>[% l('ISBN:') %]</strong>
122                                                             </td>
123                                                             <td>[% attrs.isbns.0 %]</td>
124                                                         </tr>
125                                                         <tr name="results_edition_tr" class="[% attrs.edition ? '' : 'hide_me' %]">
126                                                             <td valign="top">
127                                                                 <strong>[% l('Edition:') %]</strong>
128                                                             </td>
129                                                             <td>[% attrs.edition %]</td>
130                                                         </tr>
131                                                         <tr name="results_phys_desc_tr" class="[% attrs.phys_desc ? '' : 'hide_me' %]">
132                                                             <td nowrap="nowrap" valign="top">
133                                                                 <strong>[% l('Phys. Desc.:') %]</strong>
134                                                             </td>
135                                                             <td>
136                                                                 [% args.phys_desc %]
137                                                             </td>
138                                                         </tr>
139                                                     </table>
140                                                     <div>
141                                                         [% l('[_1] of [quant,_2,copy,copies] available',
142                                                             attrs.copy_counts.available, attrs.copy_counts.count) # XXX s/count/nshadow/ ?
143                                                             #rec.copy_counts.available, rec.copy_counts.visible) 
144                                                         %]
145                                                     </div>
146                                                 </div>
147                                                 <div class="hide_me">
148                                                     <span name='result_table_extra_span' class='hide_me'>
149                                                         <span name='result_table_pub_box'
150                                                             style='padding-left: 10px;'>
151                                                             <span name='result_table_edition_span'
152                                                                 style='padding-left: 10px;'></span> |
153                                                             <span name='result_table_pub_span'> </span> |
154                                                             <span name='result_table_phys_span'> </span>
155                                                         </span>
156                                                     </span>
157                                                 </div>
158                                             </td>
159
160                                             <td name='result_table_format_cell' class='result_table_format_cell' width="1">
161
162                                                 [% IF attrs.format_icon %]
163                                                 <img title="[% attrs.format_label %]" alt="[% attrs.format_label %]" src="[% attrs.format_icon %]" />
164                                                 [% END %]
165
166                                                 <!-- unAPI link -->
167                                                 <abbr class="unapi-id" title='tag:[% ctx.hostname %],[% date.format(date.now, '%Y') %]:biblio-record_entry/[% rec.id %]'></abbr>
168
169                                                 <!-- Empty span used for creating Google Book Search-->
170                                                 <span name="googleBooksLink" class="hide_me">
171                                                     <a style='padding-left: 8px;'
172                                                         class='classic_link hide_me'
173                                                         name="googleBooks-link">[% l("Browse in Google Books Search") %]</a>
174                                                 </span>
175
176                                             </td>
177                                             <td nowrap='nowrap' width="1" align="right">
178                                                 <div style="width:250px;text-align:left;">
179                                                     <div style="float:right;">
180                                                         <div class="results_aux_utils opac-auto-010"><a
181                                                                 href="[% mkurl(ctx.opac_root _ '/place_hold', {hold_target => rec.id, hold_type => 'T'}) %]" 
182                                                                     name="place_hold_link" class="no-dec"><img
183                                                                 src="[% ctx.media_prefix %]/images/green_check.png"
184                                                                 alt="[% l('Place hold') %]"/><span style="position:relative;top:-3px;left:3px;">[% l('Place Hold') %]</span></a>
185                                                         </div>
186                                                         <div class="results_aux_utils opac-auto-011">
187                                                             [%  operation = ctx.mylist.grep(rec.id).size ? "delete" : "add";
188                                                                 label = (operation == "add") ? l("Add to") : l("Remove from"); %]
189                                                             <form action="[% ctx.opac_root %]/mylist/[% operation %]" method="POST">
190                                                                 <input type="hidden" name="record" value="[% rec.id %]" />
191                                                             <div style="position:absolute;">
192                                                                 <div style="position:relative;top:5px; left: 25px;">
193                                                                     <input type="submit" title="[% '[_1] my list' | l(label) %]" 
194                                                                         value="[% '[_1] my list' | l(label) %]" class="subtle-button" />
195                                                                 </div>
196                                                             </div>
197                                                                 <input type="image"
198                                                                 alt="[% '[_1] my list' | l(label) %]"
199                                                                 src="[% ctx.media_prefix %]/images/clipboard.png" />
200                                                             </form>
201                                                         </div>
202                                                     </div>
203                                                 </div>
204                                             </td>
205                                         </tr>
206                                         <tr>
207                                             <td/>
208                                             <td align='center'>
209                                                 <!-- Chilifresh link and reviews panel --> 
210                                                 <div class="chili_review" id="isbn_[% attrs.isbn_clean %]"> </div>
211                                                 <div id="chili_review_[% attrs.isbn_clean %]" style="display: none;" align="center" width="100%"></div>
212                                             </td>
213                                         </tr>
214                                         <tr><td colspan="5"><div style="height:0px;border-top:1px solid #b7b7b7;border-bottom:1px solid #d4d4d4;margin:15px 0px;"></div></td></tr>
215                                     </tbody>
216                                 </table>
217                             </td>
218                         </tr>
219                     [% END %]
220                     </tbody>
221                 </table>
222             </td>
223         </tr>
224     </table>
225 </div>
226 <div>
227     [% ctx.results_count_header %]
228 </div>