--- /dev/null
- [% BLOCK results_count_header %]
- <div class="results_header_nav1">
- <table cellpadding="0" cellspacing="0" border="0" width="100%">
- <tr>
- <td class="h1" width="116">[% l('Search Results') %]</td>
- <td valign="bottom" nowrap="nowrap" class="result_number">
- [% |l(ctx.result_start, ctx.result_stop, ctx.hit_count) %]
- Results <strong>[_1]</strong> - <strong>[_2]</strong> of <strong>[_3]</strong>
- [% END %]
- <span style='padding-left: 6px;'>
- [% |l(page + 1, page_count) %](page <strong>[_1]</strong> of <strong>[_2]</strong>)[% END %]
- </span>
- </td>
- <td align="right" valign="bottom">
- <span class='start_end_links_span'>
- [% class = 'search_page_nav_link';
- href = '#';
- IF page > 0;
- href = mkurl('', {page => page - 1});
- ELSE; class = class _ ' invisible'; END;
- %]
- <a class='[% class %]' href='[% href %]'
- title='[% l("Previous page") %]'><span class="nav_arrow_fix">◄</span> [% l('Previous') %] </a>
- <span class='hide_me'
- style='padding-left: 11px; padding-right:11px;'>
- <span></span>
- </span>
- [% class = 'search_page_nav_link';
- href = '#';
- IF (page + 1) < page_count;
- href = mkurl('', {page => page + 1});
- ELSE; class = class _ ' invisible'; END;
- %]
- <a class='[% class %]' href='[% href %]'
- title='[% l("Next page") %]'> [% l('Next') %] <span class="nav_arrow_fix">►</span></a>
- </span>
- </td>
- </tr>
- </table>
- </div>
- [% END %]
+[% PROCESS "default/opac/parts/misc_util.tt2";
+
+ USE ResolverResolver;
+
+ ctx.result_start = 1 + ctx.page_size * page;
+ ctx.result_stop = ctx.page_size * (page + 1);
+ IF ctx.result_stop > ctx.hit_count; ctx.result_stop = ctx.hit_count; END;
+
+ result_count = ctx.result_start;
+%]
+
+<div style="height: 10px;"></div>
- [% IF attrs.publisher %]
- <tr name="results_pub_tr">
- <td valign="top">
- <strong>[% l('Publisher:') %]</strong>
- </td>
- <td>[% attrs.publisher; %]</td>
- </tr>
- [% END %]
- [% IF attrs.isbn.0 %]
- <tr name="results_isbn_tr">
- <td valign="top">
- <strong>[% l('ISBN:') %]</strong>
++
++[% PROCESS "default/opac/parts/result/paginate.tt2" %]
+[% ctx.results_count_header = PROCESS results_count_header;
+ ctx.results_count_header %]
++
+<div id="result_table_div">
+ <table cellpadding="0" cellspacing="0" border="0" width="100%">
+ <tr>
+ <td valign="top" width="1" style="padding-right:20px;">
+ <div style="width:174px;" class="hide_me" id="tehSideBar">SIDEBAR TODO
+ </div>
+ </td>
+ <td class='opac-auto-015' width="1"></td>
+ <td valign="top">
+ <table id="res_table" cellpadding="0" cellspacing="0"
+ border="0" width="100%" style="margin-top:10px;">
+ <tbody id="result_table">
+ [% FOR rec IN ctx.records;
+ attrs = {marc_xml => rec.marc_xml};
+ PROCESS get_marc_attrs args=attrs %]
+ <tr>
+ <td class='result_table_row' align='left' width='100%'>
+ <table cellpadding="0" cellspacing="0" class='result_table_subtable'>
+ <tbody class='result_table_subtbody'>
+ <tr name='counts_row'>
+ <td width="58" valign="top"
+ style="font-weight:bold;padding-left:10px;"
+ name="results_row_count">[%
+ result_count; result_count = result_count + 1
+ %].</td>
+ <td class='result_table_pic_header' align='center'
+ width="78" nowrap="nowrap" valign="top">
+ [% ident = attrs.isbn_clean || attrs.upc; IF ident; %]
+ <a href="[% mkurl(ctx.opac_root _ '/record/' _ rec.id) %]"><img alt="[% l('Image of item') %]"
+ name='item_jacket' class='result_table_pic' width="55"
+ src='[% ctx.media_prefix %]/opac/extras/ac/jacket/small/[% ident %]' /></a><br />
+ [% END %]
+ </td>
+ <td class='result_table_title_cell'
+ name='result_table_title_cell'
+ valign="top">
+ <div class="bold">
+ <a title="[% attrs.title %]" name='item_title'
+ href="[% mkurl(ctx.opac_root _ '/record/' _ rec.id) %]"
+ class='search_link'>[% attrs.title | html_entity%]</a>
+ </div>
+ <div style="font-size:11px;">
+ <div>
+ <em><a title="[% l("Perform an Author Search") %]"
+ name='item_author'
+ href="[%-
+ authorquery = attrs.author | replace('[,\.:;]', '');
+ mkurl(ctx.opac_root _ '/results', {qtype => 'author', query => authorquery})
+ -%]">[% attrs.author | html_entity %]</a></em>
+
+ [% attrs.pubdate %]
+ </div>
+ <table cellpadding="0" cellspacing="0" border="0"
+ class="results_info_table">
- <td>[% attrs.isbns.0 %]</td>
++ <tr name='bib_cn_list' class='result_table_title_cell'>
++ <td valign='top'>
++ <strong>[% l('Call number:') %]</strong>
+ </td>
- [% END %]
++ <td>[% args.holdings.0 %]</td>
+ </tr>
- [% IF attrs.edition %]
- <tr name="results_edition_tr">
- <td valign="top">
- <strong>[% l('Edition:') %]</strong>
- </td>
- <td>[% attrs.edition %]</td>
- </tr>
- [% END %]
- [% IF attrs.phys_desc %]
- <tr name="results_phys_desc_tr">
- <td nowrap="nowrap" valign="top">
- <strong>[% l('Phys. Desc.:') %]</strong>
- </td>
- <td>
- [% args.phys_desc %]
- </td>
- </tr>
- [% END %]
- [% FOR uri IN args.uris %]
- <tr name='bib_uri_list' class='result_table_title_cell'>
- <td valign='top'>
- <strong>[% l('Electronic resource') %]</strong>
- </td>
- <td><a href="[% uri.href %]">[% uri.link %]</a>[% ' - ' _ uri.note IF uri.note %]</td>
- </tr>
++
++ [% IF CGI.param('detail_record_view') %]
++ <!-- These fields are visible when viewing the results page in 'detailed' mode -->
++
++ [% IF attrs.publisher %]
++ <tr name="results_pub_tr">
++ <td valign="top">
++ <strong>[% l('Publisher:') %]</strong>
++ </td>
++ <td>[% attrs.publisher; %]</td>
++ </tr>
++ [% END %]
++ [% IF attrs.isbn.0 %]
++ <tr name="results_isbn_tr">
++ <td valign="top">
++ <strong>[% l('ISBN:') %]</strong>
++ </td>
++ <td>[% attrs.isbns.0 %]</td>
++ </tr>
++ [% END %]
+ [% IF openurl.enabled == 'true';
+ FOR issn IN args.issns;
+ sfx = ResolverResolver.resolve_issn(issn, openurl.baseurl);
+ FOR res IN sfx;
+ %]
+ <tr name="results_issn_tr">
+ <td valign="top">
+ <strong><a href="[% res.target_url %]">
+ [% res.public_name %]</a></strong>
+ </td>
+ <td>[% res.target_coverage %]</td>
+ </tr>
+ [% END %]
+ [% END %]
+ [% END %]
+
- [% IF args.holdings.size > 0 %]
- <tr name='bib_cn_list' class='result_table_title_cell'>
- <td colspan='2'>
- <table class='result_holdings_table'>
- <thead><tr>
- <th>[% l('Library') %]</th>
- <th>[% l('Shelving location') %]</th>
- <th>[% l('Call number') %]</th>
- <th>[% l('Status') %]</th>
- </tr></thead>
- <tbody>
- [% FOR copy IN args.holdings %]
- <tr>
- <td>[% copy.library %]</td>
- <td>[% copy.location %]</td>
- <td>[% copy.label %]</td>
- <td>[% copy.status %]</td>
- </tr>
++ [% IF attrs.edition %]
++ <tr name="results_edition_tr">
++ <td valign="top">
++ <strong>[% l('Edition:') %]</strong>
++ </td>
++ <td>[% attrs.edition %]</td>
++ </tr>
+ [% END %]
- </tbody>
- </table>
- </td>
- </tr>
++ [% IF attrs.phys_desc %]
++ <tr name="results_phys_desc_tr">
++ <td nowrap="nowrap" valign="top">
++ <strong>[% l('Phys. Desc.:') %]</strong>
++ </td>
++ <td>
++ [% args.phys_desc %]
++ </td>
++ </tr>
++ [% END %]
++ [% FOR uri IN args.uris %]
++ <tr name='bib_uri_list' class='result_table_title_cell'>
++ <td valign='top'>
++ <strong>[% l('Electronic resource') %]</strong>
++ </td>
++ <td><a href="[% uri.href %]">[% uri.link %]</a>[% ' - ' _ uri.note IF uri.note %]</td>
++ </tr>
+ [% END %]
- <td align='center'>
- <!-- Chilifresh link and reviews panel -->
++ [% IF args.holdings.size > 0 %]
++ <tr name='bib_cn_list' class='result_table_title_cell'>
++ <td colspan='2'>
++ <table class='result_holdings_table'>
++ <thead><tr>
++ <th>[% l('Library') %]</th>
++ <th>[% l('Shelving location') %]</th>
++ <th>[% l('Call number') %]</th>
++ <th>[% l('Status') %]</th>
++ </tr></thead>
++ <tbody>
++ [% FOR copy IN args.holdings %]
++ <tr>
++ <td>[% copy.library %]</td>
++ <td>[% copy.location %]</td>
++ <td>[% copy.label %]</td>
++ <td>[% copy.status %]</td>
++ </tr>
++ [% END %]
++ </tbody>
++ </table>
++ </td>
++ </tr>
+ [% END %]
++ [% END %] <!-- END detail_record_view -->
+ </table>
+ <div>
+ [% l('[_1] of [quant,_2,copy,copies] available',
+ attrs.copy_counts.available, attrs.copy_counts.count) # XXX s/count/nshadow/ ?
+ #rec.copy_counts.available, rec.copy_counts.visible)
+ %]
+ </div>
+ </div>
+ <div class="hide_me">
+ <span name='result_table_extra_span' class='hide_me'>
+ <span name='result_table_pub_box'
+ style='padding-left: 10px;'>
+ <span name='result_table_edition_span'
+ style='padding-left: 10px;'></span> |
+ <span name='result_table_pub_span'> </span> |
+ <span name='result_table_phys_span'> </span>
+ </span>
+ </span>
+ </div>
+ </td>
+
+ <td name='result_table_format_cell' class='result_table_format_cell' width="1">
+
+ [% IF attrs.format_icon %]
+ <img title="[% attrs.format_label %]" alt="[% attrs.format_label %]" src="[% attrs.format_icon %]" />
+ [% END %]
+
+ <!-- unAPI link -->
+ <abbr class="unapi-id" title='tag:[% ctx.hostname %],[% date.format(date.now, '%Y') %]:biblio-record_entry/[% rec.id %]'></abbr>
+
+ <!-- Empty span used for creating Google Book Search-->
+ <span name="googleBooksLink" class="hide_me">
+ <a style='padding-left: 8px;'
+ class='classic_link hide_me'
+ name="googleBooks-link">[% l("Browse in Google Books Search") %]</a>
+ </span>
+
+ </td>
+ <td nowrap='nowrap' width="1" align="right">
+ <div style="width:250px;text-align:left;">
+ <div style="float:right;">
+ <div class="results_aux_utils opac-auto-010"><a
+ href="[% mkurl(ctx.opac_root _ '/place_hold', {hold_target => rec.id, hold_type => 'T'}) %]"
+ name="place_hold_link" class="no-dec"><img
+ src="[% ctx.media_prefix %]/images/green_check.png"
+ alt=""/><span style="position:relative;top:-3px;left:3px;">[% l('Place Hold') %]</span></a>
+ </div>
+ <div class="results_aux_utils opac-auto-011">
+ [%
+ operation = ctx.mylist.grep(rec.id).size ? "delete" : "add";
+ label = (operation == "add") ? l("Add to my list") : l("Remove from my list");
+ %]
+ <a href="[% mkurl(ctx.opac_root _ '/mylist/' _ operation, {record => rec.id}, 1) %]" class="no-dec">
+ <img src="[% ctx.media_prefix %]/images/clipboard.png" alt="" />
+ [% label %]
+ </a>
+ </div>
+ </div>
+ </div>
+ </td>
+ </tr>
+ <tr>
+ <td/>
++ <td align='center'> <!-- Chilifresh reviews link -->
+ <div class="chili_review" id="isbn_[% attrs.isbn_clean %]"> </div>
++ </td>
++ </tr>
++ <tr>
++ <td/>
++ <td colspan='5'> <!-- Chilifresh reviews panel -->
+ <div id="chili_review_[% attrs.isbn_clean %]" style="display: none;" align="center" width="100%"></div>
+ </td>
+ </tr>
+ <tr><td colspan="5"><div style="height:0px;border-top:1px solid #b7b7b7;border-bottom:1px solid #d4d4d4;margin:15px 0px;"></div></td></tr>
+ </tbody>
+ </table>
+ </td>
+ </tr>
+ [% END %]
+ </tbody>
+ </table>
+ </td>
+ </tr>
+ </table>
+</div>
+<div>
+ [% ctx.results_count_header %]
+</div>
--- /dev/null
- [% INCLUDE "default/opac/parts/coded_value_selector.tt2" attr=["mattype", "item_type"] none_ok=1 %]
+[% PROCESS "default/opac/parts/org_selector.tt2" %]
+<div id="search-box">
+ [% UNLESS took_care_of_form -%]
+ <form action="[% ctx.opac_root %]/results" method="GET">
+ [%- END %]
+ <table cellpadding="0" cellspacing="10" border="0">
+ <tr>
+ <td colspan="3">
+ <span class="search_catalog_lbl">[% l('Search the Catalog') %]</span>
+ <a href="[% ctx.opac_root %]/advanced"
+ id="home_adv_search_link"><span
+ class="adv_search_font">[% l('Advanced Search') %]</span></a>
+ </td>
+ </tr>
+ <tr>
+ [% IF is_advanced || is_special %]
+ <td colspan="2">
+ <input type="hidden" name="_adv" value="1" />
+ [% ELSE %]
+ <td>
+ [% INCLUDE "default/opac/parts/qtype_selector.tt2" %]
+ </td>
+ [% END %]
+ [% IF ctx.processed_search_query OR (NOT is_advanced AND NOT is_special) %]
+ <td>
+ <div id="search_box_wrapper">
+ <!-- Note: when common browsers support HTML5 placeholder text, we can remove the JS -->
+ <input type="text" id="search_box" name="query" value="[% is_advanced ? ctx.processed_search_query : CGI.param('query') || l("Search Keyword") | html %]"
+ [% IF is_advanced %]style="width: 450px"[% END %]
+ onfocus="if (this.value=='[% l("Search Keyword") %]'){this.value='';this.style.color='#000';}"
+ onblur="if (this.value==''){this.value='[% l("Search Keyword") %]';this.style.color='#999';}"
+ x-webkit-speech />
+ </div>
+ <input name='page' type='hidden' value="0" />
+ </td>
+ <td valign="top">
+ <div class="pos-abs">
+ <div class="opac-auto-143">
+ <input id='search-submit-go' type="image" alt="[% l('Search') %]" src="[% ctx.media_prefix %]/images/go-btn.png"
+ onmouseover="this.src='[% ctx.media_prefix %]/images/go-btn-hover.png';"
+ onmouseout="this.src='[% ctx.media_prefix %]/images/go-btn.png';"
+ onclick='setTimeout(function(){$("search-submit-spinner").className=""; $("search-submit-go").className="hidden"}, 2000)'/>
+ <img id='search-submit-spinner' src='/opac/images/progressbar_green.gif' style='height:16px;width:16px;' class='hidden' alt=''/>
+ </div>
+ </div>
+ </td>
+ [% END %]
+ </tr>
+ [% UNLESS is_advanced OR is_special %]
+ <tr>
+ <td>
++ [% INCLUDE "default/opac/parts/coded_value_selector.tt2" attr=["mattype", "item_type"] none_ok=1 none_label=l('All Formats') %]
+ </td>
+ <td>
+ <span id='depth_selector_span'>
+ [% PROCESS build_org_selector name='loc' value=CGI.param('loc') %]
+ </span>
+ <span id='lib_selector_span'>
+ <a id='lib_selector_link' class='classic_link'
+ href='#'>[% l("Choose a library to search") %]</a>
+ </span>
+ </td>
+ </tr>
+ [% END %]
+ </table>
+ [% UNLESS took_care_of_form %]</form>[% END %]
+ [% IF (is_advanced AND NOT is_special) AND CGI.param('qtype') %]
+ <div class="opac-auto-102">
+ [ <a href="[% ctx.opac_root %]/advanced?[% query_string %]">[%
+ l('Click to Refine Your Original Search')
+ %]</a> ]
+ </div>
+ [% END %]
+ <div id="breadcrumb">
+ <a href="[% ctx.opac_root %]/home">[% l('Catalog Home') %]</a> >
+ </div>
+ <div class="clear-both"></div>
+</div>
--- /dev/null
- <!-- XXX still needed?<div class="results_header_lbl">View</div>
- <select class="results_header_sel">
- <option>Simple</option>
- <option>Detailed</option>
- </select>
- <div class="results_header_div"></div> -->
- <input type="checkbox" id="limit_to_available"
- name="modifier" value="available"
- [% CGI.param('modifier').grep('available').size
- ? ' checked="checked"' : '' %] />
+[% PROCESS "default/opac/parts/header.tt2";
+ USE POSIX;
+
+ WRAPPER "default/opac/parts/base.tt2";
+ INCLUDE "default/opac/parts/topnav.tt2";
+
+ IF is_advanced || is_special;
+ ctx.page_title = l("Search Results");
+ ELSE;
+ ctx.page_title = l("Search Results: ") _ CGI.param('query') | html_entity;
+ END;
+
+ page = CGI.param('page') || 0;
+ page_count = ctx.page_size == 0 ? 1 : POSIX.ceil(ctx.hit_count / ctx.page_size);
+%]
+ <form action="[% ctx.opac_root %]/results" method="GET">
+ <div id="search-wrapper">
+ [% INCLUDE "default/opac/parts/printnav.tt2" %]
+ [% INCLUDE "default/opac/parts/searchbar.tt2" took_care_of_form=1 %]
+ </div>
+ <div class="almost-content-wrapper">
+ <div id="results_header_bar">
+ <div id="results_header_inner">
+ <div class="results_header_btns">
+ <a href="[% ctx.opac_root %]/home"><img alt="[% l('Another Search') %]"
+ src="[% ctx.media_prefix %]/images/another_search.png"
+ onmouseover="this.src='[% ctx.media_prefix %]/images/another_search_hover.png';"
+ onmouseout="this.src='[% ctx.media_prefix %]/images/another_search.png';" /></a>
+ </div>
+ <div class="results_header_btns">
+ <a href="[% ctx.opac_root %]/advanced"><img alt="[% l('Advanced Search') %]"
+ src="[% ctx.media_prefix %]/images/adv_search.png"
+ onmouseover="this.src='[% ctx.media_prefix %]/images/adv_search_hover.png';"
+ onmouseout="this.src='[% ctx.media_prefix %]/images/adv_search.png';" /></a>
+ </div>
+ [% IF ctx.mylist.size %]
+ <div class="results_header_btns cached_list_div">
+ <a href="[% ctx.opac_root; ctx.user ? '/myopac/lists' : '/mylist' %]"><img
+ alt="View My List"
+ src="[% ctx.media_prefix %]/images/view_my_list.png"
+ onmouseover="this.src='[% ctx.media_prefix %]/images/view_my_list_hover.png';"
+ onmouseout="this.src='[% ctx.media_prefix %]/images/view_my_list.png';" /></a>
+ </div>
+ [% END %]
+ <div class="results_header_div"></div>
+ [% UNLESS is_advanced || is_special %]
+ <div class="results_header_lbl">Sort by</div>
+ [% INCLUDE "default/opac/parts/filtersort.tt2" value=CGI.param('sort') %]
+ <div class="results_header_div"></div>
++
++ <div class='results_header_sel' id='simple-detail-view-links'>
++ [% IF CGI.param('detail_record_view') %]
++ <a href="[% mkurl('', {detail_record_view => ''}) %]">[% l('Simple View') %]</a>
++ [% ELSE %]
++ <a href="[% mkurl('', {detail_record_view => 1}) %]">[% l('Detailed View') %]</a>
++ [% END %]
++ </div>
++ <div class="results_header_div"></div>
++
++ <input type="checkbox" id="limit_to_available" name="modifier" value="available"
++ [% CGI.param('modifier').grep('available').size ? ' checked="checked"' : '' %] />
++
+ <label for="limit_to_available" class="results_header_lbl">
+ [% l('Limit to available items') %]
+ </label>
+ [% END %]
+ <div class="clear-both"></div>
+ </div>
+ </div>
+ </div>
+ </form>
+ <div id="content-wrapper">
+ <div id="main-content">
+ <div id="tehResultsPage">
+ [% path = "default/opac/parts/result/" _
+ (ctx.records.size ? "table.tt2" : "lowhits.tt2");
+ INCLUDE $path %]
+ </div>
+ <div class="common-full-pad"></div>
+ </div>
+ </div>
+[% END %]