Merge remote branch 'equinox/ttopac-staff-saved-searches' into tto-master-merge-plus...
authorLebbeous Fogle-Weekley <lebbeous@esilibrary.com>
Thu, 8 Sep 2011 22:02:10 +0000 (18:02 -0400)
committerLebbeous Fogle-Weekley <lebbeous@esilibrary.com>
Thu, 8 Sep 2011 22:21:11 +0000 (18:21 -0400)
Staff recent searches show up on the left of the results and record
details pages now.  You can turn this off via OU settings if you like.
See merged commits.  Again this is just when viewing through staff
client.

Conflicts:
Open-ILS/src/templates/opac/results.tt2
Open-ILS/web/templates/default/opac/record.tt2

Signed-off-by: Lebbeous Fogle-Weekley <lebbeous@esilibrary.com>
1  2 
Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader.pm
Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Record.pm
Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Search.pm
Open-ILS/src/templates/opac/parts/qtype_selector.tt2
Open-ILS/src/templates/opac/parts/staff_saved_searches.tt2
Open-ILS/src/templates/opac/record.tt2
Open-ILS/src/templates/opac/results.tt2
Open-ILS/web/css/skin/default/opac/style.css

index 4b91a47,0000000..f643cc9
mode 100644,000000..100644
--- /dev/null
@@@ -1,16 -1,0 +1,16 @@@
-     <option value='[% qt.value | uri %]'[%
 +[%  query_types = [
 +    {value => "keyword", label => l("Keyword")},
 +    {value => "title", label => l("Title")},
 +    {value => "author", label => l("Author")},
 +    {value => "subject", label => l("Subject")},
 +    {value => "series", label => l("Series")},
 +    {value => "id|bibcn", label => l("Bib Call Number")}
 +] %]
 +<select name="qtype">
 +    [%  query_type = query_type || CGI.param('qtype');
 +        FOR qt IN query_types -%]
++    <option value='[% qt.value %]'[%
 +        query_type == qt.value ? ' selected="selected"' : ''
 +    %]>[% qt.label | html %]</option>
 +    [% END -%]
 +</select>
index 0000000,0000000..fb8ce21
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,8 @@@
++[% IF ctx.saved_searches.size %]
++    <div class="saved-searches-header big-strong">[% l("Your recent searches:") %]</div>
++    [% FOR s IN ctx.saved_searches %]
++    <ul>
++        <li><a href="[% ctx.opac_root %]/results?query=[% s | uri %]&amp;_adv=1">[% s | html %]</a></li>
++    </ul>
++    [% END %]
++[% END %]
index 7434865,0000000..5c1e4d8
mode 100644,000000..100644
--- /dev/null
@@@ -1,16 -1,0 +1,25 @@@
-         <div id="main-content">
 +[%  PROCESS "opac/parts/header.tt2";
 +    PROCESS "opac/parts/config.tt2";
 +    WRAPPER "opac/parts/base.tt2";
 +    INCLUDE "opac/parts/topnav.tt2";
 +    ctx.page_title = l("Record Detail") %]
 +    <div id="search-wrapper">
 +        [% INCLUDE "opac/parts/printnav.tt2" %]
 +        [% INCLUDE "opac/parts/searchbar.tt2" %]
 +    </div>
++    <br class="clear-both" />
 +    <div id="content-wrapper" class="content-wrapper-record-page">
++        [% IF ctx.staff_saved_search_size %]
++        <div id="results-side-bar">
++            <div id="staff-saved-search">
++                [% INCLUDE "opac/parts/staff_saved_searches.tt2" %]
++            </div>
++        </div>
++        [% END %]
++        <div id="[% ctx.staff_saved_search_size ? 'main-content-after-bar' : 'main-content' %]">
 +            [% INCLUDE "opac/parts/record/body.tt2" %]
 +            <div class="common-full-pad"></div>       
 +        </div>
++        <br class="clear-both" />
 +    </div>
 +[% END %]
index 35eb883,0000000..5b397ea
mode 100644,000000..100644
--- /dev/null
@@@ -1,83 -1,0 +1,93 @@@
-         <div id="main-content">
-             <div id="tehResultsPage">
 +[%  PROCESS "opac/parts/header.tt2";
 +    USE POSIX;
 +
 +    WRAPPER "opac/parts/base.tt2";
 +    INCLUDE "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;
 +    END;
 +
 +    page = CGI.param('page');
 +    page = page.match('^\d+$') ? page : 0; # verify page is a sane value
 +
 +    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 "opac/parts/printnav.tt2" %]
 +        [% INCLUDE "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="[% l('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>
 +                    <div class="results_header_lbl">[% l('Sort by') %]</div>
 +                    [% INCLUDE "opac/parts/filtersort.tt2" value=CGI.param('sort') submit_on_change=1 %]
 +                    <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"
 +                        onchange="limit_to_avail_onchange(this, true)"
 +                        [% CGI.param('modifier').grep('available').size ? ' checked="checked"' : '' %] />
 +
 +                    <label for="limit_to_available" class="results_header_lbl">
 +                        [% l('Limit to available items') %]
 +                    </label>
 +                <div class="clear-both"></div>
 +            </div>
 +        </div>
 +    </div>
 +    </form>
++    <br class="clear-both" />
 +    <div id="content-wrapper">
++        [% IF ctx.staff_saved_search_size %]
++        <div id="results-side-bar">
++            <div id="staff-saved-search">
++                [% INCLUDE "opac/parts/staff_saved_searches.tt2" %]
++            </div>
++            <!-- XXX facet display here one day? -->
++        </div>
++        [% END %]
++        <div id="[% ctx.staff_saved_search_size ? 'main-content-after-bar' : 'main-content' %]">
++            <div id="results-page">
 +                [% path = "opac/parts/result/" _
 +                    (ctx.records.size ? "table.tt2" : "lowhits.tt2");
 +                INCLUDE $path %]
 +            </div>
 +            <div class="common-full-pad"></div>    
 +        </div>
++        <br class="clear-both" />
 +    </div>
 +[% END %]