Tpac: merged esi/template-toolkit-opac; conflict resolution
authorBill Erickson <berick@esilibrary.com>
Mon, 29 Aug 2011 17:37:19 +0000 (13:37 -0400)
committerBill Erickson <berick@esilibrary.com>
Mon, 29 Aug 2011 17:37:19 +0000 (13:37 -0400)
Signed-off-by: Bill Erickson <berick@esilibrary.com>
1  2 
Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Search.pm
Open-ILS/src/templates/default/opac/myopac/lists.tt2
Open-ILS/src/templates/default/opac/parts/anon_list.tt2
Open-ILS/src/templates/default/opac/parts/place_hold.tt2
Open-ILS/src/templates/default/opac/parts/place_hold_result.tt2
Open-ILS/src/templates/default/opac/parts/searchbar.tt2
Open-ILS/src/templates/default/opac/place_hold.tt2
Open-ILS/src/templates/default/opac/results.tt2
Open-ILS/web/css/skin/default/opac/style.css

index 4cef8b0,0000000..0c4852f
mode 100644,000000..100644
--- /dev/null
@@@ -1,185 -1,0 +1,185 @@@
-                                 if (inputs[i].name == 'del_item' && !inputs[i].disabled && inputs[i].getAttribute('bbag') == [% bbag.id %]) 
 +[%  PROCESS "default/opac/parts/header.tt2";
 +    PROCESS "default/opac/parts/misc_util.tt2";
 +    WRAPPER "default/opac/parts/myopac/base.tt2";
 +    myopac_page = "lists"  %]
 +<div id='myopac_bookbag_div' style="padding:5px;">
 +
 +    <!-- <div class="header_middle">
 +        <span id="acct_holds_header" style="float:left;">[% l('My Lists') %]</span>
 +        <span style="float:right;"><a class="hide_me" href="#">[% l('Export List') %]</a></span>
 +    </div>
 +    <div style="float:right;width:85px;">
 +        <div style="position:absolute">
 +            <div style="position:relative;top:13px;">
 +                <a href="#" style="position:relative;top:-3px;left:-5px;"><img alt="[% l('Saving Help') %]" 
 +                    src="[% ctx.media_prefix %]/images/question-mark.png" /></a>
 +                <a href="#"><img alt="[% l('Save') %]" src="[% ctx.media_prefix %]/images/save-btn.png"/></a>
 +            </div>
 +        </div>
 +    </div> -->
 +    <div id="temp_wrapper">
 +
 +
 +    <!-- new list creation -->
 +    <form action="[% ctx.opac_root %]/myopac/list/update" method="POST" id="create_form">
 +        <h2>[% l('Create new list') %]</h2><a name="createnewlist"></a>
 +        <table cellpadding="0" border="0" id="list_create_table">
 +            <tr>
 +                <td>
 +                    <label for="list_create_name">[% l('Enter the name of the new list:') %]</label>
 +                    <input id="list_create_name" type="text" name="name" />
 +                    <input type="hidden" name="action" value="create" />
 +                </td>
 +                <td>
 +                    <label for="list_create_shared">[% l('Share this list?') %]</label>
 +                    <select name="shared" id="list_create_shared">
 +                        <option value="0">[% l('No') %]
 +                        <option value="1">[% l('Yes') %]
 +                    </select>
 +                    <a href="javascript:void(0);" onclick="alert(document.getElementById('bb_publish_text').innerHTML);"><img alt="[% l('Sharing Help') %]"
 +                        src="[% ctx.media_prefix %]/images/question-mark.png" /></a>
 +                </td>
 +                <td class="list-create-table-buttons">
 +                    <input type="image" alt="[% l('Submit') %]" src="[% ctx.media_prefix %]/images/btnSubmit.png"/>
 +                    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
 +                    <a href="javascript:void(0);"
 +                        onclick="document.getElementById('create_form').reset(); return false"><img
 +                        alt="[% l('Cancel') %]"
 +                        src="[% ctx.media_prefix %]/images/btnCancel.png" /></a>
 +                </td>
 +            </tr>
 +        </table>
 +    </form>
 +
 +    [% INCLUDE "default/opac/parts/anon_list.tt2" %]
 +    [% IF ctx.bookbags.size %]
 +    <div id='acct_lists_prime'>
 +        [% FOR bbag IN ctx.bookbags %]
 +        <div id='acct_list_template'>
 +            <div style="width:100%">
 +                <form action="[% ctx.opac_root %]/myopac/list/update" method="POST">
 +                    <div class="bookbag-share">
 +                        <input type="hidden" name="list" value="[% bbag.id %]" />
 +                        [% IF bbag.pub != 't' %]
 +                        <input type="hidden" name="action" value="show" />
 +                        <input type="submit" value="[% l('Share') %]" />
 +                        [% ELSE %]
 +                        <input type="hidden" name="action" value="hide" />
 +                        <input type="submit" value="[% l('Hide') %]" />
 +                        [% END %]
 +                    </div>
 +                </form>
 +                <form action="[% ctx.opac_root %]/myopac/list/update" method="POST">
 +                    <div class="bookbag-controls">
 +                        <input type="hidden" name="list" value="[% bbag.id %]" />
 +                        <input type="hidden" name="action" value="delete" />
 +                        <input type="submit" value="[% l('Delete List') %]" />
 +                    </div>
 +                </form>
 +                <div class="bookbag-controls">
 +                    <big><strong>
 +                    [% IF bbag.pub == 't' %]
 +                        [% url = 'http://' _ ctx.hostname _ '/opac/extras/feed/bookbag/html-full/' _ bbag.id %]
 +                        <a target='_blank' href='[% url %]'>[% bbag.name | html %]</a>
 +                    [% ELSE %]
 +                    [% bbag.name | html %]
 +                    [% END %]
 +                    </strong></big>
 +                </div>
 +                <div class="bookbag-controls">
 +                    [% IF bbag.pub == 't'; %]
 +                    <a target='_blank' href='/opac/extras/feed/bookbag/rss2-full/[% bbag.id %]'><img
 +                        alt="[% l('RSS Feed') %]" border="0"
 +                        src="[% ctx.media_prefix %]/images/small-rss.png"/></a>
 +                    [% END %]
 +                </div>
 +                <div class="clear-both pad-bottom-five"></div>
 +            </div>
 +            <form action="[% ctx.opac_root %]/myopac/list/update" method="POST">
 +            <input type="hidden" name="list" value="[% bbag.id %]" />
 +            <table cellpadding='0' cellspacing='0' border='0'>
 +                <thead id="acct_list_header">
 +                    <tr>
 +                        <td width="1%" style="padding-left: 10px;">
 +                        <input type="checkbox" onclick="
 +                            var inputs=document.getElementsByTagName('input'); 
 +                            for (i = 0; i < inputs.length; i++) { 
-                                 <!-- XXX not ready yet<option value="hold">[% l('Place Hold') %]</option> -->
++                                if (inputs[i].name == 'selected_item' && !inputs[i].disabled && inputs[i].getAttribute('bbag') == [% bbag.id %]) 
 +                                    inputs[i].checked = this.checked;}"/>
 +
 +                        </td>
 +                        <td width="49%" style="padding-left: 5px;">[% l('Title') %]</td>
 +                        <td width="49%">[% l('Author(s)') %]</td>
 +                        <td width="1%" class="nowrap">
 +                            <select class="selector_actions_for_list" name="action">
 +                                <option>[% l('-- Actions for this list --') %]</option>
-                         <td class="item_list_padding" style="padding-left: 10px;"><input type="checkbox" name="del_item" value="[% item.id %]" bbag='[% bbag.id %]'/></td>
++                                <option value="place_hold">[% l('Place Hold') %]</option>
 +                                <option value="del_item">[% l('Remove Items') %]</option>
 +                            </select>
 +                            <input type="submit" value="[% l('Go') %]" />
 +                        </td>
 +                    </tr>
 +                </thead>
 +                <tbody>
 +                    [% UNLESS bbag.items.size %]
 +                    <tr><td colspan="4" class="opac-auto-171 opac-auto-097">
 +                        [% l("This list contains no items.") %]
 +                    </td></tr>
 +                    [% END %]
 +                    [% FOR item IN bbag.items;
 +                        rec_id = item.target_biblio_record_entry;
 +                        attrs = {marc_xml => ctx.bookbags_marc_xml.$rec_id};
 +                        PROCESS get_marc_attrs args=attrs %]
 +                    <tr>
++                        <td class="item_list_padding" style="padding-left: 10px;"><input type="checkbox" name="selected_item" value="[% item.id %]" bbag='[% bbag.id %]'/></td>
 +                        <td class="item_list_padding" style="padding-left: 5px;">[% attrs.title | html %]</td>
 +                        <td class="item_list_padding">[% attrs.author | html %]</td>
 +                    </tr>
 +                    [% END %]
 +                </tbody>
 +            </table>
 +            </form>
 +            <br /><br />
 +        </div>
 +        [% END %]
 +    </div>
 +    [% END %]
 +
 +    <div id='myopac_delete_bookbag_warn' class='hide_me'>
 +        [% l("This will remove the selected bookbag and all items contained within the bookbag.  Are you sure you wish to continue?") %]
 +    </div>
 +    <div style='text-align: center; font-weight: bold;' 
 +        class='hide_me' id='myopac_bookbags_none'>[% l("You have not created any bookbags") %]</div>
 +    <div style='width: 99%; text-align: center'>
 +        <b id='myopac_bookbag_items_name'> </b>
 +    </div>
 +    <span id='bb_publish_text' class='hide_me'>
 +[% |l %]Sharing a Bookbag means that the contents 
 +of the Bookbag will be visible to others.  
 +To see the public view of a shared Bookbag, 
 +click on the Bookbag's name in the Bookbag list.[% END %]
 +    </span>
 +    <span id='myopac_remove_bb_item_confirm' class='hide_me'>
 +        [% l("Are you sure you wish to remove this bookbag item?") %]
 +    </span>
 +    <span id='myopac_make_published_confirm' class='hide_me'>
 +        [% l("Sharing this bookbag will allow the contents of the bookbag to be seen by others.  Are you sure you wish to share this bookbag?") %]
 +    </span>
 +    <span id='myopac_make_unpublished_confirm' class='hide_me'>
 +        [% l("Are you sure you wish to hide this bookbag?") %]
 +    </span>
 +    <span id='myopac_bb_update_success' class='hide_me'>
 +        [% l("The Bookbag was successfully updated.") %]
 +    </span>
 +    <span id='bb_create_warning' class='hide_me'>
 +        [% l("Warning: Adding items to a bookbag creates a link between you and the items in the database.  The contents of the bookbag are NOT publicly viewable unless the bookbag is shared. However, if you prefer not to have any link between your patron record and a particular item or items, we suggest that you do not place said items in a bookbag or that you avoid using bookbags all together.  Thank you.") %]
 +    </span>
 +    <span id='myopac_bb_what_are' class='hide_me'>
 +        [% l("Bookbags are...") %]
 +    </span>
 +    <span class='hide_me' id='bb_update_success'>
 +        [% l("Bookbag successfully updated") %]
 +    </span>
 +
 +</div>
 +[% END %]
index f1b7d0b,0000000..a4630ca
mode 100644,000000..100644
--- /dev/null
@@@ -1,65 -1,0 +1,65 @@@
-                                 <!-- XXX not ready <option value="hold">[% l('Place Hold') %]</option> -->
 +        [% IF ctx.mylist.size %]
 +        <form action="[% ctx.opac_root %]/mylist/move" method="POST">
 +        <div id='acct_list_template2'>
 +            <div style="width:100%">
 +                <table cellpadding="0" cellspacing="0" border="0">
 +                    <tr>
 +                        <td id='anon_list_name'>
 +                            [% l('Temporary List') %]
 +                        </td>
 +                        <td>
 +                            <!-- <a href="#"><img
 +                                alt="[% l('Anonymous List Help') %]"
 +                                src="[% ctx.media_prefix %]/images/question-mark.png" /></a>-->
 +                        </td>
 +                    </tr>
 +                </table>
 +                <div class="float-right"></div>
 +                <div class="clear-both pad-bottom-five"></div>
 +            </div>
 +            <table cellpadding='0' cellspacing='0' border='0'>
 +                <thead id="acct_list_header_anon">
 +                    <tr>
 +                        <td width="1%" style="padding-left:10px;">
 +                            <input type="checkbox" onclick="
 +                                var inputs=document.getElementsByTagName('input'); 
 +                                for (i = 0; i < inputs.length; i++) { 
 +                                    if (inputs[i].name == 'record' && !inputs[i].disabled) inputs[i].checked = this.checked;}"/>
 +                        </td>
 +                        <td width="49%" style="padding-left:5px;">[% l('Title') %]</td>
 +                        <td width="49%" style="padding-left:5px;">[% l('Author(s)') %]</td>
 +                        <td width="1%" class="nowrap">
 +                            <select class="selector_actions_for_list" name="action">
 +                                <option>[% l('-- Actions for this list --') %]</option>
++                                <option value="place_hold">[% l('Place Hold') %]</option>
 +                                <option value="delete">[% l('Remove Items') %]</option>
 +                                [% IF ctx.user AND ctx.bookbags.size %]
 +                                <optgroup label="Move selected items to">
 +                                    [% FOR bbag IN ctx.bookbags %]]
 +                                    <option value="[% bbag.id %]" class="selector_actions_for_list_inner_option">[% bbag.name | html %]</option>
 +                                    [% END %]
 +                                </optgroup>
 +                                [% END %]
 +                            </select>
 +                            <input type="submit" value="[% l('Go') %]" />
 +                        </td>
 +                    </tr>
 +                </thead>
 +                <tbody id='anon_list_tbody'>
 +                    [% FOR item IN ctx.mylist;
 +                        attrs = {marc_xml => ctx.mylist_marc_xml.$item};
 +                        PROCESS get_marc_attrs args=attrs %]
 +                    <tr>
 +                        <td class="item_list_padding" style="padding-left: 10px;">
 +                            <input type="checkbox" name="record" value="[% item %]" />
 +                        </td>
 +                        <td class="item_list_padding" style="padding-left: 5px;">[% attrs.title | html %]</td>
 +                        <td class="item_list_padding" style="padding-left: 5px;">[% attrs.author | html %]</td>
 +                    </tr>
 +                    [% END %]
 +                </tbody>
 +            </table>
 +            <br /><br />
 +        </div>
 +        </form>
 +        [% END %]
index 903cbb6,0000000..f3a564c
mode 100644,000000..100644
--- /dev/null
@@@ -1,369 -1,0 +1,83 @@@
-     attrs = {marc_xml => ctx.marc_xml};
-     PROCESS get_marc_attrs args=attrs;
 +[%  PROCESS "default/opac/parts/misc_util.tt2";
- <div>
-     <div id='holds_box' class='canvas' style='margin-top: 6px;'>
-         [% IF ctx.hold_success %]
-         <div><big><strong>[% l("Hold was successfully placed"); %]</strong></big></div>
-         [% ELSIF ctx.hold_failed %]
-         <div><big><strong>[% l("Hold was not successfully placed"); %]</strong></big></div>
-             [% IF ctx.hold_local_block %]
-             <div>[% l("There is already a copy available at your local library.") %]</div>
-             [% ELSIF ctx.hold_failed_event || ctx.hold_local_alert %]
-         <div>
-             <strong>[% l('Problem:') %]</strong>
-             <span title="[% ctx.hold_failed_event.textcode | html %]">
-                 <em>[%
-                         fail_part_key = ctx.hold_failed_event.payload.fail_part;
-                         event_key = ctx.hold_failed_event.textcode;
-                         # display:
-                         l(FAIL_PART_MSG_MAP.$fail_part_key) ||
-                         l(EVENT_MSG_MAP.$event_key) ||
-                         l(ctx.hold_failed_event.desc) ||
-                         ctx.hold_failed_event.payload.fail_part ||
-                         ctx.hold_failed_event.textcode ||
-                         (ctx.hold_local_alert ?
-                             l("There is already a copy available at your local library.") :
-                             l("Unknown problem")) %]</em>
-             </span>
-             [% IF ctx.hold_copy_available %]<p>
-             [%  l('Find a copy in the shelving location, "[_1]."', locname) | html %]
-             </p>[% END %]
 +    PROCESS "default/opac/parts/hold_error_messages.tt2";
 +%]
-             [% IF ctx.could_override || ctx.hold_local_alert %]
-             <p>
-                 <big>[% l("You have permission to place this hold anyway.") %]</big>
-                 <br />
-                 [% l("Click submit below to override the system's objection and place your hold.") %]
-             </p>
-             <form method="POST">
-                 <input type="hidden" type="name" name="override" value="1" />
-                 [% FOR k IN ctx.orig_params.keys %]
-                 <input type="hidden" name="[% k %]" value="[% ctx.orig_params.$k | uri %]" />
-                 [% END %]
-                 <input type="image" name="submit" value="submit" title="[% l('Submit') %]"
-                     alt="[% l('Submit') %]" src="[% ctx.media_prefix %]/images/btnSubmit.png" />
-             </form>
-             [% END %]
-         </div>
-             [% END;
-         ELSIF ctx.hold_local_block;
-             l("There is already a copy available at your local library");
-         ELSE %]
-         <form method="POST">
-             <br/>
-             <input type="hidden" name="hold_target"
-                 value="[% CGI.param('hold_target') | html %]" />
-             <input type="hidden" name="hold_type"
-                 value="[% CGI.param('hold_type') | html %]" />
-             [%
-                 new_redirect_to = ctx.referer;
-                 IF new_redirect_to.match('redirect_to');
-                     new_redirect_to = 'https://' _ ctx.hostname _ ctx.opac_root _ '/home';
-                 ELSE;
-                     new_redirect_to = new_redirect_to | replace('^http:', 'https:');
-                 END;
-             %]
-             <input type="hidden" name="redirect_to"
-                 value="[% new_redirect_to | html %]" />
-             <h1>Place Hold</h1>
-             [% IF ctx.is_staff %]
-             <p class="staff-hold">
-                 <input type="radio" id="hold_usr_is_requestor_not"
 +
-                     name="hold_usr_is_requestor" value="0"
-                     [% IF ctx.patron_recipient; ' checked="checked"'; END %]
-                     />
-                 <label for="hold_usr_is_requestor_not">
-                     [% l("Place hold for patron by barcode:") %]
++<div id='holds_box' class='canvas' style='margin-top: 6px;'>
++    <h1>[% l('Place Hold') %]</h1>
++    <form method="POST">
++        <input type="hidden" name="hold_type" value="[% CGI.param('hold_type') | html %]" />
++        [%#
++            new_redirect_to = ctx.referer;
++            IF new_redirect_to.match('redirect_to');
++                new_redirect_to = 'https://' _ ctx.hostname _ ctx.opac_root _ '/home';
++            ELSE;
++                new_redirect_to = new_redirect_to | replace('^http:', 'https:');
++            END;
++        %]
++        <input type="hidden" name="redirect_to" value="[% CGI.param('redirect_to') || CGI.referer | html %]" />
++
++        [% IF ctx.is_staff %]
++        <p class="staff-hold">
++            <input type="radio" id="hold_usr_is_requestor_not"
++                onchange="staff_hold_usr_input_disabler(this);"
++                name="hold_usr_is_requestor" value="0"
++                [% IF ctx.patron_recipient; ' checked="checked"'; END %] />
++            <label for="hold_usr_is_requestor_not">
++                [% l("Place hold for patron by barcode:") %]
++            </label>
++            <input type="text" name="hold_usr" id="hold_usr_input" value="[% ctx.patron_recipient.card.barcode | html %]" /><br />[%# XXX multi-barcode users? %]
++            <span>
++                <input type="radio" id="hold_usr_is_requestor"
 +                    onchange="staff_hold_usr_input_disabler(this);"
-                 <input type="text" name="hold_usr" id="hold_usr_input" value="[% ctx.patron_recipient.card.barcode | html %]" /><br />[%# XXX multi-barcode users? %]
-                 <span>
-                     <input type="radio" id="hold_usr_is_requestor"
-                         onchange="staff_hold_usr_input_disabler(this);"
-                         name="hold_usr_is_requestor" value="1" />
-                     <label for="hold_usr_is_requestor">
-                         [% l("Place this hold for me ([_1] [_2])", ctx.user.first_given_name, ctx.user.family_name) | html %]
-                     </label>
-                 </span>
-             </p>
-             [% END %]
-             <p>
-                 [%  title = attrs.title | html; libname = ctx.get_aou(ctx.default_pickup_lib).name | html %]
-                 [% | l(title, libname) %]
-                 You would like to place a hold on <strong><q>[_1]</q></strong>.<br />
-                 If this is correct, confirm your pickup location and click <strong>SUBMIT</strong>.
-                 [% END %]
-             </p>
-             <p>
-                 [% l('Pickup location:') %]
-                 [% PROCESS "default/opac/parts/org_selector.tt2";
-                     PROCESS build_org_selector name='pickup_lib' value=ctx.default_pickup_lib id='pickup_lib' can_have_vols_only=1 %]
-             </p>
-             <p>
-                 [% |l %]If you use the Traveling Library Center (TLC) and ABC Express
-                 services, please select "Outreach" to have the item delivered
-                 during your scheduled visit.[% END %]
-             </p>
-             <input type="image" name="submit" value="submit" title="[% l('Submit') %]"
-                 alt="[% l('Submit') %]" src="[% ctx.media_prefix %]/images/btnSubmit.png" />
-             &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
-             <a href="javascript:history.go(-1);" id="holds_cancel"><img
-                 alt="[% l('Cancel') %]" src="[% ctx.media_prefix %]/images/btnCancel.png" /></a>
-         </form>
-         <br /><br />
-         <p>
-             [% |l %]* If you need your item today, and it is checked in at your
-             library, please place your hold and then call your library to set it
-             aside. Placing a hold without calling the library will increase your
-             wait time.[% END %]
-             <br /><a href="#">[% l('Library phone numbers.') %]</a>
-         </p>
-         <p>
-             [% |l %]* For best possible service, we recommend keeping 
-             a printed copy of your most recent holds list.[% END %]
++                    name="hold_usr_is_requestor" value="1" />
++                <label for="hold_usr_is_requestor">
++                    [% l("Place this hold for me ([_1] [_2])", ctx.user.first_given_name, ctx.user.family_name) | html %]
 +                </label>
-         [% END %] <!-- ctx.hold_success -->
-         <table width='90%' border="1" class="hide_me">
-             <tbody>
-                 <tr>
-                     <td class='holds_cell color_1' 
-                         align='center' colspan='2'>[% l("Create / Edit a Hold") %]</td>
-                 </tr>
-                 <tr>
-                     <td class='holds_cell'>[% l("Recipient") %]:</td>
-                     <td class='holds_cell' id='holds_recipient'> </td>
-                 </tr>
-                 <tr>
-                     <td class='holds_cell'>[% l("Title:") %]</td>
-                     <!-- <td class='holds_cell' id='holds_title'> </td> -->
-                 </tr>
-                 <tr>
-                     <td class='holds_cell'>[% l("Author") %]</td>
-                     <td class='holds_cell' id='holds_author'> </td>
-                 </tr>
-                 <tr>
-                     <td class='holds_cell'>[% l("Format") %]</td>
-                     <td class='holds_cell' id='holds_format'> </td>
-                 </tr>
-                 <tr id='hold_physical_desc_row'>
-                     <td class='holds_cell'>[% l("Physical Description:") %]</td>
-                     <td class='holds_cell' id='holds_physical_desc'> </td>
-                 </tr>
-                 <tr class='hide_me' id='holds_cn_row'>
-                     <td class='holds_cell'>[% l("Call Number:") %]</td>
-                     <td class='holds_cell'><b id='holds_cn'/> </td>
-                 </tr>
-                 <tr class='hide_me' id='holds_copy_row'>
-                     <td class='holds_cell'>[% l("Copy Barcode:") %]</td>
-                     <td class='holds_cell'><b id='holds_copy'/> </td>
-                 </tr>
-                 <tr class='hide_me' id='holds_type_row'>
-                     <td class='holds_cell'>[% l("Hold Type:") %]</td>
-                     <td class='holds_cell hide_me' id='holds_is_cn'>
-                         <b>[% l("Volume Hold") %]</b>
-                     </td>
-                     <td class='holds_cell hide_me' id='holds_is_copy'>
-                         <b>[% l("Copy Hold") %]</b>
-                     </td>
-                 </tr>
-                 <tr>
-                     <td class='holds_cell'>[% l("Contact telephone number") %]:</td>
-                     <td class='holds_cell'>
-                         <input id='holds_phone' size='13' maxlength='12'/>
-                         <span style='margin-left: 4px; font-size: 7pt;'>
-                             [% l("(XXX-YYY-ZZZZ)") %]
-                         </span>
-                     </td>
-                 </tr>
-                 <tr>
-                     <td class='holds_cell'>[% l("Enable phone notifications for this hold?") %]</td>
-                     <td class='holds_cell'>
-                         <input type='checkbox' id='holds_enable_phone'
-                             checked='checked' />
-                     </td>
-                 </tr>
-                 <tr>
-                     <td class='holds_cell'>[% l("Contact email address") %]:</td>
-                     <td class='holds_cell' id='holds_email'> 
-                         <span class='hide_me' id='holds.no_email'>
-                            ([% l("Patron has no configured email address") %])<br/>
-                            ([% l("See") %] <a class='classic_link' id='holds.no_email.my_account'>[% l("My Account") %]</a> [% l("for setting your email address") %])
-                         </span>
-                         <span class='hide_me' id='holds.no_email.xul'>
-                            [% l("(Patron has no configured email address)") %] 
-                         </span>
-                     </td>
-                 </tr>
-                 <tr>
-                     <td class='holds_cell'>[% l("Enable email notifications for this hold?") %]</td>
-                     <td class='holds_cell'>
-                         <input type='checkbox' id='holds_enable_email'
-                             checked='checked'/>
-                     </td>
-                 </tr>
-                 <!--
-                 <tr id='holds_depth_selector_row' class='hide_me'>
-                     <td class='holds_cell'>Hold Range</td>
-                     <td class='holds_cell'>
-                         <select id='holds_depth_selector'></select>
-                     </td>
-                 </tr>
-                 -->
-                 <tr>
-                     <td class='holds_cell'>[% l("Pickup location") %]</td>
-                     <td class='holds_cell'>
-                         <!-- <select id='holds_org_selector'> </select> -->
-                     </td>
-                 </tr>
-                 <tr>
-                     <td class='holds_cell'>[% l("Expiration date") %]</td>
-                     <td class='holds_cell'>
-                         <input size='10' maxlength='10'
-                          id='holds_expire_time' />
-                     </td>
-                 </tr>
-                 <tr>
-                     <td class='holds_cell'>
-                         [% l("Suspend this hold") %]
-                         <a class='classic_link'
-                             href='#'>[% l("(Help)") %]</a>
-                         </td>
-                     <td class='holds_cell'>
-                         <input type='checkbox' id='holds_frozen_chkbox' /> 
-                     </td>
-                 </tr>
-                 <tr id='hold_frozen_thaw_row' class='hide_me'>
-                     <td class='holds_cell'>
-                         <!-- XXX TODO there used to be script here dealing with
-                         frozen holds -->
-                         [% l("Automatically activate hold on:") %]
-                     </td>
-                     <td class='holds_cell'>
-                         <input size='10' maxlength='10'
-                             id='holds_frozen_thaw_input' />
-                     </td>
-                 </tr>
-                 <tr id='holds_alt_formats_row_extras' class='hide_me'>
-                     <td colspan='2' align='center'>
-                         <div style='padding: 8px;'>
-                             <a class='classic_link' href='#'
-                                 style='padding: 5px;'>[% l("Advanced Hold Options") %]</a>
-                         </div>
-                     </td>
-                 </tr>
-                 <tr id='holds_alt_formats_row' class='hide_me'>
++            </span>
 +        </p>
-                     <td class='holds_cell'>
-                         <div style='margin-bottom: 5px;'>
-                             <span>[% l("Acceptable Alternative Formats:") %] </span>
-                             <span><a class='classic_link red' href='#'>[% l("(Help)") %]</a></span>
-                         </div>
-                         <div>[% l("(control-click to select multiple formats)") %]</div>
-                     </td>
-                     <td class='holds_cell'>
-                         <select id='hold_alt_form_selector' multiple='multiple' style='width: 14em;'>
-                             <option value='at'    class='hide_me'>[% l("Books") %]</option>
-                             <option value='at-d' class='hide_me'>[% l("Large Print Books") %]</option>
-                             <option value='i'        class='hide_me'>[% l("Audiobooks") %]</option>
-                             <option value='g'        class='hide_me'>[% l("Video Recordings") %]</option>
-                             <option value='j'        class='hide_me'>[% l("Music") %]</option>
-                         </select>
-                     </td>
-                 </tr>
-                 <tr>
-                     <td class='holds_cell' align='center' colspan='2'>
-                         <!-- <button id='holds_submit'>[% l("Place Hold") %]</button> -->
-                         <button class='hide_me' id='holds_update'>[% l("Update Hold") %]</button>
-                         <span style='padding: 20px;'> </span>
-                         <!-- <button id='holds_cancel'>[% l("Cancel") %]</button> -->
-                     </td>
-                 </tr>
-             </tbody>
-         </table>
-         <span class='hide_me' id='holds_bad_phone'>
-             [% l("The phone number does not have the correct format. The expected format is XXX-YYY-ZZZZ") %]
-         </span>
-         <span class='hide_me' id='hold_not_allowed'>
-             [% |l %]No items were found that could fulfill the requested holds.  
-                 It's possible that choosing a different format will result in a successful hold.  
-                 It is also possible that you have exceeded the number of allowable holds.  
-                 For further information, please consult your local librarian.[% END %]
-         </span>
-     </div>
-     <div id="anonListTable" class="hide_me" style="margin-top: 6px;">
-         <select id="holdsCacheSel" class="hide_me"></select><br />
-         <a href="#">Place hold on selected</a><br />
-         <a href="#">Remove selected</a>
-         
-         <table id="temp_list_holds" cellpadding='0' cellspacing='0' border='0'
-             style="margin-top:10px;">
++        [% END %]
 +
-                 <td width="1%" style="padding-left:10px;">
-                     <input type='checkbox' title='Select All'
-                         id='anon_selector' />
-                 </td>
-                 <td width="1%">
-                 </td>
-                 <td width="98%" style="padding-left:40px;">
-                     <strong>Title</strong>
++        <!-- loop through the holds and display status of request where appropriate -->
++        <table id='hold-items-list'>
++        [% FOR hdata IN ctx.hold_data;
++            attrs = {marc_xml => hdata.marc_xml};
++            PROCESS get_marc_attrs args=attrs %]
 +            <tr>
-         <table width='100%' style="margin-left:7px;margin-bottom:10px;">
-             <thead>
-                 <tr><td width='20'></td><td width='30'></td><td></td></tr>
-             </thead>
-             <tbody id="anonListParent">
-                 <tr id="anonListTemp">
-                   <td><input type='checkbox' name='anon_selector' /></td>
-                   <td name="curr_row"></td>
-                   <td name="title"></td>
-                 </tr>
-             </tbody>
-         </table>
-         <a href="#">Back to search results</a>
-     </div>
-     <span class='hide_me' id='format_words'>
-         <span name='at'>[% l("Books") %]</span>
-         <span name='at-d'>[% l("Large Print Books") %]</span>
-         <span name='i'>[% l("Audiobooks") %]</span>
-         <span name='g'>[% l("Video Recordings") %]</span>
-         <span name='j'>[% l("Music") %]</span>
-         <span name='m'>[% l("Electronic Resources") %]</span>
-     </span>
-     <span class='hide_me' id='holds_explain_adv'>
-         [% |l %]If you wish to broaden the scope of your hold to include other versions of this title, 
-         select the formats that would be acceptable.  The first available copy will be sent to you.[% END %]
-     </span>
++                <td>
++                    <input type="hidden" name="hold_target" value="[% hdata.target.id | html %]" />
++                    <div class='hold-items-list-title'>[% attrs.title_extended | html %]</div>
 +                </td>
 +            </tr>
++        [% END %]
 +        </table>
-     <span class='hide_me' id='holds_pick_good_org'>[% l("Please select a physical location where your hold can be delivered.") %]</span>
-     <span class='hide_me' id='hold_dup_exists'>[% l("A hold already exists on the requested item.") %]</span>
-     <span class='hide_me' id='hold_dup_exists_override'>[% l("A hold already exists on the requested item. Would you like to create the hold anyway?") %]</span>
-     <span id='hold_failed_patron_barred' class='hide_me'>
-         [% |l %]PATRON BARRED. Please see any notes in the "Staff Notes" section of your 
-         "My Account" page or contact your local library.[% END %]
-     </span>
-     <span id='invalid_hold' class='hide_me'>
-         [% |l %]This hold is no longer valid. It's likely that the target for the hold was 
-         deleted from the system.  Please cancel this hold and place a new one.[% END %]
-     </span>
-     <span id='holds_invalid_recipient' class='hide_me'>[% l("The patron barcode entered as the hold recipient is invalid.") %]</span>
 +
++        <p>
++            [% l('Pickup location:') %]
++            [% PROCESS "default/opac/parts/org_selector.tt2";
++                PROCESS build_org_selector name='pickup_lib' value=ctx.default_pickup_lib id='pickup_lib' can_have_vols_only=1 %]
++        </p>
++        <p>
++            [% |l %]If you use the Traveling Library Center (TLC) and ABC Express
++            services, please select "Outreach" to have the item delivered
++            during your scheduled visit.[% END %]
++        </p>
++        <input type="image" name="submit" value="submit" title="[% l('Submit') %]"
++            alt="[% l('Submit') %]" src="[% ctx.media_prefix %]/images/btnSubmit.png" />
++        &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
++        <a href="javascript:history.go(-1);" id="holds_cancel"><img
++            alt="[% l('Cancel') %]" src="[% ctx.media_prefix %]/images/btnCancel.png" /></a>
++    </form>
++    <br /><br />
++    <p>
++        [% |l %]* If you need your item today, and it is checked in at your
++        library, please place your hold and then call your library to set it
++        aside. Placing a hold without calling the library will increase your
++        wait time.[% END %]
++        <br /><a href="#">[% l('Library phone numbers.') %]</a>
++    </p>
++    <p>
++        [% |l %]* For best possible service, we recommend keeping 
++        a printed copy of your most recent holds list.[% END %]
++    </p>
 +</div>
++
index 0000000,0000000..ac07c0d
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,97 @@@
++[%  PROCESS "default/opac/parts/misc_util.tt2";
++    PROCESS "default/opac/parts/hold_error_messages.tt2";
++    override_possible = 0;
++%]
++
++<!-- TODO: CSS for big/strong-->
++
++<div id='holds_box' class='canvas' style='margin-top: 6px;'>
++    <h1>[% l('Place Hold') %]</h1>
++
++    <form method="POST">
++        <input type="hidden" type="name" name="override" value="1" />
++        [% FOR k IN ctx.orig_params.keys %]
++        <input type="hidden" name="[% k %]" value="[% ctx.orig_params.$k | html %]" />
++        [% END %]
++
++        <table id='hold-items-list'>
++
++        [% FOR hdata IN ctx.hold_data;
++            attrs = {marc_xml => hdata.marc_xml};
++            PROCESS get_marc_attrs args=attrs %]
++            <tr>
++                <td>
++                    [% 
++                        override = 0;
++                        IF hdata.could_override || hdata.hold_local_alert;
++                            override_possible = 1;
++                            override = 1;
++                        END;
++                    %]
++                    <input 
++                        type="checkbox" name="hold_target" value="[% hdata.target.id | html %]"
++                        [% IF override %] checked='checked' [% ELSE %] disabled='disabled' [% END %]/>
++                </td>
++                <td>
++                    <div class='hold-items-list-title'>[% attrs.title_extended | html %]</div>
++                    <div>
++                        [% IF hdata.hold_success %]
++
++                        <div>[% l("Hold was successfully placed"); %]</div>
++
++                        [% ELSIF hdata.hold_failed %]
++
++                            <div><big><strong>[% l("Hold was not successfully placed"); %]</strong></big></div>
++                            [% IF hdata.hold_local_block %]
++                                <div>[% l("There is already a copy available at your local library.") %]</div>
++                            [% ELSIF hdata.hold_failed_event || hdata.hold_local_alert %]
++                                <div>
++                                    <span class='hold-items-list-problem'>[% l('Problem:') %]</span>
++                                    <span title="[% hdata.hold_failed_event.textcode | html %]">
++                                        <em>[%
++                                                fail_part_key = hdata.hold_failed_event.payload.fail_part;
++                                                event_key = hdata.hold_failed_event.textcode;
++
++                                                # display:
++                                                l(FAIL_PART_MSG_MAP.$fail_part_key) ||
++                                                l(EVENT_MSG_MAP.$event_key) ||
++                                                l(hdata.hold_failed_event.desc) ||
++                                                hdata.hold_failed_event.payload.fail_part ||
++                                                hdata.hold_failed_event.textcode ||
++                                                (hdata.hold_local_alert ?
++                                                    l("There is already a copy available at your local library.") :
++                                                    l("Unknown problem")) | html
++                                            %]</em>
++                                            [% IF event_key == 'PERM_FAILURE' %]
++                                            <div>[% l('Permission: "[_1]"', hdata.hold_failed_event.ilsperm) | html %]</div>
++                                            [% END %]
++                                    </span>
++                                    [% IF hdata.hold_copy_available %]
++                                        <p>[%  l('Find a copy in the shelving location, "[_1]."', locname) | html %]</p>
++                                    [% END %]
++                                </div>
++                            [% END;
++                        END %]
++                    </div>
++                </td>
++            </tr>
++        [% END %]
++        </table>
++        [% IF override_possible %]
++            <br/>
++            <hr/>
++            <div class='big-strong'>
++                [% |l %]You have permission to override some of the failed holds.<br/>  Click Submit to override and place your hold on the selected items.[% END %]
++            </div>
++            <span style='padding-right: 10px;'>
++                <input type="image" name="submit" value="submit" title="[% l('Submit') %]"
++                    alt="[% l('Submit') %]" src="[% ctx.media_prefix %]/images/btnSubmit.png" />
++            </span>
++        [% END %]
++        <span>
++        <a href="[% CGI.param('redirect_to') || CGI.referer | html %]" id="holds_cancel"><img
++            alt="[% l('Cancel') %]" src="[% ctx.media_prefix %]/images/btnCancel.png" /></a>
++        </span>
++    </form>
++</div>
++
index 047b3f5,0000000..c39fd57
mode 100644,000000..100644
--- /dev/null
@@@ -1,78 -1,0 +1,78 @@@
-         [ <a href="[% ctx.opac_root %]/advanced?[% query_string %]">[%
 +[% 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="[% mkurl(ctx.opac_root _ '/advanced') %]">[%
 +            l('Click to Refine Your Original Search')
 +        %]</a> ]
 +    </div>
 +    [% END %]
 +    <div id="breadcrumb">
 +        <a href="[% ctx.opac_root %]/home">[% l('Catalog Home') %]</a> &gt;
 +    </div>
 +    <div class="clear-both"></div>
 +</div>
index 3e6d2bd,0000000..0badd80
mode 100644,000000..100644
--- /dev/null
@@@ -1,16 -1,0 +1,20 @@@
-             [% INCLUDE "default/opac/parts/place_hold.tt2" %]
 +[%  PROCESS "default/opac/parts/header.tt2";
 +    WRAPPER "default/opac/parts/base.tt2";
 +    INCLUDE "default/opac/parts/topnav.tt2";
 +    ctx.page_title = l("Place Hold") %]
 +    <div id="search-wrapper">
 +        [% INCLUDE "default/opac/parts/printnav.tt2" %]
 +        [% INCLUDE "default/opac/parts/searchbar.tt2" %]
 +    </div>
 +    <div id="content-wrapper">
 +        <div id="main-content">
 +            <div class="common-full-pad"></div>       
++            [% IF ctx.hold_attempt_made %]
++                [% INCLUDE "default/opac/parts/place_hold_result.tt2" %]
++            [% ELSE %]
++                [% INCLUDE "default/opac/parts/place_hold.tt2" %]
++            [% END %]
 +            <div class="common-full-pad"></div>       
 +        </div>
 +    </div>
 +[% END %]
index d368a70,0000000..bfe9633
mode 100644,000000..100644
--- /dev/null
@@@ -1,84 -1,0 +1,83 @@@
-                 [% UNLESS is_advanced || is_special %]
 +[%  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;
 +    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 "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="[% 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>
-                 [% END %]
 +                    <div class="results_header_lbl">[% l('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"
++                        onchange="avail_change_adv_search(this)"
 +                        [% 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>
 +    <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 %]