kcls/kpac 2.2 initial template integration
authorBill Erickson <berick@esilibrary.com>
Mon, 4 Jun 2012 19:55:50 +0000 (15:55 -0400)
committerBill Erickson <berick@esilibrary.com>
Thu, 26 Jul 2012 12:44:55 +0000 (08:44 -0400)
Signed-off-by: Bill Erickson <berick@esilibrary.com>
82 files changed:
Open-ILS/src/templates_kcls/opac/advanced.tt2 [new file with mode: 0644]
Open-ILS/src/templates_kcls/opac/cnbrowse.tt2 [new file with mode: 0644]
Open-ILS/src/templates_kcls/opac/home.tt2 [new file with mode: 0644]
Open-ILS/src/templates_kcls/opac/login.tt2 [new file with mode: 0644]
Open-ILS/src/templates_kcls/opac/mylist.tt2 [new file with mode: 0644]
Open-ILS/src/templates_kcls/opac/myopac/circ_history.tt2 [new file with mode: 0644]
Open-ILS/src/templates_kcls/opac/myopac/circs.tt2 [new file with mode: 0644]
Open-ILS/src/templates_kcls/opac/myopac/hold_history.tt2 [new file with mode: 0644]
Open-ILS/src/templates_kcls/opac/myopac/holds.tt2 [new file with mode: 0644]
Open-ILS/src/templates_kcls/opac/myopac/holds/edit.tt2 [new file with mode: 0644]
Open-ILS/src/templates_kcls/opac/myopac/lists.tt2 [new file with mode: 0644]
Open-ILS/src/templates_kcls/opac/myopac/main.tt2 [new file with mode: 0644]
Open-ILS/src/templates_kcls/opac/myopac/main_pay.tt2 [new file with mode: 0644]
Open-ILS/src/templates_kcls/opac/myopac/main_pay_init.tt2 [new file with mode: 0644]
Open-ILS/src/templates_kcls/opac/myopac/main_payment_form.tt2 [new file with mode: 0644]
Open-ILS/src/templates_kcls/opac/myopac/main_payments.tt2 [new file with mode: 0644]
Open-ILS/src/templates_kcls/opac/myopac/prefs.tt2 [new file with mode: 0644]
Open-ILS/src/templates_kcls/opac/myopac/prefs_notify.tt2 [new file with mode: 0644]
Open-ILS/src/templates_kcls/opac/myopac/prefs_settings.tt2 [new file with mode: 0644]
Open-ILS/src/templates_kcls/opac/myopac/receipt_email.tt2 [new file with mode: 0644]
Open-ILS/src/templates_kcls/opac/myopac/receipt_print.tt2 [new file with mode: 0644]
Open-ILS/src/templates_kcls/opac/myopac/update_email.tt2 [new file with mode: 0644]
Open-ILS/src/templates_kcls/opac/myopac/update_password.tt2 [new file with mode: 0644]
Open-ILS/src/templates_kcls/opac/myopac/update_username.tt2 [new file with mode: 0644]
Open-ILS/src/templates_kcls/opac/parts/advanced/expert.tt2 [new file with mode: 0644]
Open-ILS/src/templates_kcls/opac/parts/advanced/global_row.tt2 [new file with mode: 0644]
Open-ILS/src/templates_kcls/opac/parts/advanced/numeric.tt2 [new file with mode: 0644]
Open-ILS/src/templates_kcls/opac/parts/advanced/search.tt2 [new file with mode: 0644]
Open-ILS/src/templates_kcls/opac/parts/anon_list.tt2 [new file with mode: 0644]
Open-ILS/src/templates_kcls/opac/parts/banner.tt2 [new file with mode: 0644]
Open-ILS/src/templates_kcls/opac/parts/base.tt2 [new file with mode: 0644]
Open-ILS/src/templates_kcls/opac/parts/chilifresh.tt2 [new file with mode: 0644]
Open-ILS/src/templates_kcls/opac/parts/coded_value_selector.tt2 [new file with mode: 0644]
Open-ILS/src/templates_kcls/opac/parts/config.tt2 [new file with mode: 0644]
Open-ILS/src/templates_kcls/opac/parts/filtersort.tt2 [new file with mode: 0644]
Open-ILS/src/templates_kcls/opac/parts/footer.tt2 [new file with mode: 0644]
Open-ILS/src/templates_kcls/opac/parts/goog_analytics.tt2 [new file with mode: 0644]
Open-ILS/src/templates_kcls/opac/parts/header.tt2 [new file with mode: 0644]
Open-ILS/src/templates_kcls/opac/parts/hold_error_messages.tt2 [new file with mode: 0644]
Open-ILS/src/templates_kcls/opac/parts/hold_status.tt2 [new file with mode: 0644]
Open-ILS/src/templates_kcls/opac/parts/homesearch.tt2 [new file with mode: 0644]
Open-ILS/src/templates_kcls/opac/parts/js.tt2 [new file with mode: 0644]
Open-ILS/src/templates_kcls/opac/parts/login/form.tt2 [new file with mode: 0644]
Open-ILS/src/templates_kcls/opac/parts/login/help.tt2 [new file with mode: 0644]
Open-ILS/src/templates_kcls/opac/parts/login/password_hint.tt2 [new file with mode: 0644]
Open-ILS/src/templates_kcls/opac/parts/misc_util.tt2 [new file with mode: 0644]
Open-ILS/src/templates_kcls/opac/parts/myopac/base.tt2 [new file with mode: 0644]
Open-ILS/src/templates_kcls/opac/parts/myopac/main_base.tt2 [new file with mode: 0644]
Open-ILS/src/templates_kcls/opac/parts/myopac/main_refund_policy.tt2 [new file with mode: 0644]
Open-ILS/src/templates_kcls/opac/parts/myopac/prefs_base.tt2 [new file with mode: 0644]
Open-ILS/src/templates_kcls/opac/parts/myopac/prefs_hints.tt2 [new file with mode: 0644]
Open-ILS/src/templates_kcls/opac/parts/org_selector.tt2 [new file with mode: 0644]
Open-ILS/src/templates_kcls/opac/parts/place_hold.tt2 [new file with mode: 0644]
Open-ILS/src/templates_kcls/opac/parts/place_hold_result.tt2 [new file with mode: 0644]
Open-ILS/src/templates_kcls/opac/parts/printnav.tt2 [new file with mode: 0644]
Open-ILS/src/templates_kcls/opac/parts/qtype_selector.tt2 [new file with mode: 0644]
Open-ILS/src/templates_kcls/opac/parts/record/authors.tt2 [new file with mode: 0644]
Open-ILS/src/templates_kcls/opac/parts/record/awards.tt2 [new file with mode: 0644]
Open-ILS/src/templates_kcls/opac/parts/record/body.tt2 [new file with mode: 0644]
Open-ILS/src/templates_kcls/opac/parts/record/cn_details.tt2 [new file with mode: 0644]
Open-ILS/src/templates_kcls/opac/parts/record/cnbrowse.tt2 [new file with mode: 0644]
Open-ILS/src/templates_kcls/opac/parts/record/copyinfo.tt2 [new file with mode: 0644]
Open-ILS/src/templates_kcls/opac/parts/record/extras.tt2 [new file with mode: 0644]
Open-ILS/src/templates_kcls/opac/parts/record/issues.tt2 [new file with mode: 0644]
Open-ILS/src/templates_kcls/opac/parts/record/series.tt2 [new file with mode: 0644]
Open-ILS/src/templates_kcls/opac/parts/record/subjects.tt2 [new file with mode: 0644]
Open-ILS/src/templates_kcls/opac/parts/record/summary.tt2 [new file with mode: 0644]
Open-ILS/src/templates_kcls/opac/parts/record/summaryplus.tt2 [new file with mode: 0644]
Open-ILS/src/templates_kcls/opac/parts/result/facets.tt2 [new file with mode: 0644]
Open-ILS/src/templates_kcls/opac/parts/result/lowhits.tt2 [new file with mode: 0644]
Open-ILS/src/templates_kcls/opac/parts/result/lowhits_purchase.tt2 [new file with mode: 0644]
Open-ILS/src/templates_kcls/opac/parts/result/paginate.tt2 [new file with mode: 0644]
Open-ILS/src/templates_kcls/opac/parts/result/table.tt2 [new file with mode: 0644]
Open-ILS/src/templates_kcls/opac/parts/searchbar.tt2 [new file with mode: 0644]
Open-ILS/src/templates_kcls/opac/parts/tips.tt2 [new file with mode: 0644]
Open-ILS/src/templates_kcls/opac/parts/topnav.tt2 [new file with mode: 0644]
Open-ILS/src/templates_kcls/opac/parts/topnav_links.tt2 [new file with mode: 0644]
Open-ILS/src/templates_kcls/opac/parts/topnav_logo.tt2 [new file with mode: 0644]
Open-ILS/src/templates_kcls/opac/password_reset.tt2 [new file with mode: 0644]
Open-ILS/src/templates_kcls/opac/place_hold.tt2 [new file with mode: 0644]
Open-ILS/src/templates_kcls/opac/record.tt2 [new file with mode: 0644]
Open-ILS/src/templates_kcls/opac/results.tt2 [new file with mode: 0644]

diff --git a/Open-ILS/src/templates_kcls/opac/advanced.tt2 b/Open-ILS/src/templates_kcls/opac/advanced.tt2
new file mode 100644 (file)
index 0000000..23066bf
--- /dev/null
@@ -0,0 +1,30 @@
+[%  PROCESS "opac/parts/header.tt2";
+    WRAPPER "opac/parts/base.tt2";
+    INCLUDE "opac/parts/topnav.tt2";
+    ctx.page_title = l("Advanced Search");
+    pane = CGI.param("pane") || "advanced" %]
+    <div id="search-wrapper">
+        [% INCLUDE "opac/parts/printnav.tt2" %]
+        <div id="adv_search_parent">
+            <div id="adv_search_tabs">
+                <a href="?pane=advanced" alt="[% l('Advanced Search') %]" [% IF pane == 'advanced' %]class="on" [% END %]id="adv_search"></a>
+                <a href="?pane=numeric" alt="[% l('Numeric Search') %]" [% IF pane == 'numeric' %]class="on" [% END %]id="num_search"></a>
+                <a href="?pane=expert" alt="[% l('Expert Search') %]" [% IF pane == 'expert' %]class="on" [% END %]id="expert_search"></a>
+            </div>
+        </div>
+    </div>
+    <div id="content-wrapper">
+        <div id="main-content">
+            <div class="advanced_div">
+            [% IF pane == 'advanced' %]
+            [% INCLUDE "opac/parts/advanced/search.tt2" %]
+            [% ELSIF pane == 'numeric' %]
+            [% INCLUDE "opac/parts/advanced/numeric.tt2" %]
+            [% ELSIF pane == 'expert' %]
+            [% INCLUDE "opac/parts/advanced/expert.tt2" %]
+            [% END %]
+            </div>
+            <div class="common-full-pad"></div>        
+        </div>
+    </div>
+[% END %]
diff --git a/Open-ILS/src/templates_kcls/opac/cnbrowse.tt2 b/Open-ILS/src/templates_kcls/opac/cnbrowse.tt2
new file mode 100644 (file)
index 0000000..6e0ad0b
--- /dev/null
@@ -0,0 +1,21 @@
+[%  # This is the stand-alone call-number browser.  This mainly wraps around
+    # the same guts as the "shelf browser" part of a record results page.
+
+    PROCESS "opac/parts/header.tt2";
+    PROCESS "opac/parts/misc_util.tt2";
+    WRAPPER "opac/parts/base.tt2";
+    INCLUDE "opac/parts/topnav.tt2";
+    ctx.page_title = l("Call Number Browse"); %]
+    <div id="search-wrapper">
+        [% INCLUDE "opac/parts/printnav.tt2" %]
+        [% INCLUDE "opac/parts/searchbar.tt2" %]
+    </div>
+    <div id="content-wrapper">
+        <div id="main-content">
+            <div class="cnbrowse_div">
+                [% INCLUDE "opac/parts/record/cnbrowse.tt2" %]
+            </div>
+            <div class="common-full-pad"></div>        
+        </div>
+    </div>
+[% END %]
diff --git a/Open-ILS/src/templates_kcls/opac/home.tt2 b/Open-ILS/src/templates_kcls/opac/home.tt2
new file mode 100644 (file)
index 0000000..fa64e65
--- /dev/null
@@ -0,0 +1,16 @@
+[%  PROCESS "opac/parts/header.tt2";
+    WRAPPER "opac/parts/base.tt2";
+    INCLUDE "opac/parts/topnav.tt2";
+    ctx.page_title = l("Home") %]
+    <div id="search-wrapper">
+        [% INCLUDE "opac/parts/printnav.tt2" %]
+        [% INCLUDE "opac/parts/searchbar.tt2" %]
+    </div>
+    <div id="content-wrapper">
+        <div id="main-content-home">
+            <div class="common-full-pad"></div>
+            [% INCLUDE "opac/parts/homesearch.tt2" %]
+            <div class="common-full-pad"></div>        
+        </div>
+    </div>
+[% END %]
diff --git a/Open-ILS/src/templates_kcls/opac/login.tt2 b/Open-ILS/src/templates_kcls/opac/login.tt2
new file mode 100644 (file)
index 0000000..b5741e2
--- /dev/null
@@ -0,0 +1,27 @@
+[%  PROCESS "opac/parts/header.tt2";
+    WRAPPER "opac/parts/base.tt2";
+    INCLUDE "opac/parts/topnav.tt2";
+    ctx.page_title = l("Account Login") %]
+    <div id="search-wrapper">
+        [% INCLUDE "opac/parts/printnav.tt2" %]
+        [% INCLUDE "opac/parts/searchbar.tt2" %]
+    </div>
+    <div id="content-wrapper">
+        <div id="main-content">
+            [% INCLUDE "opac/parts/login/form.tt2" %]
+            <div class="clear-both very-big-height"></div>     
+            <script type="text/javascript">
+                /* Note: when common browsers suppor HTML5 "autofocus", we can remove this */
+                var _onload = window.onload;
+                window.onload = function() {
+                    try {
+                        document.getElementById("username_field").focus();
+                        if (_onload) _onload();
+                    } catch (E) {
+                        void(0);
+                    }
+                };
+            </script>
+        </div>
+    </div>
+[% END %]
diff --git a/Open-ILS/src/templates_kcls/opac/mylist.tt2 b/Open-ILS/src/templates_kcls/opac/mylist.tt2
new file mode 100644 (file)
index 0000000..ac24efd
--- /dev/null
@@ -0,0 +1,20 @@
+[%  PROCESS "opac/parts/header.tt2";
+    PROCESS "opac/parts/misc_util.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>
+    <div id="content-wrapper">
+        <div id="main-content">
+            [%  IF ctx.mylist.size;
+                    INCLUDE "opac/parts/anon_list.tt2";
+                ELSE %]
+                <div class="opac-auto-171 opac-auto-097">[% l("You have not created a list yet."); %]</div>
+                [% END %]
+            <div class="common-full-pad"></div>        
+        </div>
+    </div>
+[% END %]
diff --git a/Open-ILS/src/templates_kcls/opac/myopac/circ_history.tt2 b/Open-ILS/src/templates_kcls/opac/myopac/circ_history.tt2
new file mode 100644 (file)
index 0000000..47d1a4a
--- /dev/null
@@ -0,0 +1,106 @@
+[%  PROCESS "opac/parts/header.tt2";
+    PROCESS "opac/parts/misc_util.tt2";
+    WRAPPER "opac/parts/myopac/base.tt2";
+    myopac_page = "circs"
+    limit = ctx.circ_history_limit;
+    offset = ctx.circ_history_offset;
+%]
+
+<div style="padding:0px;">
+    
+    <div id="acct_checked_tabs" style="padding-bottom: 12px;color:#666;">
+        <div class="align selected">
+            <a href='circs'><img src="[% ctx.media_prefix %]/images/sub_checked_out_off.jpg"/></a>
+        </div>
+        <div class="align">
+            <img src="[% ctx.media_prefix %]/images/sub_checked_hist_on.jpg"/>
+        </div>
+        <div class="clear-both"></div>
+    </div>
+
+    <div class="header_middle">
+        <span class="float-left">[% l('Previously Checked Out Items') %]</span>
+        <span class='float-left' style='padding-left: 10px;'>
+            <a href='circ_history?limit=[% limit %]&amp;offset=[% offset - limit %]'
+                [% IF offset == 0 %] class='invisible' [% END %]><span class="nav_arrow_fix">&#9668;</span>[% l('Previous') %]</a>
+            [%# TODO: get total to prevent paging off then end of the list.. %]
+            <a href='circ_history?limit=[% limit %]&amp;offset=[% offset + limit %]'
+               [% IF ctx.circs.size < limit %] class='invisible' [% END %] >[% l('Next') %]<span class="nav_arrow_fix">&#9658;</span></a>
+        </span>
+        <span class="float-right">
+            <a class="hide_me" href="#">[% l('Export List') %]</a>
+        </span>
+    </div>
+    <div class="clear-both"></div>
+
+    [% IF ctx.circs.size < 1 %]
+    <div class="opac-auto-079">
+        <big><strong>[% l('There are no items in your circulation history.') %]</strong></big>
+    </div>
+    [% ELSE %]
+
+    <div id='checked_main'>
+        <table style='border-collapse:collapse;'>
+            <thead id="acct_checked_main_header">
+                <tr>
+                    <td width="32%" style="padding-left:5px;">
+                        <span title="Click to sort" class='pointer'>[% l('Title') %]</span> /
+                        <span title="Click to sort" class='pointer'>[% l('Author') %]</span>
+                    </td>
+                    <td width="10%" style="padding-left:5px;">
+                        <span title="Click to sort" class='pointer'>[% l('Checkout Date') %]</span>
+                    </td>
+                    <td width="10%" style="padding-left:5px;">
+                        <span title="Click to sort" class='pointer'>[% l('Due Date') %]</span>
+                    </td>
+                    <td width="10%" style="padding-left:5px;">
+                        <span title="Click to sort" class='pointer'>[% l('Date Returned') %]</span>
+                    </td>
+                    <td width="16%">
+                        <span title="Click to sort" class='pointer'>[% l('Barcode') %]</span>
+                    </td>
+                    <td width="22%">
+                        <span title="Click to sort" class='pointer'>[% l('Call Number') %]</span>
+                    </td>
+                </tr>
+            </thead>
+            <tbody>
+                [% FOR circ IN ctx.circs;
+                    attrs = {marc_xml => circ.marc_xml};
+                    PROCESS get_marc_attrs args=attrs; %]
+                    <tr>
+                        <td style="padding-left:5px;padding-bottom:10px;">
+                            <a href="[% ctx.opac_root %]/record/[% circ.circ.target_copy.call_number.record.id %]" 
+                                name="[% l('Catalog record') %]">[% attrs.title | html %]</a>
+                            [% IF attrs.author %] /
+                            <a href="[% ctx.opac_root %]/results?qtype=author&amp;query=[% attrs.author | replace('[,\.:;]', '') | url %]">[% attrs.author | html %]</a>
+                            [% END %]
+                        </td>
+                        <td style="padding-left:5px;">
+                            [% date.format(ctx.parse_datetime(circ.circ.xact_start),DATE_FORMAT); %]
+                        </td>
+                        <td style="padding-left:5px;">
+                            [% date.format(ctx.parse_datetime(circ.circ.due_date),DATE_FORMAT); %]
+                        </td>
+                        <td style="padding-left:5px;">
+                            [% 
+                                IF circ.circ.checkin_time; 
+                                    IF circ.circ.stop_fines == 'RENEW';
+                                        l('renewed');
+                                    ELSE;
+                                        date.format(ctx.parse_datetime(circ.circ.checkin_time),DATE_FORMAT); 
+                                    END;
+                                ELSE; %]
+                                <span style='color:blue;'>*</span><!-- meh -->
+                            [% END; %]
+                        </td>
+                        <td>[% circ.circ.target_copy.barcode | html %]</td>
+                        <td>[% circ.circ.target_copy.call_number.label | html %]</td>
+                    </tr>
+                [% END %]
+            </tbody>
+        </table>
+    </div>
+    [% END %]
+</div>
+[% END %]
diff --git a/Open-ILS/src/templates_kcls/opac/myopac/circs.tt2 b/Open-ILS/src/templates_kcls/opac/myopac/circs.tt2
new file mode 100644 (file)
index 0000000..a079f83
--- /dev/null
@@ -0,0 +1,155 @@
+[%  PROCESS "opac/parts/header.tt2";
+    PROCESS "opac/parts/misc_util.tt2";
+    WRAPPER "opac/parts/myopac/base.tt2";
+    myopac_page = "circs"  %]
+<div id='myopac_checked_div' style="padding:0px;">
+
+    <div id="acct_checked_tabs" style="padding-bottom: 12px;color:#666;">
+        <div class="align selected">
+            <img src="[% ctx.media_prefix %]/images/sub_checked_out_on.jpg" />
+        </div>
+        <div class="align">
+            <a href="circ_history"><img
+                src="[% ctx.media_prefix %]/images/sub_checked_hist_off.jpg" /></a>
+        </div>
+        <div class="clear-both"></div>
+    </div>
+
+    <div class="header_middle">
+        <span class="float-left">[% l('Current Items Checked Out') %]</span>
+        <span class="float-right">
+            <a class="hide_me" href="#">[% l('Export List') %]</a>
+        </span>
+    </div>
+    <div class="clear-both"></div>
+    [% IF ctx.circs.size < 1 %]
+    <div class="opac-auto-079">
+        <big><strong>[% l('You have no items checked out.') %]</strong></big>
+    </div>
+    [% ELSE %]
+    [% IF ctx.success_renewals %]
+    <div class="renew-summary">
+        [% l("Successfully renewed [_1] item(s)", ctx.success_renewals) %]
+    </div>
+    [% END %]
+    [% IF ctx.failed_renewals %]
+    <div class="renew-summary red">
+        [% l("Failed to renew [_1] item(s)", ctx.failed_renewals) %]
+    </div>
+    [% END %]
+    <div id='checked_main'>
+        <form method="POST" id="circ-form"
+            onsubmit="return confirm('[% l("Are you sure you wish to renew the selected item(s)?") %]');">
+            <div style='padding:5px;'>
+                <input name='action' value='renew' type='hidden'/>
+                <input type='image' src='[% ctx.media_prefix %]/images/renewselected.png'/>
+            </div>
+        <table id="acct_checked_main_header" cellpadding='0' cellspacing='0'
+            border='0'>
+            <tr>
+                <td width="1%" style="padding-left:10px;">
+                    <input type="checkbox" id="check_all_checked"
+                        onclick="var inputs=document.getElementsByTagName('input'); for (i = 0; i < inputs.length; i++) { if (inputs[i].name == 'circ' && !inputs[i].disabled) inputs[i].checked = this.checked;}"
+                    />
+                </td>
+                <td width="40%" style="padding-left:5px;">
+                    <span title="Click to sort" class='pointer'>
+                        Title
+                    </span> /
+                    <span title="Click to sort" class='pointer'>
+                        Author
+                    </span>
+                </td>
+                <td width="8%" style="padding-right:5px;" align="center">
+                    <span title="Click to sort" class='pointer'>Renews<br />Left
+                    </span>
+                </td>
+                <td width="13%" style="padding-left:5px;">
+                    <span title="Click to sort" class='pointer'>Due Date</span>
+                </td>
+                <td width="16%">
+                    <span title="Click to sort" class='pointer'>barcode</span>
+                </td>
+                <td width="22%">
+                    <span title="Click to sort" class='pointer'>call number</span>
+                </td>
+            </tr>
+        </table>
+   
+        <div id="checked_temp_parent">
+            <div id="acct_checked_temp">
+                <table cellpadding='0' cellspacing='0' border='0'
+                    style="margin-top:5px;">
+                    [% FOR circ IN ctx.circs;
+                        attrs = {marc_xml => circ.marc_xml};
+                        PROCESS get_marc_attrs args=attrs; %]
+                    <tr>
+                        <td width="1%" style="padding-left:10px;" valign="top">
+                            <input type="checkbox" name="circ"
+                                [% IF circ.circ.renewal_remaining < 1; l('disabled="disabled"'); END %]
+                                value="[% circ.circ.id %]" />
+                        </td>
+                        <td width="40%"
+                            style="padding-left:5px;padding-bottom:10px;"
+                            name="author">
+                            <a href="[% ctx.opac_root %]/record/[% circ.circ.target_copy.call_number.record.id %]" name="[% l('Catalog record') %]">[% attrs.title | html %]</a>
+                            [% IF attrs.author %] /
+                            <a href="[% ctx.opac_root %]/results?qtype=author&amp;query=[% attrs.author | replace('[,\.:;]', '') | url %]">[% attrs.author | html %]</a>
+                            [% END %]
+                        </td>
+                        <td width="8%" name="renewals" align="center">
+                            [% circ.circ.renewal_remaining %]
+                        </td>
+                        [%
+                            due_date = ctx.parse_datetime(circ.circ.due_date);
+                            due_class = (date.now > date.format(due_date, '%s')) ? 'error' : '';
+                        %]
+                        <td width="13%" style="padding-left:5px;" name="due_date" class='[% due_class %]'>
+                            [% date.format(due_date, DATE_FORMAT) %]
+                        </td>
+                        <td width="16%" name="barcode">
+                            [% circ.circ.target_copy.barcode | html %]
+                        </td>
+                        <td width="22%" name="call_number">
+                            [% circ.circ.target_copy.call_number.label | html %]
+                        </td>
+                    </tr>
+                    [%  IF circ.renewal_response AND
+                            circ.renewal_response.textcode != 'SUCCESS' %]
+                    <tr>
+                        <td colspan="6">[%# XXX colspan="0" does not work in IE %]
+                            <span class="failure-text" title="[% circ.renewal_response.textcode | html %] / [% circ.renewal_response.payload.fail_part | html %]">
+                                [% (circ.renewal_response.desc || circ.renewal_response.payload.fail_part || circ.renewal_response.textcode) | html %]
+                            </span>
+                        </td>
+                    </tr>
+                    [%  END;
+                    END %]
+                </table>
+            </div>
+        </div>
+        </form>
+    </div>
+    [% END %]
+    <div id='non_cat_circs_div' class='hide_me'>
+        <br/>
+        <div style='text-align: center'><b>[% l("Other Circulations") %]</b></div>
+        <table class='data_grid' width='100%'>
+            <thead>
+                <tr>
+                    <td>[% l("Circulating Library") %]</td>
+                    <td>[% l("Circulation Type") %]</td>
+                    <td>[% l("Please return by ...") %]</td>
+                </tr>
+            </thead>
+            <tbody id='non_cat_circs_tbody'>
+                <tr id='non_cat_circs_row'>
+                    <td name='circ_lib'/>
+                    <td name='item_type'/>
+                    <td name='circ_time'/>
+                </tr>
+            </tbody>
+        </table>
+    </div>
+</div>
+[% END %]
diff --git a/Open-ILS/src/templates_kcls/opac/myopac/hold_history.tt2 b/Open-ILS/src/templates_kcls/opac/myopac/hold_history.tt2
new file mode 100644 (file)
index 0000000..548cf3e
--- /dev/null
@@ -0,0 +1,90 @@
+[%  PROCESS "opac/parts/header.tt2";
+    PROCESS "opac/parts/misc_util.tt2";
+    PROCESS "opac/parts/hold_status.tt2";
+    WRAPPER "opac/parts/myopac/base.tt2";
+    myopac_page = "holds";
+    limit = ctx.hold_history_limit;
+    offset = ctx.hold_history_offset;
+%]
+
+<div id='myopac_holds_div'>
+
+    <div id="acct_holds_tabs" style="padding-bottom: 12px;color:#666;">
+        <div class="align selected">
+            <a href='holds'><img src="[% ctx.media_prefix %]/images/sub_holds_off.jpg"/></a>
+        </div>
+        <div class="align">
+            <img src="[% ctx.media_prefix %]/images/sub_holds_hist_on.jpg"/>
+        </div>
+        <div class="clear-both"></div>
+    </div>
+
+    <div class="header_middle">
+        <span style="float:left;">[% l("Previously Held Items") %]</span>
+        <span class='float-left' style='padding-left: 10px;'>
+            <a href='hold_history?limit=[% limit %]&amp;offset=[% offset - limit %]'
+                [% IF offset == 0 %] class='invisible' [% END %]><span class="nav_arrow_fix">&#9668;</span>[% l('Previous') %]</a>
+            [%# TODO: get total to prevent paging off then end of the list.. %]
+            <a href='hold_history?limit=[% limit %]&amp;offset=[% offset + limit %]'
+               [% IF ctx.holds.size < limit %] class='invisible' [% END %] >[% l('Next') %]<span class="nav_arrow_fix">&#9658;</span></a>
+        </span>
+        <span style="float:right;">
+            <a class="hide_me" href="#">Export List</a>
+        </span>
+    </div>
+    <div class="clear-both"></div>
+
+    <div id='holds_main'>
+        [% IF ctx.holds.size < 1 %]
+        <div class="opac-auto-079">
+            <big><strong>[% l('No holds found.') %]</strong></big>
+        </div>
+        [% ELSE %]
+        <table style='border-collapse:collapse; width: 100%;'>
+            <thead id='acct_holds_main_header'>
+                <tr>
+                    <td><span>[% l('Title') %]</span></td>
+                    <td><span>[% l('Author') %]</span></td>
+                    <td><span>[% l('Format') %]</span></td>
+                    <td><span>[% l('Date Placed') %]</span></td>
+                    <td><span>[% l('Pickup Location') %]</span> </td>
+                </tr>
+            </thead>
+            <tbody>
+                [% FOR hold IN ctx.holds;
+                    attrs = {marc_xml => hold.marc_xml};
+                    PROCESS get_marc_attrs args=attrs;
+                    ahr = hold.hold.hold %]
+
+                <tr id="acct_holds_temp" name="acct_holds_temp" class="acct_holds_temp">
+
+                    <td width="138">
+                        <div style="margin-top:10px;margin-bottom:10px;">
+                            <a href="[% ctx.opac_root %]/record/[% hold.hold.bre_id %]">[% attrs.title_extended | html %]</a>
+                        </div>
+                    </td>
+                    <td width="123">
+                        <div style="margin-top:10px;margin-bottom:10px;">
+                            <a href="[% ctx.opac_root %]/results?qtype=author&amp;query=[% attrs.author | replace('[,\.:;]', '') | url %]">[% attrs.author | html %]</a>
+                        </div>
+                    </td>
+                    <td width="64">
+                        <div style="width:26px;height:23px;margin-top:6px;margin-bottom:6px;">
+                            [% IF attrs.format_icon %]
+                            <img title="[% attrs.format_label | html %]" alt="[% attrs.format_label | html %]" src="[% attrs.format_icon %]" />
+                            [% END %]
+                        </div>
+                    </td>
+                    <td width="123">
+                        [% date.format(ctx.parse_datetime(ahr.request_time), DATE_FORMAT) %]
+                    </td>
+                    <td width="136">
+                        [% ctx.get_aou(ahr.pickup_lib).name | html %]
+                    </td>
+                </tr>
+                [% END %]
+            </tbody>
+        </table>
+        [% END %]
+    </div>
+[% END %]
diff --git a/Open-ILS/src/templates_kcls/opac/myopac/holds.tt2 b/Open-ILS/src/templates_kcls/opac/myopac/holds.tt2
new file mode 100644 (file)
index 0000000..807f22d
--- /dev/null
@@ -0,0 +1,232 @@
+[%  PROCESS "opac/parts/header.tt2";
+    PROCESS "opac/parts/misc_util.tt2";
+    PROCESS "opac/parts/hold_status.tt2";
+    WRAPPER "opac/parts/myopac/base.tt2";
+    myopac_page = "holds"  %]
+<div id='myopac_holds_div'>
+
+    <div id="acct_holds_tabs" style="padding-bottom: 12px;color:#666;">
+        <div class="align selected">
+            <img src="[% ctx.media_prefix %]/images/sub_holds_on.jpg"/>
+        </div>
+        <div class="align">
+            <a href='hold_history'><img src="[% ctx.media_prefix %]/images/sub_holds_hist_off.jpg"/></a>
+        </div>
+        <div class="clear-both"></div>
+    </div>
+
+    <div class="header_middle">
+        <span id="acct_holds_header" style="float:left;">
+            [%  IF CGI.param("available");
+                    l("Items Ready for Pickup");
+                ELSE;
+                    l("Current Items on Hold");
+                END
+            %]
+        </span>
+        <span style="float:right;">
+            <a class="hide_me" href="#">Export List</a>
+        </span>
+    </div>
+    <div class="clear-both"></div>
+    <div id='holds_main'>
+        <form method="POST">
+        <table cellpadding='0' cellspacing='0' class="opac-auto-097">
+            <tr>
+                <td width="1">
+                    <select name="action" id="acct_holds_actions">
+                        <option id='myopac_holds_actions_none' value=''>
+                        -- [% l("Actions for selected holds") %] --
+                        </option>
+                        <option value='suspend'>
+                            [% l("Suspend") %]
+                        </option>
+                        <option value='activate'>
+                            [% l("Activate") %]
+                        </option>
+                        <!-- XXX maybe later <option value='thaw_date'>
+                            [% l("Set Active Date") %]
+                        </option> -->
+                        <option value='cancel'>
+                            [% l("Cancel") %]
+                        </option>
+                    </select>
+                </td>
+                <td width="1" style="padding-left:9px;">
+                    <input type="image"
+                        alt="[% l('Go') %]" title="[% l('Go') %]"
+                        src="[% ctx.media_prefix %]/images/go-btn.png" />
+                </td>
+                <td width="1" style="padding-left:5px;">
+                    <a href="#"><img
+                        alt="Holds Help"
+                        src="[% ctx.media_prefix %]/images/question-mark.png" /></a>
+                </td>
+                <td style="padding-left:5px;" class='error'>
+                    [%  IF ctx.hold_suspend_post_capture;
+                            l('One or more holds could not be suspended because<br/>the item is at (or en route to) the pickup library.');
+                        END;
+                    %]
+                </td>
+                <td align="right">
+                    [% l("Show") %] &nbsp; &nbsp;
+                    [% IF CGI.param("available") %]
+                    <a href="holds">[% l('all') %]</a> |
+                    <strong>[% l("only available") %]</strong>
+                    [% ELSE %]
+                    <strong>[% l("all") %]</strong> |
+                    <a href="holds?available=1">[% l("only available") %]</a>
+                    [% END %] &nbsp; &nbsp;
+                    [% l("holds") %]
+                    <select class="hide_me" id="holds_sort">
+                        <option value="">-- Sort By --</option>
+                        <option value="title">Title</option>
+                        <option value="pickup">PickUp Location</option>
+                        <option value="status">Status</option>
+                    </select>
+                </td>
+            </tr>
+        </table>
+        [% IF ctx.holds.size < 1 %]
+        <div class="opac-auto-079">
+            <big><strong>[% l('No holds found.') %]</strong></big>
+        </div>
+        [% ELSE %]
+        <table id="acct_holds_main_header" cellpadding='0' cellspacing='0'
+            border='0' width="100%">
+            <tr>
+                <td width="36" align="center">
+                    <input type="checkbox" onclick="var inputs=document.getElementsByTagName('input'); for (i = 0; i < inputs.length; i++) { if (inputs[i].name == 'hold_id' && !inputs[i].disabled) inputs[i].checked = this.checked;}"/>
+                </td>
+                <td width="138">
+                    <span title="Click to sort"
+                        style="cursor:pointer;">
+                        Title
+                    </span>
+                </td>
+                <td width="123">
+                    <span title="Click to sort" style="cursor:pointer;">Author</span>
+                </td>
+                <td width="64">
+                    <span title="Click to sort"
+                        style="cursor:pointer;">Format</span>
+                </td>
+                <td width="136">
+                    <span title="Click to sort"
+                        style="cursor:pointer;">Pickup Location</span>
+                </td>
+                <td width="104">Activate</td>
+                <td width="106">Cancel if not<br />filled by</td>
+                <td width="95">Active</td>
+                <td width="172">
+                    <span title="Click to sort"
+                        style="cursor:pointer;">Status</span>
+                </td>
+            </tr>
+        </table>
+        <div class="hide_me">
+            <select id="hold_pickup_lib_temp" name="hold_pickup_lib_sel"
+                class="hide_me" style="width:125px;height:21px;"></select>
+        </div>
+
+        <table cellpadding='0' cellspacing='0' border='0' width="100%">
+            <tbody id="holds_temp_parent">
+                [% FOR hold IN ctx.holds;
+                    attrs = {marc_xml => hold.marc_xml};
+                    PROCESS get_marc_attrs args=attrs;
+                    ahr = hold.hold.hold %]
+                <tr id="acct_holds_temp" name="acct_holds_temp"
+                    class="acct_holds_temp[% ahr.frozen == 't' ? ' inactive-hold' : '' %]">
+                    <td width="36" align="center" style="text-align:center;">
+                        <input type="checkbox" name="hold_id" value="[% ahr.id %]" />
+                    </td>
+                    <td width="138">
+                        <div style="margin-top:10px;margin-bottom:10px;">
+                            <a href="[% ctx.opac_root %]/record/[% hold.hold.bre_id %]">[% attrs.title_extended | html %]</a>
+                        </div>
+                    </td>
+                    <td width="123">
+                        <div style="margin-top:10px;margin-bottom:10px;">
+                            <a href="[% ctx.opac_root %]/results?qtype=author&amp;query=[% attrs.author | replace('[,\.:;]', '') | url %]">[% attrs.author | html %]</a>
+                        </div>
+                    </td>
+                    <td width="64">
+                        <div style="width:26px;height:23px;margin-top:6px;margin-bottom:6px;">
+                            [% IF attrs.format_icon %]
+                            <img title="[% attrs.format_label | html %]" alt="[% attrs.format_label | html %]" src="[% attrs.format_icon %]" />
+                            [% END %]
+                        </div>
+                    </td>
+                    <td width="136">
+                        [% ctx.get_aou(ahr.pickup_lib).name | html %]
+                    </td>
+                    <td width="104">
+                        <!-- <input
+                            title="Enter a date (e.g. 10/21/2010)"
+                            class="hide_me" style="width:91px;"
+                            name="activate_box" type="text" /> -->
+                        [% IF ahr.frozen == 't' AND
+                                ahr.thaw_date;
+                            date.format(ctx.parse_datetime(ahr.thaw_date), DATE_FORMAT);
+                        END %]
+                    </td>
+                    <td width="106">
+                        <!-- <input title="[% l('Enter a date (e.g. 10/21/2010)') %]"
+                            class="hide_me" style="width:91px;"
+                            name="hold_expires_box" type="text" />-->
+                        [% IF ahr.expire_time;
+                            date.format(ctx.parse_datetime(ahr.expire_time), DATE_FORMAT);
+                        END %]
+                    </td>
+                    <td width="95">
+                        <!-- <select name="hold_active_sel"
+                            style="width:90px;" class="hide_me">
+                            <option value="f">Active</option>
+                            <option value="t">Suspended</option>
+                        </select> -->
+                        [% l(ahr.frozen == 'f' ? 'Active' : 'Suspended') %]
+                    </td>
+                    <td width="110">
+                        <div name="acct_holds_status"
+                            style="margin-top:10px;margin-bottom:10px;">
+                            [% PROCESS get_hold_status hold=hold; %]
+                        </div>
+                    </td>
+                    <td class="opac-auto-161">
+                        <a href="[% ctx.opac_root %]/myopac/holds/edit?id=[% ahr.id %]">Edit</a>
+                    </td>
+                </tr>
+                [% END %]
+            </tbody>
+        </table>
+        [% END %]
+        </form>
+    </div>
+
+    <span id='myopac.holds.cancel.confirm' class='hide_me'>[% l("Are you sure you wish to cancel the selected holds?") %]</span>
+    <span id='myopac.holds.freeze.confirm' class='hide_me'>[% l("Are you sure you wish to suspend the selected holds?  If an item has already been selected to fulfill the hold, it will not be suspended") %]</span>
+    <span id='myopac.holds.thaw.confirm' class='hide_me'>[% l("Are you sure you wish to activate the selected holds?") %]</span>
+    <span id='myopac.holds.thaw_date.confirm' class='hide_me'>[% l("Are you sure you wish to change the activate date for the selected holds?") %]</span>
+    <span id='myopac.holds.freeze.select_thaw' class='hide_me'>[% l("Select an automatic activation date.  If no date is chosen, the holds will remain suspended until they are manually activated.") %]</span>
+
+    <table width='100%' id='myopac_holds_processing' class='hide_me'>
+        <tr><td>[% l("Processing holds... This may take a moment.") %]</td></tr>
+    </table>
+   
+    <span class='hide_me' id='myopac_holds_cancel_verify'>
+       [% l("If you wish to cancel the selected hold, click OK, otherwise click Cancel.") %]
+    </span>
+</div>
+<div id='myopac_holds_thaw_date_form' class='hide_me'>
+    <div id='myopac_holds_freeze_select_thaw'>
+        [% l("Select an automatic activation date.  If no date is chosen, the holds will remain suspended until they are manually activated.") %]
+    </div>
+    <p>
+        <input size='10' maxlength='10'
+            type='text' id='myopac_holds_thaw_date_input' />
+    </p>
+    <p>
+        <button>[% l("Submit") %]</button>
+    </p>
+</div>
+[% END %]
diff --git a/Open-ILS/src/templates_kcls/opac/myopac/holds/edit.tt2 b/Open-ILS/src/templates_kcls/opac/myopac/holds/edit.tt2
new file mode 100644 (file)
index 0000000..ae91431
--- /dev/null
@@ -0,0 +1,117 @@
+[%  PROCESS "opac/parts/header.tt2";
+    PROCESS "opac/parts/misc_util.tt2";
+    PROCESS "opac/parts/hold_status.tt2";
+    PROCESS "opac/parts/org_selector.tt2";
+    WRAPPER "opac/parts/myopac/base.tt2";
+    myopac_page = "holds"; # in this case, just for tab coloring.
+
+    hold = ctx.holds.0;
+    ahr = hold.hold.hold;
+    attrs = {marc_xml => hold.marc_xml};
+    PROCESS get_marc_attrs args=attrs;
+    hold.human_status = PROCESS get_hold_status hold=hold;
+
+    # Do this up front to avoid verbosity later
+    expire_time = ahr.expire_time ? date.format(ctx.parse_datetime(ahr.expire_time), DATE_FORMAT) : '';
+    thaw_date = ahr.thaw_date ? date.format(ctx.parse_datetime(ahr.thaw_date), DATE_FORMAT) : '';
+%]
+<div class="pad-bottom-five">
+    <div class="header_middle">
+        <span id="acct_holds_header float-left">[% l('Editing Hold') %]</span>
+        &nbsp; &nbsp; &nbsp; &nbsp;
+        <a href="[% ctx.opac_root %]/myopac/holds">[% l('List all holds') %]</a>
+    </div>
+    <div id="hold_editor">
+        [% IF hold %]
+            <h1>[% attrs.title | html %]</h1>
+            <h2>[% attrs.author | html %]</h2>
+            [% IF attrs.format_icon %]<p>
+                <strong>[% l('Format:') %]</strong>
+                <img src="[% attrs.format_icon %]" alt="[% attrs.format_label | html %]" title="[% attrs.format_label | html %]" />
+            </p>[% END %]
+            <p>
+                <strong>[% l('Status') %]</strong>: [% hold.human_status %]
+            </p>
+            <form method="POST">
+                <table id="hold_editor_table">
+                    <tr>
+                        <th>
+                            <input type="hidden" name="action" value="edit" />
+                            <input type="hidden" name="hold_id"
+                                value="[% ahr.id %]" />
+                            [% l('Pickup library') %]
+                        </th>
+                        <td>
+                            [% PROCESS build_org_selector
+                                name='pickup_lib' value=ahr.pickup_lib can_have_vols_only=1 hold_pickup_lib=1 %]
+                        </td>
+                    </tr>
+                    [% IF hold.hold.status < 3 %]
+                    [%# The following actions cannot be performed on holds that 
+                        have already been captured... %]
+                    <tr>
+                        <th>
+                            [% l('Cancel unless filled by') %]
+                        </th>
+                        <td>
+                            <input type="text" name="expire_time"
+                                value="[% expire_time | html %]" />
+                        </td>
+                        <td class="fmt-note">
+                            <em>[% l('Enter date in MM/DD/YYYY format') %]</em>
+                            <!-- XXX TODO pick out a minimal, simple, reliable
+                            calendar widget that's not part of some giant,
+                            bloated framework and doesn't do anything at onload.
+                            -->
+                        </td>
+                    </tr>
+                    <tr>
+                        <th>
+                            [% l('Active?') %]
+                        </th>
+                        <td>
+                            <select name="frozen">
+                                <option value="f"[% ahr.frozen == 't' ? '' :' selected="selected"' %]>
+                                    [% l('Yes, this hold is active now') %]
+                                </option>
+                                <option value="t"[% ahr.frozen == 't' ? ' selected="selected"' : '' %]>
+                                    [% l('No, this hold is suspended') %]
+                                </option>
+                            </select>
+                        </td>
+                    </tr>
+                    <tr>
+                        <th>
+                            [% l('If suspended, activate on') %]
+                        </th>
+                        <td>
+                            <input type="text" name="thaw_date"
+                                value="[% thaw_date | html %]" />
+                        </td>
+                        <td class="fmt-note">
+                            <em>[% l('Enter date in MM/DD/YYYY format') %]</em>
+                        </td>
+                    </tr>
+                    [% END %]
+                    <tr>
+                        <td class="hold-editor-controls">
+                            <a href="[% ctx.opac_root %]/myopac/holds"><img
+                                src="[% ctx.media_prefix %]/images/GOBACK.png"
+                                alt="[% l('Cancel') %]"
+                                title="[% l('Cancel') %]" /></a>
+                        </td>
+                        <td class="hold-editor-controls">
+                            <input type="image"
+                                src="[% ctx.media_prefix %]/images/btnSubmit.png"
+                                alt="[% l('Submit') %]"
+                                title="[% l('Submit') %]" />
+                        </td>
+                    </tr>
+                </table>
+            </form>
+        [% ELSE;
+            l('Hold not found');
+        END %]
+    </div>
+</div>
+[% END %]
diff --git a/Open-ILS/src/templates_kcls/opac/myopac/lists.tt2 b/Open-ILS/src/templates_kcls/opac/myopac/lists.tt2
new file mode 100644 (file)
index 0000000..32299a1
--- /dev/null
@@ -0,0 +1,194 @@
+[%  PROCESS "opac/parts/header.tt2";
+    PROCESS "opac/parts/misc_util.tt2";
+    WRAPPER "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 "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++) { 
+                                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="opac-auto-179" name="action">
+                                <option>[% l('-- Actions for this list --') %]</option>
+                                <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;">
+                            <a href="[% mkurl(ctx.opac_root _ '/record/' _ rec_id) %]">[% attrs.title | html %]</a>
+                        </td>
+                        <td class="item_list_padding">
+                            <a href="[%- 
+                                authorquery = attrs.author | replace('[,\.:;]', '');
+                                mkurl(ctx.opac_root _ '/results', {qtype => 'author', query => authorquery}, ['page'])
+                                -%]">[% attrs.author | html %]</a>
+                        </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 %]
diff --git a/Open-ILS/src/templates_kcls/opac/myopac/main.tt2 b/Open-ILS/src/templates_kcls/opac/myopac/main.tt2
new file mode 100644 (file)
index 0000000..363ffeb
--- /dev/null
@@ -0,0 +1,172 @@
+[%  PROCESS "opac/parts/header.tt2";
+    PROCESS "opac/parts/misc_util.tt2";
+    WRAPPER "opac/parts/myopac/main_base.tt2";
+    myopac_page = "main";
+    myopac_main_page = "main";
+%]
+<form action="[% ctx.opac_root %]/myopac/main_payment_form" method="GET">
+    [% IF ctx.fines.circulation.size > 0 %]
+    <div id='myopac_circ_trans_div'>
+        <table width='100%' class='data_grid'>
+            <thead>
+                <tr>
+                    <td colspan='10' style='padding: 6px'>
+                        <strong>[% l("Fines") %]</strong>
+                    </td>
+                </tr>
+                <tr>
+                    <td>[% l("Title") %]</td>
+                    <td>[% l("Author") %]</td>
+                    <td>[% l("Checkout Date") %]</td>
+                    <td>[% l("Due Date") %]</td>
+                    <td>[% l("Date Returned") %]</td>
+                    <td>[% l("Balance Owed") %]</td>
+                    <td nowrap="nowrap" style="white-space:nowrap;">
+                        <input id="pay_fines_box1" checked="checked"
+                            type="checkbox" onclick="select_all_checkboxes('xact', this.checked)"
+                            title="[% l('Click to (un)select all fines') %]" />
+                        <label for="pay_fines_box1">[% l('Pay Fines') %]</label>
+                    </td>
+                </tr>
+            </thead>
+            <tbody id='myopac_circ_trans_tbody'>
+                [% FOR f IN ctx.fines.circulation;
+                    NEXT IF f.xact.balance_owed < 0; # XXX middle layer
+                    attrs = {marc_xml => f.marc_xml};
+                    IF f.marc_xml;
+                        PROCESS get_marc_attrs args=attrs;
+                    ELSIF f.xact.reservation;
+                        attrs.title = f.xact.reservation.target_resource_type.name;
+                    END %]
+                <tr id='myopac_circ_trans_row'>
+                    <td>
+                        [% recid = f.xact.circulation.target_copy.call_number.record.id || f.xact.reservation.target_resource_type.record.id;
+                        IF recid; %]
+                        <a href="[% ctx.opac_root %]/record/[% recid %]">[% attrs.title | html %]</a>
+                        [% ELSE %]
+                        [% attrs.title | html %]
+                        [% END %]
+                    </td>
+                    <td>
+                        <a href="[% ctx.opac_root %]/results?qtype=author&amp;query=[% attrs.author | replace('[,\.:;]', '') | url %]">[% attrs.author | html %]</a>
+                    </td>
+                    <td name='myopac_circ_trans_start'>
+                        [% ts = f.xact.circulation.xact_start || f.xact.reservation.start_time || 0;
+                        IF ts;
+                            date.format(ctx.parse_datetime(ts), DATE_FORMAT);
+                        END %]
+                    </td>
+                    <td name='myopac_circ_trans_due'>
+                        [% ts = f.xact.circulation.due_date || f.xact.reservation.end_time || 0;
+                        IF ts;
+                            date.format(ctx.parse_datetime(ts), DATE_FORMAT);
+                        END %]
+                    </td>
+                    <td name='myopac_circ_trans_finished'>
+                        [%  ts = f.xact.circulation.checkin_time || f.xact.reservation.return_time || 0;
+                            IF ts;
+                                date.format(ctx.parse_datetime(ts), DATE_FORMAT);
+                            ELSE %]
+                            <!-- XXX TODO fines aren't really accruing
+                                if circ has hit maxfines. more clarity
+                                here? -->
+                            <span class="red">[% l('(fines accruing)') %]</span>
+                        [%  END %]
+                    </td>
+                    <td>
+                        <strong class="red">
+                            [% money(f.xact.balance_owed) %]
+                        </strong>
+                    </td>
+                    <td>
+                        <input type="checkbox" checked="checked" 
+                            title="[% l('Pay this fine') %]" name="xact"
+                            value="[% f.xact.id %]" />
+                    </td>
+                </tr>
+                [% END %]
+            </tbody>
+        </table>
+    </div>
+    [% END %]
+
+    [% IF ctx.fines.grocery.size > 0 %]
+    <!-- Table for all non-circulation transactions -->
+    <div id='myopac_trans_div'>
+        <br/>
+        <hr class='opac-auto-013'  color="#dcdbdb" />
+        <br/>
+        <table width='100%' class='data_grid data_grid_center'
+            id='myopac_trans_table'>
+            <thead>
+                <tr>
+                    <td colspan='8' style='padding: 6px'>
+                        <b>[% l("Other Fees") %]</b>
+                    </td>
+                </tr>
+                <tr>
+                    <td width='16%'>[% l("Transaction Start Time") %]</td>
+                    <td width='16%'>[% l("Last Payment Time") %]</td>
+                    <td width='16%'>[% l("Initial Amount Owed") %]</td>
+                    <td width='16%'>[% l("Total Amount Paid") %]</td>
+                    <td width='16%'>[% l("Balance Owed") %]</td>
+                    <td width='16%'>[% l("Billing Type") %]</td>
+                    <td width='4%' align="center" nowrap="nowrap"
+                        style="white-space:nowrap;">
+                        <input id="pay_fines_box2" checked="checked"
+                            type="checkbox" onclick="select_all_checkboxes('xact_misc', this.checked)"
+                            title="[% l('Click to (un)select all fines') %]" />
+                        <label for="pay_fines_box2">[% l("Pay Fines") %]</label>
+                    </td>
+                </tr>
+            </thead>
+            <tbody id='myopac_trans_tbody'>
+                [% FOR f IN ctx.fines.grocery %]
+                    [% NEXT IF f.xact.balance_owed < 0 %] <!-- XXX middle layer -->
+                <tr id='myopac_trans_row'>
+                    <td>[% date.format(
+                            ctx.parse_datetime(f.xact.xact_start),
+                            DATE_FORMAT
+                    ) %]</td>
+                    <td>
+                        [%  IF f.xact.last_payment_ts;
+                                date.format(
+                                    ctx.parse_datetime(
+                                        f.xact.last_payment_ts
+                                    ), DATE_FORMAT
+                                );
+                            END %]
+                    </td>
+                    <td>[% money(f.xact.total_owed) %]</td>
+                    <td>[% money(f.xact.total_paid) %]</td>
+                    <td class="red">
+                        <strong>
+                            [% money(f.xact.balance_owed) %]
+                        </strong>
+                    </td>
+                    <td>[% f.xact.last_billing_type %]</td>
+                    <td>
+                        <input type="checkbox" title='[% l("Pay this fine") %]'
+                            name="xact_misc" value="[% f.xact.id %]"
+                            checked="checked" />
+                    </td>
+                </tr>
+                [% END %]
+            </tbody>
+        </table>
+    </div>
+    [% END %]
+    [% UNLESS ctx.fines.grocery.size OR ctx.fines.circulation.size %]
+    <div>[% l('You have no current fines.') %]</div>
+    [% ELSE %]
+    <div class="text-right pad-top-ten">
+        <input type="image"
+            alt="[% l('Pay selected fines') %]"
+            title="[% l('Pay selected fines') %]"
+            onmouseover="this.src='[% ctx.media_prefix %]/images/pay-fines-btn-hover.png';"
+            onmouseout="this.src='[% ctx.media_prefix %]/images/pay-fines-btn.png';"
+            src="[% ctx.media_prefix %]/images/pay-fines-btn.png" />
+    </div>
+    [% END %]
+</form>
+[% END %]
diff --git a/Open-ILS/src/templates_kcls/opac/myopac/main_pay.tt2 b/Open-ILS/src/templates_kcls/opac/myopac/main_pay.tt2
new file mode 100644 (file)
index 0000000..e02d956
--- /dev/null
@@ -0,0 +1,57 @@
+[%  PROCESS "opac/parts/header.tt2";
+    PROCESS "opac/parts/misc_util.tt2";
+    WRAPPER "opac/parts/myopac/base.tt2";
+    myopac_page = "main";
+    myopac_main_page = "pay" %]
+<div id="myopac_summary_div">
+
+    [% IF ctx.payment_response.textcode %]
+        <div class="payment-error">
+            <span title="[% ctx.payment_response.textcode %]">
+                [% ctx.payment_response.desc || ctx.payment_response.textcode %]
+            </span><br />
+            [% ctx.payment_response.note %]
+            [% ctx.payment_response.payload.error_message %]
+        </div>
+        <p>
+            [%
+                url_args = {xact => [], xact_misc => []};
+                FOR k IN ['xact', 'xact_misc'];
+                    FOR val IN CGI.param(k);
+                        url_args.$k.push(val);
+                    END;
+                END;
+                retry_url =  mkurl(ctx.opac_root _ '/myopac/main_payment_form', url_args, 1);
+            %]
+            <br/>
+            <a href="[% retry_url %]">[% l('Go back') %]</a>
+            [% l('to try again or to cancel this payment attempt.') %]
+        </p>
+    [% ELSE %]
+        <p><big>[% l('Your payment has been approved.') %]</big></p>
+        [% IF ctx.printable_receipt.template_output;
+            print_args = [];
+            FOR p IN ctx.payment_response.payments;
+                print_args.push('payment=' _ p);
+            END %]
+        <p>[ <a href="[% ctx.opac_root %]/myopac/receipt_print?[% print_args.join('&amp;') %]"
+            target="_egrecpt"
+            onclick="try { print_node('printable-receipt'); } catch (e) { window.print(); } return false;">[% l('Print receipt') %]</a> ]</p>
+        <tt id="printable-receipt">
+            [% ctx.printable_receipt.template_output.data %]
+        </tt>
+        [% ELSE %]
+        <div class="payment-error">
+            [% l(
+                'Error creating receipt: [_1]',
+                    (ctx.printable_receipt.textcode ? ctx.printable_receipt.textcode _ ' / ' _ ctx.printable_receipt.desc : 0) ||
+                    ctx.printable_receipt.error_output.data ||
+                    l('No receipt data returned from server')
+                ) | html %]
+        </div>
+        [% END %]
+        <p>[ <a href="[% ctx.opac_root %]/myopac/main">[%
+            l("Back to Account Summary") %]</a> ]</p>
+    [% END %]
+</div>
+[% END %]
diff --git a/Open-ILS/src/templates_kcls/opac/myopac/main_pay_init.tt2 b/Open-ILS/src/templates_kcls/opac/myopac/main_pay_init.tt2
new file mode 100644 (file)
index 0000000..8355710
--- /dev/null
@@ -0,0 +1,15 @@
+[%  PROCESS "opac/parts/header.tt2";
+    PROCESS "opac/parts/misc_util.tt2";
+    WRAPPER "opac/parts/myopac/base.tt2";
+    myopac_page = "main";
+    myopac_main_page = "pay" %]
+<div id="myopac_summary_div">
+
+    <div class="payment-processing">
+        [% l('Processing...') %] <br/><br/>
+        [% l('Processing your payment may take some time.') %]<br/>
+        [% l("Please do not Refresh or use your browser's Back button or your credit card may be charged more than once.") %]<br/>
+    </div>
+
+</div>
+[% END %]
diff --git a/Open-ILS/src/templates_kcls/opac/myopac/main_payment_form.tt2 b/Open-ILS/src/templates_kcls/opac/myopac/main_payment_form.tt2
new file mode 100644 (file)
index 0000000..60907a0
--- /dev/null
@@ -0,0 +1,189 @@
+[%  PROCESS "opac/parts/header.tt2";
+    PROCESS "opac/parts/misc_util.tt2";
+    WRAPPER "opac/parts/myopac/main_base.tt2";
+    myopac_page = "main";
+    myopac_main_page = "payment_form";
+
+    last_chance = CGI.param("last_chance");
+
+%]
+[% IF ctx.fines.balance_owed <= 0 %]
+<div>
+    [% l("You either have no fines to pay or you have selected fines whose " _
+        "total is non-positive.  We cannot process non-positive amounts.") %]
+</div>
+[% ELSE %]
+<div id="pay_fines_now">
+    [% IF last_chance %]
+    <p><big>[% l("Are you sure you are ready to charge [_1] to your credit card?", money(ctx.fines.balance_owed)) %]</big></p>
+    <form action="[% ctx.opac_root %]/myopac/main_pay_init" method="POST">
+        [% FOR k IN CGI.Vars;
+            NEXT UNLESS k;
+            FOR val IN CGI.param(k) %]
+        <input type="hidden" name="[% k | html %]" value="[% val | html %]" />
+        [% END; END %]
+        <input type="submit" value="[% l('Submit Payment') %]" />
+        <a href="[% mkurl(ctx.opac_root _ '/myopac/main', {}, 1) %]">[% l('Cancel') %]</a>
+    [% ELSE %]
+    <form method="POST" id='cc-form'>
+        <input type="hidden" name="last_chance" value="1" />
+        [% FOR xact IN CGI.param('xact') %]
+        <input type="hidden" name="xact" value="[% xact | html %]" />
+        [% END %]
+        [% FOR xact IN CGI.param('xact_misc') %]
+        <input type="hidden" name="xact_misc" value="[% xact | html %]" />
+        [% END %]
+
+        <br/>
+        <h2>[% l('KCLS only accepts Visa or MasterCard') %]</h2>
+        <table>
+            <tbody>
+                <tr>
+                    <td colspan='2'><strong>[% l('Billing Information') %]</strong></td>
+                    <td rowspan='13' valign='top'>
+                        <p>[% l('Selected fines you are paying for:') %]</p>
+                        <table cellpadding="0" cellspacing="0" border="0" class="myopac_payments_table">
+                            <thead>
+                                <tr>
+                                    <th>[% l('Name') %]</th>
+                                    <th>[% l('Amount') %]</th>
+                                </tr>
+                            </thead>
+                            <tbody>
+                            [%
+                            FOR f IN ctx.fines.circulation;
+                                NEXT IF CGI.param('xact').size &&
+                                    !CGI.param('xact').grep(f.xact.id).size;
+                                attrs = {marc_xml => f.marc_xml};
+                                IF f.marc_xml;
+                                    PROCESS get_marc_attrs args=attrs;
+                                ELSIF f.xact.reservation;
+                                    attrs.title = f.xact.reservation.target_resource_type.name;
+                                END %]
+                                <tr>
+                                    <td>[% attrs.title | html %]</td>
+                                    <td class="text-right">[% money(f.xact.balance_owed) %]</td>
+                                </tr>
+                            [%
+                            END;
+                            FOR f IN ctx.fines.grocery;
+                                NEXT IF CGI.param('xact_misc').size &&
+                                    !CGI.param('xact_misc').grep(f.xact.id).size %]
+                                <tr>
+                                    <td>[% f.xact.last_billing_type | html %]</td>
+                                    <td class="text-right">[% money(f.xact.balance_owed) %]</td>
+                                </tr>
+                            [% END %]
+                            </tbody>
+                        </table>
+                        <br />
+                        <div>
+                            [% l('Total amount to pay:') %]
+                            <strong>[% money(ctx.fines.balance_owed) %]</strong>
+                        </div>
+                        <br />
+                        [% | l('<strong>', '</strong>') %]Click [_1]Cancel[_2] to go back and (un)select other fines.[% END %]
+                    </td>
+                </tr>
+                <tr>
+                    <td>[% l('First Name') %]</td>
+                    <td><input type="text" name="billing_first" value="[% ctx.user.first_given_name | html %]" /></td>
+                </tr>
+                <tr>
+                    <td>[% l('Last Name') %]</td>
+                    <td><input type="text" name="billing_last" value="[% ctx.user.family_name | html %]" /></td>
+                </tr>
+                <tr>
+                    <td>[% l('Email Address') %]</td>
+                    <td>
+                        <input type="text" disabled="disabled" readonly="readonly" value="[% ctx.user.email | html %]" />
+                        <a href="[% ctx.opac_root %]/myopac/update_email?return_to_referer=1">[% l("Update") %]</a>
+                    </td>
+                </tr>
+                <tr>
+                    <td>[% l('Street Address') %]</td>
+                    <td><input type="text" name="billing_address" /></td>
+                </tr>
+                <tr>
+                    <td>[% l('City' )%]</td>
+                    <td><input type="text" name="billing_city" value="[% ctx.user.billing_address.city | html %]" /></td>
+                </tr>
+                <tr>
+                    <td>[% l('State or Province') %]</td>
+                    <td><input type="text" name="billing_state" value="[% ctx.user.billing_address.state | html %]" /></td>
+                </tr>
+                <tr>
+                    <td>[% l('ZIP or Postal Code') %]</td>
+                    <td><input type="text" name="billing_zip" value="[% ctx.user.billing_address.post_code | html %]" /></td>
+                </tr>
+                <tr>
+                  <td colspan='2'><strong>[% l('Credit Card Information') %]</strong></td>
+                </tr>
+                <!-- Technically not needed since card type is derived from the CC number
+                <tr>
+                    <td>Type of Card</td>
+                    <td>
+                        <select name="type">
+                            <option value='VISA'>VISA</option>
+                            <option value='MasterCard'>MasterCard</option>
+                            <option value='American Express'>American Express</option>
+                        </select>
+                    </td>
+                </tr>
+                -->
+                <tr>
+                    <td>[% l('Credit Card #') %]</td>
+                    <td><input type="text" name="number" maxlength="16" /></td>
+                </tr>
+                <tr>
+                    <td>[% l('Security Code') %]</td>
+                    <td>
+                        <input type="text" size="4" maxlength="5" name="cvv2" />
+                    </td>
+                </tr>
+                <tr>
+                    <td>[% l('Exipration Month') %]</td>
+                    <td>
+                        <select name="expire_month">
+                            <option value="01">[% l("January") %]</option>
+                            <option value="02">[% l("February") %]</option>
+                            <option value="03">[% l("March") %]</option>
+                            <option value="04">[% l("April") %]</option>
+                            <option value="05">[% l("May") %]</option>
+                            <option value="06">[% l("June") %]</option>
+                            <option value="07">[% l("July") %]</option>
+                            <option value="08">[% l("August") %]</option>
+                            <option value="09">[% l("September") %]</option>
+                            <option value="10">[% l("October") %]</option>
+                            <option value="11">[% l("November") %]</option>
+                            <option value="12">[% l("December") %]</option>
+                        </select>
+                    </td>
+                </tr>
+                <tr>
+                    <td>[% l('Expiration Year') %]</td>
+                    <td>
+                        <select name="expire_year">
+                        [% year = date.format(date.now, '%Y');
+                        y = year;
+                        WHILE y < year + 10; # show ten years starting now %]
+                            <option value="[% y %]">[% y %]</option>
+                        [% y = y + 1; END %]
+                        </select>
+                    </td>
+                </tr>
+                <tr>
+                    <td colspan='2' align="center">
+                        <input type="submit" value="[% l('Next') %]" onclick='return check_cc_params()'/>
+                        <a href="[% mkurl(ctx.opac_root _ '/myopac/main', {}, 1) %]">[% l('Cancel') %]</a>
+                    </td>
+                </tr>
+                [% INCLUDE "opac/parts/myopac/main_refund_policy.tt2" %]
+            </tbody>
+        </table>
+    [% END %]
+    </form>
+</div>
+<script src='/js/ui/opac/kcls.js'></script>
+[% END %]
+[% END %]
diff --git a/Open-ILS/src/templates_kcls/opac/myopac/main_payments.tt2 b/Open-ILS/src/templates_kcls/opac/myopac/main_payments.tt2
new file mode 100644 (file)
index 0000000..b191839
--- /dev/null
@@ -0,0 +1,61 @@
+[%  PROCESS "opac/parts/header.tt2";
+    PROCESS "opac/parts/misc_util.tt2";
+    WRAPPER "opac/parts/myopac/main_base.tt2";
+    myopac_page = "main";
+    myopac_main_page = "payments";
+    limit = ctx.payment_history_limit;
+    offset = ctx.payment_history_offset;
+%]
+
+<div>
+    <div class="header_middle">
+        <span class="float-left">[% l('Payments History') %]</span>
+        <span class='float-left' style='padding-left: 10px;'>
+            <a href='main_payments?limit=[% limit %]&amp;offset=[% offset - limit %]'
+                [% IF offset == 0 %] class='invisible' [% END %]><span class="nav_arrow_fix">&#9668;</span>[% l('Previous') %]</a>
+            [%# TODO: get total to prevent paging off then end of the list.. %]
+            <a href='main_payments?limit=[% limit %]&amp;offset=[% offset + limit %]'
+               [% IF ctx.payments.size < limit %] class='invisible' [% END %] >[% l('Next') %]<span class="nav_arrow_fix">&#9658;</span></a>
+        </span>
+    </div>
+    <div class="clear-both"></div>
+
+    [% IF ctx.payments.size %]
+    <table class='myopac_payments_table data_grid' width='100%'>
+        <thead><tr>
+            <th>[% l('Payment Date') %]</th>
+            <th>[% l('Payment For') %]</th>
+            <th>[% l('Amount') %]</th>
+            <th>[% l('Receipt') %]</th> 
+        </tr></thead>
+        <tbody>
+            [% FOR payment IN ctx.payments %]
+            <tr>
+                <td>[% date.format(ctx.parse_datetime(payment.mp.payment_ts), DATE_FORMAT) %]</td>
+                <td>[% 
+                    btype = payment.last_billing_type | html;
+                    ptitle = payment.title | html;
+                    (payment.xact_type == 'grocery') ? btype : ptitle
+                %]</td>
+                <td>[% money(payment.mp.amount) %]</td>
+                <td>
+                    [% IF payment.mp.payment_type == 'credit_card_payment' %]
+                    <form action="[% ctx.opac_root %]/myopac/receipt_print" method="POST">
+                        <input type="hidden" name="payment" value="[% payment.mp.id %]" />
+                        <input type="submit" value="[% l('Print') %]" />
+                    </form>
+                    <form action="[% ctx.opac_root %]/myopac/receipt_email" method="POST">
+                        <input type="hidden" name="payment" value="[% payment.mp.id %]" />
+                        <input type="submit" value="[% l('Email') %]" />
+                    </form>
+                    [% END %]
+                </td>
+            </tr>
+            [% END %]
+        </tbody>
+    </table>
+    [% ELSE %]
+    <div>[% l('You have no historical payments to display.') %]</div>
+    [% END %]
+</div>
+[% END %]
diff --git a/Open-ILS/src/templates_kcls/opac/myopac/prefs.tt2 b/Open-ILS/src/templates_kcls/opac/myopac/prefs.tt2
new file mode 100644 (file)
index 0000000..2db15e5
--- /dev/null
@@ -0,0 +1,356 @@
+[%  PROCESS "opac/parts/header.tt2";
+    WRAPPER "opac/parts/myopac/prefs_base.tt2";
+    myopac_page = "prefs";
+    prefs_page = 'personal' %]
+
+<div id="acct_info_main">
+    <div id='myopac.expired.alert'
+         class='hide_me'
+         style='margin-bottom: 20px;'>
+        <table class='data_grid'
+               width='100%'>
+            <tbody>
+                <tr>
+                    <td width='100%' class='red'>
+                        [% l("Your account expired on") %]
+                        <span id='myopac.expired.date'></span>!
+                        [% l("Please see a librarian to renew your account.") %]</td>
+                </tr>
+            </tbody>
+        </table>
+    </div>
+
+    <div id='myopac.notes.div'
+         class='hide_me'>
+        <table class='data_grid'
+               width='100%'>
+            <thead>
+                <tr>
+                    <td colspan='2'>
+                    <b>[% l("* Staff Notes *") %]</b></td>
+                </tr>
+            </thead>
+
+            <tbody id='myopac.notes.tbody'>
+                <tr id='myopac.notes.tr'>
+                    <td><b name='title'></b> : <span name=
+                    'value'></span></td>
+                </tr>
+            </tbody>
+        </table><br />
+    </div>
+
+    <table width='70%'
+           class='light_border data_grid'>
+        <tbody id='myopac_summary_tbody'>
+            <tr>
+                <td width='30%'
+                    class='color_4 light_border'>[% l("Name") %]</td>
+
+                <td class='light_border'>[% l(
+                    HUMAN_NAME_FORMAT,
+                    ctx.user.prefix, ctx.user.first_given_name,
+                    ctx.user.second_given_name, ctx.user.family_name,
+                    ctx.user.suffix
+                ) | html %]</td>
+
+                <td></td>
+            </tr>
+
+            <tr>
+                <td class='color_4 light_border'>
+                [% l("Day Phone") %]</td>
+
+                <td class='light_border'
+                    id='myopac_summary_dayphone'>[% ctx.user.day_phone | html %]</td>
+
+                <td class='light_border'><a href='#'
+                   class="hide_me"
+                   id='myopac_summary_phone1_change'
+                   style=
+                   'text-decoration: underline;'>[% l("Change") %]</a></td>
+            </tr>
+
+            <tr id='myopac_update_phone1_row'
+                class='hide_me'>
+                <td class='myopac_update_cell'
+                    colspan='3'>
+                    <span class='myopac_update_span'>
+                        Enter New [% l("Day Phone") %]:
+                    </span>
+
+                    <input type='text' size='24' id='myopac_new_phone1' />
+                    <span class='myopac_update_span'>
+                        <button>
+                            <span class='myopac_update_span'>
+                                [% l("Submit") %]</span>
+                        </button>
+                    </span>
+                    <span class='myopac_update_span'>
+                        <button>
+                            <span class='myopac_update_span'>
+                                [% l("Cancel") %]</span>
+                        </button>
+                    </span>
+                </td>
+            </tr>
+
+            <tr>
+                <td class='color_4 light_border'>
+                [% l("Evening Phone") %]</td>
+
+                <td class='light_border'
+                    id='myopac_summary_eveningphone'>[% ctx.user.evening_phone | html %]</td>
+
+                <td class='light_border'><a href='#'
+                   class="hide_me"
+                   id='myopac_summary_phone2_change'
+                   style=
+                   'text-decoration: underline;'>[% l("Change") %]</a></td>
+            </tr>
+
+            <tr id='myopac_update_phone2_row'
+                class='hide_me'>
+                <td class='myopac_update_cell'
+                    colspan='3'><span class='myopac_update_span'>New
+                    [% l("Evening Phone") %]:</span>
+                    <input type='text' size='24' id='myopac_new_phone2' />
+                    <span class='myopac_update_span'><button><span class=
+                        'myopac_update_span'>[% l("Submit") %]</span></button></span>
+                    <span class='myopac_update_span'><button><span class=
+                        'myopac_update_span'>[% l("Cancel") %]</span></button></span>
+                </td>
+            </tr>
+
+            <tr>
+                <td class='color_4 light_border'>
+                [% l("Other Phone") %]</td>
+
+                <td class='light_border'
+                    id='myopac_summary_otherphone'>[% ctx.user.other_phone | html %]</td>
+
+                <td class='light_border'><a href='#'
+                   class="hide_me"
+                   id='myopac_summary_phone3_change'
+                   style=
+                   'text-decoration: underline;'>[% l("Change") %]</a></td>
+            </tr>
+
+            <tr id='myopac_update_phone3_row'
+                class='hide_me'>
+                <td class='myopac_update_cell'
+                    colspan='3'><span class='myopac_update_span'>Enter
+                    New [% l("Other Phone") %]:</span>
+                    <input type='text' size='24' id='myopac_new_phone3' />
+                    <span class='myopac_update_span'><button><span class=
+                        'myopac_update_span'>[% l("Submit") %]</span></button></span>
+                    <span class='myopac_update_span'><button><span class=
+                        'myopac_update_span'>[% l("Cancel") %]</span></button></span>
+                </td>
+            </tr>
+
+            <tr>
+                <td class='color_4 light_border'>
+                    <div style="position:absolute">
+                        <div class="hide_me" style="position:relative;left:70px;top:-3px;">
+                            <a href="#"><img alt="Username Help" src="[% ctx.media_prefix %]/images/question-mark.png" /></a>
+                        </div>
+                    </div>[% l("Username") %]
+                </td>
+                <td class='light_border'>[% ctx.user.usrname | html %]</td>
+                <td class='light_border'><a href='update_username'>[% l("Change") %]</a></td>
+            </tr>
+            <tr>
+                <td class='color_4 light_border'>[% l("Password") %]</td>
+                <td class='light_border'>[% l("(not shown)") %]</td>
+                <td class='light_border'><a href='update_password'>[% l("Change") %]</a></td>
+            </tr>
+            <tr>
+                <td class='color_4 light_border'>[% l("Email Address") %]</td>
+                <td class='light_border'>[% ctx.user.email | html %]</td>
+                <td class='light_border'><a href='update_email'>[% l('Change') %]</a></td>
+            </tr>
+
+            [% IF ctx.user.ident_value %]<tr class="hide_me">
+                <td class='color_4 light_border'>
+                [% l("Primary Identification") %]</td>
+
+                <td class='light_border'>
+                    [%
+                    # l('[_1] ([_2])', ctx.user.ident_value, ctx.user.ident_type.name) | html
+                    # XXX uncomment the above line to show primary
+                    # identification. With a minor tweak it could
+                    # alternatively be shown but partially obscured. 
+                    %]
+                </td>
+                <td></td>
+            </tr>[% END %]
+
+            <tr>
+                <td class='color_4 light_border'>
+                [% l("Active Barcode") %]</td>
+
+                <td class='light_border'>[% ctx.user.card.barcode %]</td>
+
+                <td></td>
+            </tr>
+
+            <tr>
+                <td class='color_4 light_border'>
+                [% l("Home Library") %]</td>
+                <td class='light_border'>[% ctx.user.home_ou.name | html %]</td>
+                <td><a href='#'
+                   class="hide_me"
+                   style='text-decoration: underline;'>[% l("Change") %]</a></td>
+            </tr>
+            <tr class='hide_me'>
+                <td class='myopac_update_cell'
+                    colspan='3'>
+                    <span class='myopac_update_span'>
+                        New home library:</span>
+                    <select>
+                    </select>
+                    <span class='myopac_update_span'>
+                        <button>
+                            <span class= 'myopac_update_span'>
+                                [% l("Submit") %]</span>
+                        </button>
+                    </span>
+                    <span class='myopac_update_span'>
+                        <button>
+                            <span class= 'myopac_update_span'>
+                                [% l("Cancel") %]</span>
+                        </button>
+                    </span>
+                </td>
+            </tr>
+            <tr class="hide_me">
+                <td class='color_4 light_border'>
+                    [% l("Account Creation Date") %]
+                </td>
+                <td class='light_border'
+                    id='myopac_summary_create_date'></td>
+                <td></td>
+            </tr>
+        </tbody>
+    </table><br />
+    <hr class='opac-auto-013' color="#DCDBDB" />
+    <br />
+
+    <table width='100%' class='light_border data_grid'>
+        <thead>
+            <tr>
+                <td><strong>[% l("Addresses") %]</strong></td>
+                <td><strong>[% l("Pending Addresses") %]</strong></td>
+            </tr>
+        </thead>
+        <tbody>
+            [% 
+                # cycle through the non-pending address.  For each non-pending addr
+                # that has a corresponding pending addr, render the pending addr 
+                # along the right inside it's own edit form
+                pending = {};
+                regular = [];
+                edit_addr_id = CGI.param('edit_address');
+                FOR addr IN ctx.user.addresses;
+                    IF addr.pending == 't';
+                        replaces = addr.replaces;
+                        pending.$replaces = addr;
+                    ELSE;
+                        regular.push(addr);
+                    END;
+                END;
+            FOR addr IN regular;
+                cur_id = addr.id; 
+                pending_addr = pending.$cur_id;
+            %]
+            <tr>
+                <td>
+                    <!-- read-only address display -->
+                    <table class='light_border'>
+                        <tr><td>[% l("Address Type") %]</td><td>[% addr.address_type | html %]</td></tr>
+                        <tr><td>[% l("Street") %]</td><td>[% addr.street1 | html %]</td></tr>
+                        <tr><td>[% l("Street") %]</td><td>[% addr.street2 | html %]</td></tr>
+                        <tr><td>[% l("City") %]</td><td>[% addr.city | html %]</td></tr>
+                        <tr><td>[% l("County") %]</td><td>[% addr.county| html  %]</td></tr>
+                        <tr><td>[% l("State") %]</td><td>[% addr.state | html %]</td></tr>
+                        <tr><td>[% l("Country") %]</td><td>[% addr.country | html %]</td></tr>
+                        <tr><td>[% l("Zip") %]</td><td>[% addr.post_code | html %]</td></tr>
+                        [% IF ctx.get_org_setting(ctx.user.home_ou.id, 'opac.allow_pending_address') 
+                                AND !pending_addr AND edit_addr_id != cur_id %]
+                        <tr>
+                            <td colspan='2'>
+                                <a href='?edit_address=[% addr.id %]'>[% l('Edit Address') %]</a>
+                            </td>
+                        </tr>
+                        [% END %]
+                    </table>
+                </td>
+
+                <!-- pending address form -->
+                [% IF pending_addr OR edit_addr_id == cur_id;
+                    update_addr = pending_addr || addr %]
+                <td>
+                    <form method='POST'>
+                        [% IF pending_addr %]
+                            <input type='hidden' name='pending_addr' value='[% pending_addr.id %]'/>
+                        [% ELSE %]
+                            <input type='hidden' name='replace_addr' value='[% edit_addr_id | html %]'/>
+                        [% END %]
+                        <table class='pending-addr'>
+                            <tr>
+                                <td>[% l("Address Type") %]</td>
+                                <td><input name='address_type' value='[% update_addr.address_type | html %]'/></td>
+                            </tr>
+                            <tr>
+                                <td>[% l("Street") %]</td>
+                                <td><input name='street1' value='[% update_addr.street1 | html %]'/></td>
+                            </tr>
+                            <tr>
+                                <td>[% l("Street") %]</td>
+                                <td><input name='street2' value='[% update_addr.street2 | html %]'/></td>
+                            </tr>
+                            <tr>
+                                <td>[% l("City") %]</td>
+                                <td><input name='city' value='[% update_addr.city | html %]'/></td>
+                            </tr>
+                            <tr>
+                                <td>[% l("County") %]</td>
+                                <td><input name='county' value='[% update_addr.county| html %]'/></td>
+                            </tr>
+                            <tr>
+                                <td>[% l("State") %]</td>
+                                <td><input name='state' value='[% update_addr.state | html %]'</td>
+                            </tr>
+                            <tr>
+                                <td>[% l("Country") %]</td>
+                                <td><input name='country' value='[% update_addr.country | html %]'/></td>
+                            </tr>
+
+                            <tr>
+                                <td>[% l("Zip") %]</td>
+                                <td><input name='post_code' value='[% update_addr.post_code | html %]'/></td>
+                            </tr>
+                            <tr>
+                                <td><input type='submit' value="[% l('Save Changes') %]"/></td>
+                                <td>
+                                    [% IF pending_addr;
+                                        url = mkurl('', {delete_pending => pending_addr.id}, 1);
+                                    ELSE;
+                                        url = mkurl('', {}, 1);
+                                    END %]
+                                    <a href="[% url %]">[% l('Discard Pending Address') %]</a>
+                                </td>
+                            </tr>
+                            <tr><td colspan='2'><i>[% l('Address changes will be verified by staff') %]</i></td></tr>
+                        </table>
+                    </form>
+                </td>
+                [% END %] <!-- if pending_addr -->
+            </tr>
+            [% END %]
+        </tbody>
+    </table>
+</div>
+
+[% END %]
diff --git a/Open-ILS/src/templates_kcls/opac/myopac/prefs_notify.tt2 b/Open-ILS/src/templates_kcls/opac/myopac/prefs_notify.tt2
new file mode 100644 (file)
index 0000000..91a3ce5
--- /dev/null
@@ -0,0 +1,128 @@
+[%  PROCESS "opac/parts/header.tt2";
+    WRAPPER "opac/parts/myopac/prefs_base.tt2";
+    myopac_page = "prefs_notify";
+    prefs_page = 'notify' %]
+
+
+<form method='POST'>
+
+    <div style="float:right;width:65px;">
+        <input type='image' alt="[% l('Save') %]" src="[% ctx.media_prefix %]/images/save-btn.png" />
+    </div>
+
+    <table>
+        <thead><tr>
+            <th>[% l('Notifation Type') %]</th>
+            <th>[% l('Enabled') %]</th>
+        </tr></thead>
+        <tbody class='data_grid'>
+            [% IF optin.size == 0 %]
+                <strong>[% l('No notification preferences are configured') %]</strong>
+            [% END %]
+            [% FOR optin IN ctx.opt_in_settings %]
+                <tr>
+                    <td>[% optin.cust.label | html %]</td>
+                    <td>
+                        <input type='checkbox' name='setting' 
+                            value='[% optin.cust.name | uri %]' 
+                            [% IF optin.value %] checked='checked' [% END %]/>
+                    </td>
+                </tr>
+            [% END %]
+        </tbody>
+    </table>
+</form>
+
+
+<!-- NOTIFICATION PREFS / leaving here for reference
+<table class="hide_me"
+       id="acct_notify_main">
+    <tbody>
+        <tr class="hide_me">
+            <td><span>[% l("Default Hold Notification Method") %]</span> <a class=
+            'classic_link'
+               href='#'>[% l("(Help)") %]</a></td>
+
+            <td style="padding-left:15px;"><select id=
+            'prefs_hold_notify'>
+                <option value='phone:email'
+                        selected='selected'>
+                    [% l("Use Phone and Email") %]
+                </option>
+
+                <option value='phone'>
+                    [% l("Use Phone Only") %]
+                </option>
+
+                <option value='email'>
+                    [% l("Use Email Only") %]
+                </option>
+            </select></td>
+        </tr>
+
+        <tr>
+            <td style="padding-top:10px;"><strong>Pick Up Notice for
+            Holds</strong><br />
+            <input type="checkbox"
+                   id="opac.hold_notify.email"
+                   name="opac.hold_notify.email" /> <label for=
+                   "opac.hold_notify.email">Email</label><br />
+            <input type="checkbox"
+                   id="opac.hold_notify.phone"
+                   name="opac.hold_notify.phone" /> <label for=
+                   "opac.hold_notify.phone">Phone</label>
+                   <b>(Temporarily phone notification will generate a
+                   mailed paper notice.)</b></td>
+        </tr>
+
+        <tr>
+            <td style="padding-top:10px;"><strong>Expire Notice for
+            Holds</strong><br />
+            <input type="checkbox"
+                   id="notification.hold.expire.email"
+                   name="notification.hold.expire.email" /> <label for=
+                   "notification.hold.expire.email">Email</label></td>
+        </tr>
+
+        <tr>
+            <td style="padding-top:10px;"><strong>Cancel Notice for
+            Holds</strong><br />
+            <input type="checkbox"
+                   id="notification.hold.cancel.email"
+                   name="notification.hold.cancel.email" /> <label for=
+                   "notification.hold.cancel.email">Email</label></td>
+        </tr>
+
+        <tr>
+            <td style="padding-top:10px;"><strong>Overdue First
+            Notice</strong><br />
+            <input type="checkbox"
+                   id="notification.overdue.first.email"
+                   name="notification.overdue.first.email" />
+                   <label for=
+                   "notification.overdue.first.email">Email</label><br />
+            <input type="checkbox"
+                   id="notification.overdue.first.phone"
+                   name="notification.overdue.first.phone" />
+                   <label for=
+                   "notification.overdue.first.phone">Phone</label>
+                   <b>(Temporarily phone notification will generate a
+                   mailed paper notice.)</b></td>
+        </tr>
+
+        <tr>
+            <td style="padding-top:10px;"><strong>Courtesy
+            Notice</strong><br />
+            <input type="checkbox"
+                   id="notification.predue.email"
+                   name="notification.predue.email" /> <label for=
+                   "notification.predue.email">Email</label><br /></td>
+        </tr>
+    </tbody>
+</table>
+-->
+
+
+[% END %]
+
+
diff --git a/Open-ILS/src/templates_kcls/opac/myopac/prefs_settings.tt2 b/Open-ILS/src/templates_kcls/opac/myopac/prefs_settings.tt2
new file mode 100644 (file)
index 0000000..fc5f846
--- /dev/null
@@ -0,0 +1,100 @@
+[%  PROCESS "opac/parts/header.tt2";
+    WRAPPER "opac/parts/myopac/prefs_base.tt2";
+    myopac_page = "prefs_notify";
+    prefs_page = 'settings' %]
+
+
+    <form method='POST'>
+
+        <div style="float:right;width:65px;">
+            <div style="position:absolute">
+                <div style="position:relative;top:75px;">
+                    <input type="image" alt="[% l('Save') %]" src="[% ctx.media_prefix %]/images/save-btn.png"/>
+                </div>
+            </div>
+        </div>
+
+        <table class="full-width data_grid" id="acct_search_main">
+            <tbody>
+
+                [% IF ctx.updated_user_settings %]
+                <tr><td colspan='2'>
+                    <div class='renew-summary'>
+                        [% l('Account Successfully Updated') %]
+                    </div>
+                </td></tr>
+                [% END %]
+
+                <tr >
+                    <td width='20%'>[% l("Search hits per page") %]</td>
+                    <td>
+                        <div style="position:absolute">
+                            <div style="position:relative;top:0px;left:55px;">
+                                <a href="#"><img alt="[% l('Search Hits Help') %]" 
+                                    src="[% ctx.media_prefix %]/images/question-mark.png" /></a>
+                            </div>
+                        </div>
+                        [% setting = 'opac.hits_per_page' %]
+                        <select name='[% setting %]'>
+                            [%  FOR val IN [5, 8, 10, 15, 20, 25, 50] %]
+                                <option value='[% val | uri %]' 
+                                    [% IF ctx.user_setting_map.$setting == val %]
+                                        selected='selected'[% END %]>[% val | html %]</option>
+                            [% END %]
+                        </select>
+                    </td>
+                </tr>
+                <tr>
+                    <td>[% l('Keep history of checked out items?') %]</td>
+                    <td>
+                        [% setting = 'history.circ.retention_start' %]
+                        <input name='[% setting %]' type="checkbox"
+                            [% IF ctx.user_setting_map.$setting; %] checked='checked' [% END %]/>
+                    </td>
+                </tr>
+                <tr>
+                    <td>[% l('Keep history of holds?') %]</td>
+                    <td>
+                        [% setting = 'history.hold.retention_start' %]
+                        <input name='[% setting %]' type="checkbox"
+                            [% IF ctx.user_setting_map.$setting; %] checked='checked' [% END %]/>
+                    </td>
+                </tr>
+
+                <!--
+                <tr>
+                    <td>[% l("Default Font Size") %]</td>
+                    <td>
+                        <select id='prefs_def_font'>
+                            <option value='regular'>[% l("Regular Font") %]</option>
+                            <option value='large'>[% l("Large Font") %]</option>
+                        </select>
+                    </td>
+                </tr>
+
+                <tr>
+                    <td>[% l("Default Search Location") %]</td>
+                    <td>
+                        <div style='margin-bottom: 5px;'>
+                            <input type='checkbox' id='myopac_pref_home_lib' />
+                            [% l("Search my home library by default.") %]
+                        </div>
+                        <select id='prefs_def_location'></select>
+                    </td>
+                </tr>
+
+                <tr>
+                    <td>[% l("Default Search Range") %]</td>
+                    <td>
+                        <select>
+                            [%# TODO %]
+                        </select>
+                    </td>
+                </tr>
+                -->
+
+            </tbody>
+        </table>
+    </form>
+    [% INCLUDE "opac/parts/myopac/prefs_hints.tt2" %]
+[% END %]
diff --git a/Open-ILS/src/templates_kcls/opac/myopac/receipt_email.tt2 b/Open-ILS/src/templates_kcls/opac/myopac/receipt_email.tt2
new file mode 100644 (file)
index 0000000..15b744f
--- /dev/null
@@ -0,0 +1,21 @@
+[%  PROCESS "opac/parts/header.tt2";
+    PROCESS "opac/parts/misc_util.tt2";
+    WRAPPER "opac/parts/myopac/base.tt2";
+    myopac_page = "prefs"  %]
+    [% IF ctx.email_receipt_result; # result should be undef on success %]
+    <div class="payment-error">
+        [% l('Error preparing receipt:') %]
+        <span title="[% ctx.email_receipt_result.textcode | html %]">
+            [% ctx.email_receipt_result.desc | html %]
+        </span>
+    </div>
+    [% ELSE %]
+    <div>
+        [% l('Your receipt will be emailed to [_1]', ctx.user.email) | html %]
+    </div>
+    [% END %]
+    <p>
+        [ <a href="[% ctx.opac_root %]/myopac/main_payments">[%
+            l("Back to Payments History") %]</a> ]
+    </p>
+[% END %]
diff --git a/Open-ILS/src/templates_kcls/opac/myopac/receipt_print.tt2 b/Open-ILS/src/templates_kcls/opac/myopac/receipt_print.tt2
new file mode 100644 (file)
index 0000000..fe68495
--- /dev/null
@@ -0,0 +1,25 @@
+[%# sic! no wrapper %]
+<html>
+    <head>
+        <title>[% l('Receipt') %]</title>
+    </head>
+    <body onload="if (document.getElementById('printable-receipt')) window.print();">
+        [% IF ctx.printable_receipt.template_output %]
+        <tt id="printable-receipt">
+            [% ctx.printable_receipt.template_output.data %]
+        </tt>
+        [% ELSE %]
+        <div class="payment-error">
+            [% l(
+                'Error preparing receipt: [_1]',
+                    (ctx.printable_receipt.textcode ? ctx.printable_receipt.textcode _ ' / ' _ ctx.printable_receipt.desc : 0) ||
+                    ctx.printable_receipt.error_output.data ||
+                    l('No receipt data returned from server')
+                ) | html %]
+        </div>
+        [% END %]
+        <hr />
+        <p>[ <a href="[% ctx.opac_root %]/myopac/main_payments">[%
+            l("Back to Payments History") %]</a> ]</p>
+    </body>
+</html>
diff --git a/Open-ILS/src/templates_kcls/opac/myopac/update_email.tt2 b/Open-ILS/src/templates_kcls/opac/myopac/update_email.tt2
new file mode 100644 (file)
index 0000000..8279959
--- /dev/null
@@ -0,0 +1,24 @@
+[%  PROCESS "opac/parts/header.tt2";
+    PROCESS "opac/parts/misc_util.tt2";
+    WRAPPER "opac/parts/myopac/base.tt2";
+    myopac_page = "prefs"  %]
+<div id='myopac_summary_div' style="padding:0px;">
+
+[% IF ctx.invalid_email %]
+    <div id='account-update-email-error'>
+        [% l('The email address "<b>[_1]</b>" is invalid.  Please try a different email address.', ctx.invalid_email) | html %]
+    </div>
+[% END %]
+
+<form method='POST' id='account-update-email'>
+    [% IF CGI.param("return_to_referer") %]
+    <input type="hidden" name="redirect_to" value="[% ctx.referer | html %]" />
+    [% END %]
+    <table> 
+        <tr><td>[% l('Current Email') %]</td><td>[% ctx.user.email | html %]</td></tr>
+        <tr><td>[% l('New Email') %]</td><td><input type='text' name='email' value='[% ctx.invalid_email | html %]'/></td></tr>
+        <tr><td colspan='2' align='center'><input value="[% l('Submit') %]" type='submit'/></td></tr>
+    </table>
+</form>
+
+[% END %]
diff --git a/Open-ILS/src/templates_kcls/opac/myopac/update_password.tt2 b/Open-ILS/src/templates_kcls/opac/myopac/update_password.tt2
new file mode 100644 (file)
index 0000000..c87fc5d
--- /dev/null
@@ -0,0 +1,33 @@
+[%  PROCESS "opac/parts/header.tt2";
+    PROCESS "opac/parts/misc_util.tt2";
+    WRAPPER "opac/parts/myopac/base.tt2";
+    myopac_page = "prefs"  %]
+
+<div id='myopac_summary_div' style="padding:0px;">
+
+[% IF ctx.password_invalid %]
+    <div id='account-update-email-error'> <!-- borrow css from update-email page -->
+        [% |l %] New password is invalid.  Please try a different password.  [% END %]
+    </div>
+
+[% ELSIF ctx.password_nomatch %]
+    <div id='account-update-email-error'>
+        [% |l %] Passwords do not match. [% END %]
+    </div>
+
+[% ELSIF ctx.password_incorrect %]
+    <div id='account-update-email-error'>
+        [% |l %] Your current password was not correct. [% END %]
+    </div>
+[% END %]
+
+<form method='POST' id='account-update-email'> 
+    <table> 
+        <tr><td>[% l('Current Password') %]</td><td><input type='password' name='current_pw'/></td></tr>
+        <tr><td>[% l('New Password') %]</td><td><input type='password' name='new_pw'/></td></tr>
+        <tr><td>[% l('New Password Again') %]</td><td><input type='password' name='new_pw2'/></td></tr>
+        <tr><td colspan='2' align='center'><input value="[% l('Submit') %]" type='submit'/></td></tr>
+    </table>
+</form>
+
+[% END %]
diff --git a/Open-ILS/src/templates_kcls/opac/myopac/update_username.tt2 b/Open-ILS/src/templates_kcls/opac/myopac/update_username.tt2
new file mode 100644 (file)
index 0000000..8ff329e
--- /dev/null
@@ -0,0 +1,29 @@
+[%  PROCESS "opac/parts/header.tt2";
+    PROCESS "opac/parts/misc_util.tt2";
+    WRAPPER "opac/parts/myopac/base.tt2";
+    myopac_page = "prefs"  %]
+<div id='myopac_summary_div' style="padding:0px;">
+
+[% IF ctx.invalid_username %]
+    <div id='account-update-email-error'> <!-- borrow css from update-email page -->
+        [% l('"<b>[_1]</b>" is not a valid username.  Usernames cannot have any spaces.  Please try a different username.', ctx.invalid_username) | html %]
+    </div>
+
+[% ELSIF ctx.username_exists %]
+    <div id='account-update-email-error'>
+        [% bad_user = ctx.username_exists | html %]
+        [% | l(bad_user) %]
+        The username "<b>[_1]</b>" is taken.  Please try a different username.
+        [% END %]
+    </div>
+[% END %]
+
+<form method='POST' id='account-update-email'> 
+    <table> 
+        <tr><td>[% l('Current Username') %]</td><td>[% ctx.user.usrname | html %]</td></tr>
+        <tr><td>[% l('New Username') %]</td><td><input type='text' name='username' value='[% ctx.invalid_username | html %]'/></td></tr>
+        <tr><td colspan='2' align='center'><input value="[% l('Submit') %]" type='submit'/></td></tr>
+    </table>
+</form>
+
+[% END %]
diff --git a/Open-ILS/src/templates_kcls/opac/parts/advanced/expert.tt2 b/Open-ILS/src/templates_kcls/opac/parts/advanced/expert.tt2
new file mode 100644 (file)
index 0000000..935da51
--- /dev/null
@@ -0,0 +1,29 @@
+<form id="adv_search_form" action="[% ctx.opac_root %]/results" method="GET">
+    <div class="header_middle">[% l("Expert Search") %]</div>
+    <input type="hidden" name="_special" value="1" />
+    <table class="expert-search">
+        <tbody id="adv_expert_rows_here">
+            <tr id="adv_expert_row">
+                <th>[% l("Tag:") %]</th>
+                <td><input type="text" name="tag" size="3" /></td>
+                <th>[% l("Subfield:") %]</th>
+                <td><input type="text" name="subfield" size="1" /></td>
+                <th>[% l("Value:") %]</th>
+                <td><input type="text" name="term" size="16" /></td>
+                <td>
+                    <a href="javascript:;" class="row-remover"
+                        title="[% l('Remove row') %]" alt="[% l('Remove row') %]"
+                        onclick='return killRowIfAtLeast(1, this);'><img src="[% ctx.media_prefix %]/images/adv_row_close_btn.png" /></a>
+                </td>
+            </tr>
+        </tbody>
+        <tfoot>
+            <tr>
+                <td colspan="2"><a href="javascript:addExpertRow();">[ [% l("Add row") %] ]</a></td>
+                <td colspan="4">
+                    <input type="image" src="[% ctx.media_prefix %]/images/search_btn.gif" alt="[% l('Search') %]" title="[% l('Search') %]" />
+                </td>
+            </tr>
+        </tfoot>
+    </table>
+</form>
diff --git a/Open-ILS/src/templates_kcls/opac/parts/advanced/global_row.tt2 b/Open-ILS/src/templates_kcls/opac/parts/advanced/global_row.tt2
new file mode 100644 (file)
index 0000000..f5b22eb
--- /dev/null
@@ -0,0 +1,52 @@
+[%
+    contains_options = [
+        {value => 'contains', label => l('Contains')},
+        {value => 'nocontains', label => l('Does not contain')},
+        {value => 'phrase', label => l('Contains phrase')},
+        {value => 'exact', label => l('Matches exactly')}
+    ];
+    contains = CGI.param('contains');
+    queries = CGI.param('query');
+    bools = CGI.param('bool');
+    qtypes = CGI.param('qtype');
+    rowcount = 3;
+
+    # scalar.merge treats the scalar as a 1-item array
+    WHILE queries.size < rowcount; queries = queries.merge(['']); END;
+    WHILE bools.size < rowcount; bools = bools.merge(['and']); END;
+    WHILE qtypes.size < rowcount; qtypes = qtypes.merge(['keyword']); END;
+
+    FOR qtype IN qtypes;
+        c = contains.shift;
+        b = bools.shift;
+        q = queries.shift; %]
+
+<!-- tag the second row so the bool column won't be hidden -->
+<tr[% IF loop.index == 1 %] id="adv_global_row"[% END %]>
+    <td align='left' width='100%' nowrap='nowrap'>
+
+        <!-- bool selector.  hide for first row.  safe to ignore first bool value in form submission -->
+        <select name='bool' style='width: auto' [% IF loop.first %] class='invisible' [% END %]>
+            <option value='and' [% b == 'and' ? 'selected="selected"' : '' %]>[% l('And') %]</option>
+            <option value='or' [% b == 'or' ? 'selected="selected"' : '' %]>[% l('Or') %]</option>
+        </select>
+
+        <!-- keyword, subject, etc. selector -->
+        <span class="opac-auto-078">
+            [% INCLUDE "opac/parts/qtype_selector.tt2"
+                query_type=qtype %]
+        </span>
+
+        <select name='contains' style='margin-right: 7px;'>
+            [% FOR o IN contains_options; -%]
+            <option value="[% o.value %]" [% c == o.value ? ' selected="selected"' : '' %]>[% o.label %]</option>
+            [% END %]
+        </select>
+        <input type='text' size='18' name='query' value="[% q | html %]" [% IF loop.first %]id='adv-query-text-1'[% END %]/>
+        [% IF loop.first %]<script>document.getElementById('adv-query-text-1').focus()</script>[% END %]
+        <a href="javascript:;" class="row-remover"
+            title="[% l('Remove row') %]" alt="[% l('Remove row') %]"
+            onclick='return killRowIfAtLeast(2, this);'><img src="[% ctx.media_prefix %]/images/adv_row_close_btn.png" /></a>
+    </td>
+</tr>
+[% END %]
diff --git a/Open-ILS/src/templates_kcls/opac/parts/advanced/numeric.tt2 b/Open-ILS/src/templates_kcls/opac/parts/advanced/numeric.tt2
new file mode 100644 (file)
index 0000000..f10d4aa
--- /dev/null
@@ -0,0 +1,28 @@
+<form id="adv_search_form" action="[% ctx.opac_root %]/results" method="GET">
+    <div class="header_middle">[% l("Numeric Search") %]</div>
+    <input type="hidden" name="contains" value="contains" />
+    <input type="hidden" name="_special" value="1" />
+    <table>
+        <tr>
+            <td>
+                <select name="qtype">
+                    <option value="identifier|isbn">[% l('ISBN') %]</option>
+                    <option value="identifier|issn">[% l('ISSN') %]</option>
+                    <option value="identifier|bib_cn">[% l('Bib Call Number') %]</option>
+                    <option value="cnbrowse">[% l('Call Number (Shelf Browse)') %]</option>
+                    <option value="identifier|lccn">[% l('LCCN') %]</option>
+                    <option value="identifier|tcn">[% l('TCN') %]</option>
+                    <option value="item_barcode">[% l('Item Barcode') %]</option>
+                </select>
+            </td>
+            <td>
+                <input type="text" name="query" size="16" />
+            </td>
+        </tr>
+        <tr>
+            <td colspan="2" align="right">
+                <input type="image" alt="[% l('Search') %]"
+                    src="[% ctx.media_prefix %]/images/search_btn.gif" />
+            </td>
+    </table>
+</form>
diff --git a/Open-ILS/src/templates_kcls/opac/parts/advanced/search.tt2 b/Open-ILS/src/templates_kcls/opac/parts/advanced/search.tt2
new file mode 100644 (file)
index 0000000..56ae6a5
--- /dev/null
@@ -0,0 +1,203 @@
+<form id="adv_search_form" action="[% ctx.opac_root %]/results" method="GET">
+<table id='adv_global_search' class='data_grid data_grid_center' width='100%'>
+    <tr style='border-bottom: none;'>
+        <!-- Contains the user-addable(?) rows to define search class, containment and text -->
+        <td valign='top' class='opac-auto-012'>
+            <table width='100%' id='adv_global_input_table'>
+                <thead>
+                    <tr>
+                        <td>
+                            <div style="width:100%;" class="header_middle">
+                                [% l("Search Input") %]
+                            </div>
+                        </td>
+                    </tr>
+                </thead>
+                <tbody id='adv_global_tbody'>
+                    [% INCLUDE "opac/parts/advanced/global_row.tt2" %]
+                    <!-- add a new row -->
+                    <tr id='adv_global_addrow'>
+                        <td align='left' style="padding-top:7px;">
+                            <a href="javascript:;" id="myopac_new_global_row" onclick='addSearchRow();'>[% l('Add Search Row') %]</a>
+                        </td>
+                    </tr>
+                </tbody>
+            </table>
+        </td>
+    </tr>
+    <tr>
+        <td align='top'>
+          <div style="width:100%;" class="header_middle">[% l('Search Filters') %]</div>
+          <table cellpadding='10' cellspacing='0' border='0'><tr>
+            <td valign='top'>
+                <strong>[% l("Item Type") %]</strong><br />
+                [%  INCLUDE "opac/parts/coded_value_selector.tt2"
+                        attr=["mattype", "item_type"] multiple="multiple" size="4"
+                        id="adv_global_item_type_basic" %]
+            </td>
+            <td valign='top'>
+                <strong>[% l("Language") %]</strong><br />
+                [%  INCLUDE "opac/parts/coded_value_selector.tt2"
+                        attr="item_lang" multiple="multiple" size="4" %]
+            </td>
+            <td valign='top'>
+                <strong>[% l("Audience") %]</strong><br />
+                    [% INCLUDE "opac/parts/coded_value_selector.tt2"
+                        attr=["audience_group", "audience"] id="adv_global_audience_basic" 
+                        multiple="multiple" size="4" %]
+                </select>
+                    <!--<a id='adv_global_audience_link_adv' class='classic_link adv_adv_link'
+                        href='javascript:void(0);' onclick='
+                        hideMe($("adv_global_audience_basic"));
+                        unHideMe($("adv_global_audience"));
+                        hideMe(this);
+                        unHideMe($("adv_global_audience_link_basic"));
+                        '>[% l("Advanced") %]</a>
+                    <a id='adv_global_audience_link_basic' class='hide_me classic_link adv_adv_link'
+                        href='javascript:void(0);' onclick='
+                        unHideMe($("adv_global_audience_basic"));
+                        hideMe($("adv_global_audience"));
+                        unHideMe($("adv_global_audience_link_adv"));
+                        hideMe(this);'>[% l("Basic") %]</a>-->
+            </td>
+            <td valign='top'>
+            <strong>[% l("Sort Results") %]</strong>
+              <table class='opac-auto-017'>
+                <tr>
+                    <td align='center' width='100%'>
+                        [% INCLUDE "opac/parts/filtersort.tt2"
+                            value=CGI.param('sort') %]
+                    </td>
+                </tr>
+              </table>
+            </td>
+          </tr></table>
+        </td>
+    </tr>
+    <tr>
+        <td colspan="2">
+            <table cellpadding='10' cellspacing='0' border='0'>
+                <tbody>
+                    <tr>
+                        <td valign='top'>
+                            <strong>[% l("Search Library") %]</strong><br />
+                            [% PROCESS "opac/parts/org_selector.tt2";
+                                PROCESS build_org_selector name='loc' value=loc %]
+                            <div style="position:relative;top:7px;">
+                                <input type='checkbox' name="modifier"
+                                value="available"[% CGI.param('modifier').grep('available').size ? ' checked="checked"' : '' %]
+                                    id='opac.result.limit2avail' />
+                                <label style="position:relative;top:-2px;"
+                                    for='opac.result.limit2avail'>
+                                    [% l("Limit to Available") %]</label>
+                            </div>
+                        </td>
+                        <td valign='top'>
+                            <strong>[% l("Publication Year") %]</strong><br />
+                            <select id='adv_global_pub_date_type' name='pubdate' onchange='
+                                if(this.selectedIndex == 3)
+                                    unHideMe($("adv_global_pub_date_2_span"));
+                                else
+                                    hideMe($("adv_global_pub_date_2_span"));'>
+                                    [%  FOR opt IN [
+                                            {"code" => "is", "label" => l("Is")},
+                                            {"code" => "before", "label" => l("Before")},
+                                            {"code" => "after", "label" => l("After")},
+                                            {"code" => "between", "label" => l("Between")}
+                                        ];
+                                            |l(opt.code, opt.label) %]
+                                        <option value="[_1]"[% CGI.param('pubdate') == opt.code ? ' selected="selected"' : '' %]>[_2]</option>
+                                    [%  END; END %]
+                            </select>    
+                            <div style='margin-top:5px;'>
+                                <input id='adv_global_pub_date_1' name='date1' type='text' size='4' maxlength='4' value="[% CGI.param('date1') | html %]" />
+                                <span id='adv_global_pub_date_2_span' class='[% CGI.param("pubdate") == "between" ? "" : "hide_me" %]'>
+                                   [% l("and") %] <input name='date2' id='adv_global_pub_date_2' type='text' size='4' maxlength='4' value="[% CGI.param('date2') | html %]" />
+                                </span>
+                            </div>
+                        </td>
+                    </tr>
+                    <!-- copy location selector -->
+                    <tr id='adv_copy_location_filter_row' class='hide_me'>
+                        <td align='right'>[% l("Shelving Location") %]</td>
+                        <td align='left' id='adv_copy_location_filter_td'>
+                            <select size='3' id='adv_copy_location_filter_select' multiple='multiple'>
+                            </select>
+                        </td>
+                    </tr>
+                </tbody>
+            </table>
+        </td>
+    </tr>
+    <tr class='border_4_2'>
+        <td align="left" colspan='2'>
+            <input type="image" src="[% ctx.media_prefix %]/images/search_btn.gif"
+            alt="[% l('Search') %]" class='pointer' />
+            &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
+            <a href='[% mkurl('', {}, 1) %]'>[% l('Clear Form') %]</a>
+        </td>
+    </tr>
+</table>
+<input type="hidden" name="_adv" value="1" />
+</form>
+<div id='adv_quick_search_sidebar' class='sidebar_chunk hide_me'> 
+    <div id='adv_quick_search'>
+        <div class='adv_quick_search color_4'><b>[% l("Quick Search") %]</b></div>
+        <div style='margin-top: 8px;'>
+            <table><tbody><tr>
+                <td>
+                    <select id='adv_quick_type'>
+                        <option value='isbn'>[% l("ISBN") %]</option>
+                        <option value='issn'>[% l("ISSN") %]</option>
+                        <option value='cn'>[% l("Call Number") %]</option>
+                        <option value='lccn'>[% l("LCCN") %]</option>
+                        <option value='tcn'>[% l("TCN") %]</option>
+                        <option value='barcode'>[% l("Item Barcode") %]</option>
+                    </select>
+                </td><td>
+                    <input type='text' id='adv_quick_text' size='16' />
+                </td>
+            </tr></tbody></table>
+        </div>
+
+        <div style='margin-top: 8px;' class='adv_quick_search_submit'>
+            <!-- XXX TODO make a real form, and make a real submitter (quick
+            submit, FKA advGenericSearch() -->
+            <img src="[% ctx.media_prefix %]/images/search_btn.gif"
+                alt="[% l('Search') %]" id="adv_quick_submit" class='pointer' />
+        </div>
+    </div>
+</div>
+
+
+<div id='adv_marc_search_sidebar' class='sidebar_chunk hide_me'
+    style='width:400px; margin-top: 20px;'> 
+    <div class='adv_quick_search color_4'><b>[% l("MARC Expert Search") %]</b></div>
+    <table style='margin: 3px; width: 100%;' id='adv_sdbar_table'
+        class='border_4_3'>
+        <tbody>
+            <tr>
+                <td align="right">[% l("Tag:") %]</td>
+                <td align="left"><input name='advanced.marc.tag' maxlength='3' size='3' /></td>
+                <td align="right">[% l("Subfield:") %]</td>
+                <td align="left"><input name='advanced.marc.subfield' maxlength='1' size='1' /></td>
+            </tr>
+            <tr>
+                <td align="right">[% l("Value:") %]</td>
+                <td colspan='3' align="left"><input name='advanced.marc.value' size='18' /></td>
+            </tr>
+            <tr name='crow' class='hide_me'>
+                <td colspan='4' align='center'>
+                    <a href='javascript:void(0);' class='classic_link'>[% l("close") %]</a>
+                </td>
+            </tr>
+        </tbody>
+    </table>
+    <div id='adv_marc_submit' class='adv_quick_search_submit'>
+        <a style='margin-right: 4px; position:relative;top:-10px;'
+            class='classic_link' href='javascript:advAddMARC();'>[% l("Add Row") %]</a>
+        <!-- XXX TODO make a real form, and make a real submitter (FKA
+        advMARCRun()) -->
+        <img alt="Search" src="[% ctx.media_prefix %]/images/search_btn.gif" class='pointer' />
+    </div>
+</div>
diff --git a/Open-ILS/src/templates_kcls/opac/parts/anon_list.tt2 b/Open-ILS/src/templates_kcls/opac/parts/anon_list.tt2
new file mode 100644 (file)
index 0000000..89273a6
--- /dev/null
@@ -0,0 +1,65 @@
+        [% 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="opac-auto-179" 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="opac-auto-179-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="opac-auto-097b" style="padding-left: 10px;">
+                            <input type="checkbox" name="record" value="[% item %]" />
+                        </td>
+                        <td class="opac-auto-097b" style="padding-left: 5px;">[% attrs.title | html %]</td>
+                        <td class="opac-auto-097b" style="padding-left: 5px;">[% attrs.author | html %]</td>
+                    </tr>
+                    [% END %]
+                </tbody>
+            </table>
+            <br /><br />
+        </div>
+        </form>
+        [% END %]
diff --git a/Open-ILS/src/templates_kcls/opac/parts/banner.tt2 b/Open-ILS/src/templates_kcls/opac/parts/banner.tt2
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/Open-ILS/src/templates_kcls/opac/parts/base.tt2 b/Open-ILS/src/templates_kcls/opac/parts/base.tt2
new file mode 100644 (file)
index 0000000..47d1c41
--- /dev/null
@@ -0,0 +1,22 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns='http://www.w3.org/1999/xhtml' lang='[% ctx.locale %]' xml:lang='[% ctx.locale %]'>
+    <head>
+        <meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
+        [% IF ctx.refresh %]
+        <meta http-equiv="refresh" content="[% ctx.refresh %]">
+        [% ELSIF ctx.authtime %]
+        <meta http-equiv="refresh" content="[% ctx.authtime %]; url=[% ctx.logout_page %]">
+        [% END %]
+        <link rel="stylesheet" type="text/css" href="[% ctx.media_prefix %]/css/skin/default/opac/semiauto.css" />
+        <link rel="stylesheet" type="text/css" href="[% ctx.media_prefix %]/css/skin/default/opac/style.css" />
+        <title>[% l('Catalog - [_1]', ctx.page_title) %]</title>
+        <link rel="unapi-server" type="application/xml" title="unAPI" href="/opac/extras/unapi" />
+        [% INCLUDE 'opac/parts/goog_analytics.tt2' %]
+    </head>
+    <body>
+        [% content %] 
+        [% INCLUDE 'opac/parts/footer.tt2' %]
+        [% INCLUDE 'opac/parts/js.tt2' %]
+        [% INCLUDE 'opac/parts/chilifresh.tt2' %]
+    </body>
+</html>
diff --git a/Open-ILS/src/templates_kcls/opac/parts/chilifresh.tt2 b/Open-ILS/src/templates_kcls/opac/parts/chilifresh.tt2
new file mode 100644 (file)
index 0000000..d58b3f5
--- /dev/null
@@ -0,0 +1,20 @@
+
+<!-- Set up the chilifresh account information and load the JS -->
+
+[%  IF ENV.OILS_CHILIFRESH_URL AND ENV.OILS_CHILIFRESH_ACCOUNT 
+            AND (ctx.page == 'rresult' OR ctx.page == 'record');
+        chili_url = ENV.OILS_CHILIFRESH_URL;
+        IF CGI.https AND ENV.OILS_CHILIFRESH_HTTPS_URL;
+            chili_url = ENV.OILS_CHILIFRESH_HTTPS_URL;
+        END; 
+%]
+    <input type="hidden" id="chilifresh_account" name="chilifresh_account" value="[% ENV.OILS_CHILIFRESH_ACCOUNT %]"/>
+    <!--
+    <input type="hidden" id="chilifresh_profile" name="chilifresh_profile" value="[% ENV.OILS_CHILIFRESH_PROFILE %]"/>
+    -->
+    <input type="hidden" id="chilifresh_version" name="chilifresh_version" value="onsite_v1" />
+    <input type="hidden" id="chilifresh_type" name="chilifresh_type" value="search" />
+    <script type="text/javascript" src="[% chili_url %]"></script>
+    <script>try { setTimeout(chili_init, 0); } catch(E) {}</script>
+[% END %]
+
diff --git a/Open-ILS/src/templates_kcls/opac/parts/coded_value_selector.tt2 b/Open-ILS/src/templates_kcls/opac/parts/coded_value_selector.tt2
new file mode 100644 (file)
index 0000000..4315bc2
--- /dev/null
@@ -0,0 +1,32 @@
+
+[%- 
+    # If caller passes a list of possible attribute types, 
+    # search all until we find some values
+
+    IF !attr.size; attr = [attr]; END;
+    all_values = [];
+    attr_class = '';
+    FOR attr_class IN attr;
+        all_values = ctx.search_ccvm('ctype', attr_class);
+        IF all_values.size > 0; LAST; END;
+    END;
+    name = name || "fi:" _ attr_class;
+    id = id || attr_class _ "_selector";
+    values = values || CGI.param(name); 
+-%]
+
+<select id='[% id %]' name='[% name %]'[%
+    multiple ? ' multiple="multiple"' : '';
+    size ? (' size="' _ size _ '"') : ''; %]>
+[% IF none_ok %]
+    <option value=''>[% none_label ? none_label : l('-- Any --') %]</option>
+[% END;
+sorter = [];
+FOR o IN all_values; 
+    sorter.push({code => o.code, value  => o.value}); 
+END;
+FOR o IN sorter.sort('value') %]
+    <option value='[% o.code | uri %]'[% values.grep('^' _ o.code _ '$').size ? ' selected="selected"' : '' %]>[% o.value | html %]</option>
+[%  END -%]
+</select>
+
diff --git a/Open-ILS/src/templates_kcls/opac/parts/config.tt2 b/Open-ILS/src/templates_kcls/opac/parts/config.tt2
new file mode 100644 (file)
index 0000000..696a99d
--- /dev/null
@@ -0,0 +1,71 @@
+[% 
+
+##############################################################################
+# This file contains skin-level configuration settings.
+# Many of these settings will probably migrate into actor.org_unit_settings.
+##############################################################################
+
+##############################################################################
+# RefWorks configuration
+##############################################################################
+# RefWorks is a Web-based citation manager
+ctx.refworks.enabled = 'false';
+
+# Base URL for RefWorks
+ctx.refworks.url = 'http://www.refworks.com';
+
+# Some sites have a hosted RefWorks instance at a different URL;
+# in addition, you might want to proxy access to RefWorks - for example:
+# ctx.refworks.url = 'http://librweb.laurentian.ca/login?url=http://refworks.scholarsportal.info';
+
+##############################################################################
+# OpenURL resolution
+##############################################################################
+# Evergreen provides the ability to point at an OpenURL resolver to find
+# electronic resources for a given ISSN or ISBN. Currently, only the SFX
+# resolver is supported.
+#
+# You must enable the open-ils.resolver instance in opensrf.xml to use
+# this feature.
+##############################################################################
+
+openurl.enabled = 'false';
+openurl.baseurl = 'http://sfx.example.com/instance';
+
+##############################################################################
+# Google Analytics support
+##############################################################################
+# You can enable Google Analytics support in Evergreen by entering a
+# valid Google Analytics code and changing 'false' to 'true'
+##############################################################################
+google_analytics.enabled = 'false';
+google_analytics.code = 'UA-9999999-99';
+
+##############################################################################
+# Enable "Forgot your password?" prompt at login
+##############################################################################
+reset_password = 'true';
+
+##############################################################################
+# Misc. UI Settings
+##############################################################################
+
+##############################################################################
+# Size of the jacket image to display on the record detail summary.
+# Sizes vary depending on added content provider.
+# Options are "small", "medium", and "large"
+record.summary.jacket_size = 'medium';
+
+##############################################################################
+# Define the order in which facets are displayed.  Only facets listed here 
+# will be displayed.  To show all facets sorted by name, comment out this 
+# setting.  
+# facet.display = [] # show no facets
+facet.display = [
+    {facet_class => 'subject',    facet_order => ['complete']}
+    {facet_class => 'series',     facet_order => ['seriestitle']},
+    {facet_class => 'identifier', facet_order => ['mattype']},
+];
+
+
+%]
diff --git a/Open-ILS/src/templates_kcls/opac/parts/filtersort.tt2 b/Open-ILS/src/templates_kcls/opac/parts/filtersort.tt2
new file mode 100644 (file)
index 0000000..664be17
--- /dev/null
@@ -0,0 +1,16 @@
+<select class="results_header_sel" id='opac.result.sort' name="sort"
+    [% IF submit_on_change %]onchange='this.form.submit()'[% END %]>
+    <option value=''>[% l("Sort by Relevance") %]</option>
+    <optgroup label='[% l("Sort by Title") %]'>
+        <option value='titlesort'[% value == 'titlesort' ? ' selected="selected"' : '' %]>[% l("Title: A to Z") %]</option>
+        <option value='titlesort.desc'[% value == 'titlesort.desc' ? ' selected="selected"' : '' %]>[% l("Title: Z to A") %]</option>
+    </optgroup>
+    <optgroup label='[% l("Sort by Author") %]'>
+        <option value='authorsort'[% value == 'authorsort' ? ' selected="selected"' : '' %]>[% l("Author: A to Z") %]</option>
+        <option value='authorsort.desc'[% value == 'authorsort.desc' ? ' selected="selected"' : '' %]>[% l("Author: Z to A") %]</option>
+    </optgroup>
+    <optgroup label='[% l("Sort by Publication Date") %]'>
+        <option value='pubdate.desc'[% value == 'pubdate.desc' ? ' selected="selected"' : '' %]>[% l("Date: Newest to Oldest") %]</option>
+        <option value='pubdate'[% value == 'pubdate' ? ' selected="selected"' : '' %]>[% l("Date: Oldest to Newest") %]</option>
+    </optgroup>
+</select>
diff --git a/Open-ILS/src/templates_kcls/opac/parts/footer.tt2 b/Open-ILS/src/templates_kcls/opac/parts/footer.tt2
new file mode 100644 (file)
index 0000000..9ab3ace
--- /dev/null
@@ -0,0 +1,10 @@
+<div id="footer">
+    <a href="http://www.kcls.org/usingthelibrary/request/">[% l('Request a Purchase') %]</a> &nbsp;|&nbsp;
+    <a href="http://www.kcls.org/usingthelibrary/request/">[% l('Interlibrary Loan') %]</a> &nbsp;|&nbsp;
+    <a href="http://www.kcls.org/about/contact/">[% l('Contact Us') %]</a> &nbsp;|&nbsp;
+    <a href="http://www.kcls.org/usingthelibrary/catalog_help/">[% l('Site Help') %]</a> &nbsp;|&nbsp;
+    <a href="http://www.kcls.org/usingthelibrary/policies/privacy.cfm">[% l('Privacy Statement') %]</a> &nbsp;|&nbsp;
+    <a href="http://www.kcls.org/about/support/">[% l('Support KCLS') %]</a> &nbsp;|&nbsp;
+    <a href="http://www.kcls.org/employment/">[% l('Employment') %]</a> 
+</div>
+
diff --git a/Open-ILS/src/templates_kcls/opac/parts/goog_analytics.tt2 b/Open-ILS/src/templates_kcls/opac/parts/goog_analytics.tt2
new file mode 100644 (file)
index 0000000..e3e0ed8
--- /dev/null
@@ -0,0 +1,14 @@
+<!-- http://www.google.com/support/googleanalytics/bin/answer.py?answer=174090 -->
+<script type="text/javascript">
+    var _gaq = _gaq || [];
+    _gaq.push(['_setAccount', 'UA-3018520-10']);
+    _gaq.push(['_trackPageview']);
+
+    (function() {
+        var ga = document.createElement('script'); 
+        ga.type = 'text/javascript'; ga.async = true;
+        ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
+        var s = document.getElementsByTagName('script')[0]; 
+        s.parentNode.insertBefore(ga, s);
+    })();
+</script>
diff --git a/Open-ILS/src/templates_kcls/opac/parts/header.tt2 b/Open-ILS/src/templates_kcls/opac/parts/header.tt2
new file mode 100644 (file)
index 0000000..f23c3e7
--- /dev/null
@@ -0,0 +1,73 @@
+[%- USE money = format(l('$%.2f'));
+    USE date;
+    USE CGI = CGI_utf8;
+    USE POSIX;
+    SET DATE_FORMAT = l('%m/%d/%Y');
+
+    PROCESS "opac/parts/config.tt2";
+
+    # Don't wrap in l() here; do that where this format string is actually used.
+    SET HUMAN_NAME_FORMAT = '[_1] [_2] [_3] [_4] [_5]';
+
+    is_advanced = CGI.param("_adv").size;
+    is_special = CGI.param("_special").size;
+
+    # -----------------------------------------------------------------------------
+    # mkurl( destination_page, params_to_set, params_to_clear )
+    #
+    # Current page, updated params:
+    # mkurl('', {foo => 'bar', boo => 'baz'});
+    #
+    # New page, one param is a list:
+    # mkurl('http://flarg.baz/squz', {foo => 'bar', boo => ['baz', 'faz']});
+    #
+    # New page, clear all existing params before applying new ones:
+    # mkurl('/fuz/buster', {foo => 'bar', boo => 'baz'}, 1); 
+    #
+    # Current page, clear 'some_param' from the existing params:
+    # mkurl('', {foo => 'bar', boo => 'baz'}, ['some_param']);
+    MACRO mkurl(page, params, clear_params) BLOCK;
+
+        # clone the query string to avoid clobberation
+        cgi = CGI.new(CGI.query_string);
+
+        # remove requested params
+        IF clear_params.0; # array
+            FOR p IN clear_params; cgi.delete(p); END;
+        ELSIF clear_params;
+            cgi.delete_all();
+        END;
+
+        # x and y are artifacts of using <input type="image" /> tags 
+        # instead of true submit buttons, and their values are never used.
+        cgi.delete('x', 'y'); 
+
+        # apply user params
+        FOR k IN params.keys;
+            encoded = [];
+            max = params.$k.max;
+            list = (params.$k.0 OR max == -1) ? params.$k : [params.$k];
+            IF list.size == 0; NEXT; END;
+            # CGI croaks on already-decoded strings.  force-encode to be safe.
+            FOR p IN list; encoded.push(ctx.encode_utf8(p)); END;
+            foo = cgi.param("-name", k, "-values", encoded);
+        END;
+
+        # for url brevity, remove any params that have no value
+        FOR p IN cgi.param;
+            val = cgi.param(p);
+            IF val == ''; cgi.delete(p); END;
+        END;
+
+        IF page;
+            IF cgi.query_string;
+                page _ '?' _ cgi.query_string;
+            ELSE;
+                page;
+            END;
+        ELSE;
+            # staying on the current page
+            cgi.url("-path" => 1, "-query" => 1);
+        END;
+    END;
+%]
diff --git a/Open-ILS/src/templates_kcls/opac/parts/hold_error_messages.tt2 b/Open-ILS/src/templates_kcls/opac/parts/hold_error_messages.tt2
new file mode 100644 (file)
index 0000000..e79e81d
--- /dev/null
@@ -0,0 +1,39 @@
+[%
+    # XXX It might be cleaner to move this into its own file or something.
+    #
+    # The following hash should have fail_parts as keys and user/patron-friendly
+    # strings as values.  If the system returns an event with a fail_part when
+    # you attempt to place a hold and the fail part matches something in this
+    # hash, this is the message that will be displayed to the user. Wait until
+    # these are used to pass them through l() for i18n.
+
+    FAIL_PART_MSG_MAP = {
+        "actor.usr.barred" => l("The patron is barred"),
+        "asset.copy.circulate" => l("The item does not circulate"),
+        "asset.copy_location.circulate" => l("Items from this shelving location do not circulate"),
+        "asset.copy.status" => l("The item cannot circulate at this time"),
+        "circ.holds.target_skip_me" => l("The item's circulation library does not fulfill holds"),
+        "config.circ_matrix_circ_mod_test" => l("The patron has too many items of this type checked out"),
+        "config.circ_matrix_test.available_copy_hold_ratio" => l("The available item-to-hold ratio is too low"),
+        "config.circ_matrix_test.circulate" => l("Circulation rules reject this item as non-circulatable"),
+        "config.circ_matrix_test.total_copy_hold_ratio" => l("The total item-to-hold ratio is too low"),
+        "config.hold_matrix_test.holdable" => l("Hold rules reject this item as unholdable"),
+        "config.hold_matrix_test.max_holds" => l("The patron has reached the maximum number of holds"),
+        "config.rule_age_hold_protect.prox" => l("The item is too new to transit this far"),
+        "no_item" => l("The system could not find this item"),
+        "no_ultimate_items" => l("The system could not find any items to match this hold request"),
+        "no_matchpoint" => l("System rules do not define how to handle this item"),
+        "no_user" => l("The system could not find this patron"),
+        "transit_range" => l("The item cannot transit this far")
+    };
+
+
+    # This works like the above has, but instead of fail_parts for keys, use
+    # the textcode of the event.  This will only be consulted for events
+    # that do not have a fail_part matching something in the above hash.
+    # Wait until these are used to pass them through l() for i18n.
+
+    EVENT_MSG_MAP = {
+        "PATRON_EXCEEDS_FINES" => l("Patron has reached the maximum fine amount")
+    };
+%]
diff --git a/Open-ILS/src/templates_kcls/opac/parts/hold_status.tt2 b/Open-ILS/src/templates_kcls/opac/parts/hold_status.tt2
new file mode 100644 (file)
index 0000000..f2b3deb
--- /dev/null
@@ -0,0 +1,31 @@
+[% BLOCK get_hold_status %]
+    <div>
+    [% 
+        IF hold.hold.status == 4 %]
+            <span style='color:blue'> [% l("Available"); %] </span> [%
+            IF ahr.shelf_expire_time;
+                l('<br/>Expires [_1]', 
+                    date.format(ctx.parse_datetime(ahr.shelf_expire_time), DATE_FORMAT));
+            END;
+        END;
+    %]
+    [%#
+
+        ELSIF hold.hold.estimated_wait AND hold.hold.estimated_wait > 0;
+            # estimated wait is delivered as seconds.
+            SET hwait = POSIX.ceil(hold.hold.estimated_wait / 86400);
+            l("Estimated wait: [quant,_1,day,days]", hwait);
+
+        ELSIF hold.hold.status == 3;
+            l("In Transit");
+
+        ELSIF hold.hold.status < 3;
+            l("Waiting for copy");
+        END 
+    %]
+    <div>
+    <div>
+        [% l('[_1] hold on [quant,_2,circulating copy,circulating copies]', 
+            hold.hold.queue_position, hold.hold.potential_copies) %]
+    </div>
+[% END %]
diff --git a/Open-ILS/src/templates_kcls/opac/parts/homesearch.tt2 b/Open-ILS/src/templates_kcls/opac/parts/homesearch.tt2
new file mode 100644 (file)
index 0000000..81085a8
--- /dev/null
@@ -0,0 +1,96 @@
+<!--
+<div style='width:664px;height:35px;background:#FFFFFF;'>
+    <strong><center></center></strong>
+</div>
+-->
+
+<!-- ========================================================================================== 
+    HOME BANNER / CONTENT SLIDER
+    ==========================================================================================  -->
+<link rel="stylesheet" type="text/css" href="[% ctx.media_prefix %]/css/skin/default/opac/contentslider.css" />
+<div id="hp-banner">
+    <div id="hp-welcome">
+        <h2>Work continues on the <br />KCLS Catalog.</h2>
+        KCLS is committed to providing you with <br />information on outstanding issues and pending improvements.<br /><br />
+        <a href="http://www.kcls.org/newcatalog" style="position:relative;top:5px;">Learn more &raquo;</a><br /><br />
+        <div id="paginate-homebanner">
+            <a class="toc" href="#1" rel="1" style="background:gray;"></a>
+            <a class="toc" href="#2" rel="2" style="background:#ffc331;"></a>
+            <a class="toc" href="#3" rel="3" style="background:pink;"></a>
+            <a class="toc" href="#4" rel="4" style="background:#2bb0fd;"></a>
+            <a class="toc" href="#5" rel="5" style="background:#54987f;"></a>
+            <a class="toc" href="#6" rel="6" style="background:white;"></a>
+        </div>
+    </div>
+    <div style="float:right;width:675px;height:213px;color:green;overflow:hidden;">
+        <div id="homebanner" class="sliderwrapper">
+            <div class="contentdiv">
+                <img src="[% ctx.media_prefix %]/images/seewhatsnew.jpg" />
+            </div>
+            <div class="contentdiv">
+                <a href='http://www.kcls.org/libraryoftheyear/'><img src="[% ctx.media_prefix %]/images/thebest.jpg" /></a>
+            </div>
+            <div class="contentdiv">
+                <a href='http://www.kcls.org/newcatalog/'><img src="[% ctx.media_prefix %]/images/telephonenotices.png" /></a>
+            </div>
+            <div class="contentdiv">
+                <img src="[% ctx.media_prefix %]/images/digitaldownloads.jpg" />
+            </div>
+            <div class="contentdiv">
+                <img src="[% ctx.media_prefix %]/images/libraryelf.jpg" />
+            </div>
+        </div>
+    </div>
+</div>
+<script type="text/javascript" src="[% ctx.media_prefix %]/js/ui/opac/contentslider.js"></script>
+<script>
+    setTimeout(
+        function() {
+            featuredcontentslider.init({
+                id: "homebanner",
+                contentsource: ["inline", ""],
+                toc: "markup",
+                nextprev: ["", ""],
+                enablefade: [true, 0.04],
+                onChange: function(previndex, curindex){},
+                autorotate: [true, 3000] //pause time (in milliseconds)
+            })
+        }, 100
+    );
+</script>
+<!-- ========================================================================================== 
+    HOME BANNER / CONTENT SLIDER.  Remove this ^== script when the banner is removed
+    ==========================================================================================  -->
+
+<div id="hp-buttons">
+    <div style="float:left;">
+        <img src='[% ctx.media_prefix %]/images/hp-links-left.jpg' />
+    </div>
+    <div style="float:left;">
+        <div id="home-buttons-inner">
+            <table cellpadding="0" cellspacing="5" border="0" id="hp-ql-table">
+                <tr><td colspan="4"><span style="color: #333;font-weight: bold;font-size: 13px;">Browse for:</span></td></tr>
+                <tr>
+                    <td><a href="http://www.kcls.org/booksandreading/">books</a></td>
+                    <td><a href="http://www.kcls.org/movies/movies_browse.cfm">movies</a></td>
+                    <td><a href="http://www.kcls.org/ecollection/">downloads</a></td><td><a href="http://www.kcls.org/websites/">websites</a></td>
+                </tr>
+                <tr>
+                    <td><a href="http://www.kcls.org/music/">music</a></td>
+                    <td><a href="http://www.kcls.org/magazines/">magazines</a></td>
+                    <td><a href="http://www.kcls.org/databases/">databases</a></td>
+                    <td><a href="http://www.kcls.org/answers/">answers</a></td
+                ></tr>
+            </table>
+        </div>
+    </div>
+    <div style="float:left;">
+        <img src='[% ctx.media_prefix %]/images/hp-links-right.jpg' />
+    </div>
+    <div style="float:right;">
+        <a href="http://www.kcls.org/locations">
+            <img alt="Locations" src="[% ctx.media_prefix %]/images/locations.jpg" />
+        </a>
+    </div>
+    <div style="clear:both;"></div>
+</div>
diff --git a/Open-ILS/src/templates_kcls/opac/parts/js.tt2 b/Open-ILS/src/templates_kcls/opac/parts/js.tt2
new file mode 100644 (file)
index 0000000..9358317
--- /dev/null
@@ -0,0 +1,41 @@
+<!-- JS imports, etc.  -->
+
+<script type="text/javascript" src="[% ctx.media_prefix %]/js/ui/opac/simple.js"></script>
+
+[% IF ctx.is_staff %]
+<script type="text/javascript" src="[% ctx.media_prefix %]/js/ui/opac/staff.js"></script>
+    [% IF ctx.page == 'record' %]
+        [% IF ctx.search_result_index >= 0 %]
+        <script>
+            rdetail_next_prev_actions(
+                "[% ctx.search_result_index %]",
+                "[% ctx.hit_count %]",
+                "[% ctx.prev_rec_url || '' %]",
+                "[% ctx.next_rec_url || '' %]",
+                "[% mkurl(ctx.first_search_record, {page => 0}) %]",
+                "[% mkurl(ctx.last_search_record, {page => POSIX.floor(ctx.hit_count / ctx.page_size)}) %]"
+            );
+        </script>
+        [% END %]
+        [% IF ctx.mfhd_summaries.size %]
+        <script>
+            window.mfhdDetails = [
+                [% FOR summary IN ctx.mfhd_summaries %]
+                {
+                    'id' : '[% summary.sre_id %]', 
+                    'label' : '[% summary.location %]',
+                    'entryNum' : '[% loop.index %]',
+                    'owning_lib' : '[% summary.owning_lib %]'
+                },
+                [% END %]
+            ];
+        </script>
+        [% END %]
+    [% END %]
+[%- END %]
+
+[% IF ENV.OILS_NOVELIST_URL AND ctx.page == 'record';
+    url = ENV.OILS_NOVELIST_URL;
+    IF CGI.https; url = url.replace('^http:', 'https:'); END; %]
+<script type='text/javascript' id='EIT' src='[% url %]'></script>
+[% END %]
diff --git a/Open-ILS/src/templates_kcls/opac/parts/login/form.tt2 b/Open-ILS/src/templates_kcls/opac/parts/login/form.tt2
new file mode 100644 (file)
index 0000000..8d80082
--- /dev/null
@@ -0,0 +1,154 @@
+<!-- TODO: MOVE INTO SEPARATE FORGOT-PASSWORD PAGE 
+
+<div class="hide_me">
+       <div class='login_text color_1' style='padding: 4px; text-align: center;'>
+               <span>[% l("Login") %]</span>
+       </div>
+       <br/>
+</div>
+<div class="hide_me" id="forget_pw">
+    <h1>Password Reset</h1>
+       Username or Barcode<br />
+       <input type="text" id="forget_pw_user" /><br /><br />
+       Email Address on account<br />
+       <input type="text" id="forget_pw_email" /><br />
+    <a href="#">Submit</a> &nbsp;
+    <a href="#">Cancel</a>
+</div>
+<table id='change_pw_table' class='data_grid hide_me' style='margin-left: 20px;' width='95%'>
+       <thead>
+        <tr><td colspan='2' align='center'><b>[% l("Password") %]</b></td></tr>
+    </thead>
+    <tbody>
+        <tr>
+            <td colspan='2' style='padding:10px;'>
+                [% l("This appears to be the first time you have logged in.  You will need to change your password.") %]
+                [% l("The password must be at least 7 characters in length,
+ contain at least one letter (a-z/A-Z),
+ and contain at least one number.") %]
+            </td>
+        </tr>
+        <tr>
+            <td>[% l("Enter your current password") %]</td>
+            <td><input type='password' id='change_pw_current'/></td>
+        </tr>
+        <tr>
+            <td>[% l("Enter the new password") %]</td>
+            <td><input type='password' id='change_pw_1'/></td>
+        </tr>
+        <tr>
+            <td>[% l("Re-type the new password for verification") %]</td>
+            <td><input type='password' id='change_pw_2'/></td>
+        </tr>
+        <tr><td><br/></td><td/></tr>
+        <tr class='color_1'>
+            <td colspan='2' align='center'>
+                <span class='login_text' style='margin-right: 20px;'>
+                    <input type='submit' value='[% l("Update Password") %]'  id='change_pw_button'/>
+                </span>
+            </td>
+        </tr>
+    </tbody>
+</table>
+
+
+<span id='pw_no_match' class='hide_me'>[% l("Passwords do not match") %]</span>
+<span id='pw_update_successful' class='hide_me'>[% l("Password successfully updated") %]</span>
+<span id='pw_not_strong' class='hide_me'>
+    [% l("The password provided is not strong enough.") %]
+    [% l("The password must be at least 7 characters in length, contain at least one letter (a-z/A-Z), and contain at least one number.") %]
+</span>
+
+ ^== TODO: MOVE INTO SEPARATE FORGOT-PASSWORD PAGE  -->
+
+[% IF ctx.login_failed_event %]
+<div id='login-failed-message'>
+[%
+    IF ctx.login_failed_event.textcode == 'PATRON_CARD_INACTIVE';
+        l("The barcode used to login is marked as inactive.  Please contact your local library.");
+    ELSIF ctx.login_failed_event.textcode == 'PATRON_INACTIVE';
+        l("This account has been deactivated.  Please contact your local library.");
+    ELSE;
+        l("Login failed. The username or password provided was not valid.  
+            Ensure Caps-Lock is off and try again or contact your local library.");
+    END;
+%]
+</div>
+[% END %]
+
+<div>
+    <div style="height:20px;"></div>
+    <form method='POST'>
+        <table cellpadding="0" cellspacing="0" border="0">
+            <tr>
+                <td valign="top" width="676" class="login_boxes left_brain">
+                    <table cellpadding="0" cellspacing="0" border="0"
+                        width="100%">
+                        <tr>
+                               <td colspan="2" style="padding-bottom: 10px;">
+                                <h1>[% l('Log in to Your Account') %]</h1>
+                                [% l('Please enter the following information:') %]
+                                <br /><br />
+                            </td>
+                        </tr>
+                        <tr>
+                            <td width="42%" class="lbl1">
+                                [% l('Library Card Number or Username') %]
+                                <br />
+                                <span class="lbl2">
+                                    [% l('Please include leading zeros and no spaces.') %]
+                                    <br/>
+                                    [% l('Example: 0026626051') %]
+                                </span>
+                                <br /><br />
+                            </td>
+                            <td width="58%" valign="top">
+                                <div class="input_bg">
+                                    <input type="text" id="username_field" name="username"/>
+                                </div>
+                            </td>
+                        </tr>
+                        <tr>
+                            <td colspan="2">
+                                <div style="height:15px;"></div>
+                            </td>
+                        </tr>
+                        <tr>
+                            <td valign="top" class="lbl1">
+                                [% l('PIN Number or Password') %]<br />
+                                [% INCLUDE "opac/parts/login/password_hint.tt2" %]
+                            </td>
+                            <td valign="top">
+                                <div class="input_bg">
+                                    <input name="password" type="password" />
+                                </div>
+                                <div style="padding-top:7px;">
+                                    [%
+                                        # If no redirect is offered or it's leading us back to the 
+                                        # login form, redirect the user to My Account
+                                        redirect = CGI.param('redirect_to') || ctx.referer;
+                                        IF !redirect OR redirect.match(ctx.path_info _ '$');
+                                            redirect = CGI.url('-full' => 1) _ '/opac/myopac/main';
+                                        END;
+                                        redirect = redirect  | replace('^http:', 'https:');
+                                    %]
+                                    <input type='hidden' name='redirect_to' value='[% redirect %]'/>
+                                    <input type="checkbox" name="persist" id="login_persist" /><label for="login_persist"> [% l('Stay logged in?') %]</label>
+                                </div>
+                                <div style="padding-top:14px;">
+                                    <input type='image' alt="[% l('Log in') %]" src="[% ctx.media_prefix %]/images/login-btn2.png" />
+                                    <a href="[% mkurl(ctx.opac_root _ '/password_reset', {}, 1) %]"
+                                        style="position:relative;top:-13px;left:2px;font-size:10px;">[% l('Forgot your PIN?') %]</a>
+                                </div>
+                               </td>
+                        </tr>
+                    </table>
+                    <br /><br />
+                </td>
+                   <td><div style="width:10px;"></div></td>
+                [% INCLUDE "opac/parts/login/help.tt2" %]
+            </tr>
+        </table>
+    </form>
+    <div class="clear-both"></div>
+</div>
diff --git a/Open-ILS/src/templates_kcls/opac/parts/login/help.tt2 b/Open-ILS/src/templates_kcls/opac/parts/login/help.tt2
new file mode 100644 (file)
index 0000000..a6d7ebb
--- /dev/null
@@ -0,0 +1,12 @@
+<td class="login_boxes right_brain" align="center" valign="top" width="291">
+
+    <a href="http://www.kcls.org/about/contact/"><img 
+        src="[% ctx.media_prefix %]/images/questions.png" alt="[% l('Questions?') %]" style="margin-top:29px;" /></a>
+
+    <div style="width:182px;color:black;padding:5px 25px;">
+        [% l('Visit our FAQs section for answers to common questions about how to use your account.') %]
+    </div>
+
+    <a href="http://www.kcls.org/usingthelibrary/catalog_help/index.cfm#FAQs"><img
+        alt="[% l('FAQs') %]" src="[% ctx.media_prefix %]/images/faqs-btn.png" style="margin-top:13px;" /></a>
+</td>
diff --git a/Open-ILS/src/templates_kcls/opac/parts/login/password_hint.tt2 b/Open-ILS/src/templates_kcls/opac/parts/login/password_hint.tt2
new file mode 100644 (file)
index 0000000..a95b47f
--- /dev/null
@@ -0,0 +1,5 @@
+<span class="lbl2">
+    [% | l('<br/>', '<br/>') %]
+       If this is your first time logging in, please enter [_1] the last 4 digits of your phone number. [_2] Example: 0926
+    [% END %]
+</span>
diff --git a/Open-ILS/src/templates_kcls/opac/parts/misc_util.tt2 b/Open-ILS/src/templates_kcls/opac/parts/misc_util.tt2
new file mode 100644 (file)
index 0000000..ff98869
--- /dev/null
@@ -0,0 +1,99 @@
+[% 
+    # Extract MARC fields from XML
+    #   get_marc_attrs( { marc_xml => doc } )
+    BLOCK get_marc_attrs;
+        xml = args.marc_xml;
+
+        args.isbns = [];
+        FOR isbn IN xml.findnodes('//*[@tag="020"]/*[@code="a"]');
+            args.isbns.push(isbn.textContent);
+        END;
+
+        args.upcs = [];
+        FOR upc IN xml.findnodes('//*[@tag="024"]/*[@code="a"]');
+            args.upcs.push(upc.textContent);
+        END;
+        args.upc = args.upcs.0; # use first UPC as the default
+        args.issn = xml.findnodes('//*[@tag="022"]/*[@code="a"]').textContent;
+        args.title = xml.findnodes('//*[@tag="245"]/*[@code="a"]').textContent;
+        args.title_extended = '';
+        FOR node IN xml.findnodes('//*[@tag="245"]/*'); 
+            args.title_extended = args.title_extended _ ' ' _ node.textContent;
+        END;
+        args.author = xml.findnodes('//*[@tag="100"]/*[@code="a"]').textContent;
+        args.publisher = xml.findnodes('//*[@tag="260"]/*[@code="b"]').textContent;
+        args.pubdate = xml.findnodes('//*[@tag="260"]/*[@code="c"]').textContent;
+        args.edition = xml.findnodes('//*[@tag="250"]/*[@code="a"]').textContent ||
+            xml.findnodes('//*[@tag="534"]/*[@code="b"]').textContent ||
+            xml.findnodes('//*[@tag="775"]/*[@code="b"]').textContent;
+        phys = xml.findnodes(
+            '//*[@tag="300"]/*[@code="a" or @code="b" or @code="c" or @code="e"]'
+        );
+        phys_content = [];
+        FOR p IN phys; phys_content.push(p.textContent); END;
+        args.phys_desc = phys_content.join("");
+
+        args.contents = xml.findnodes('//*[@tag="505"]').textContent;
+
+        # capture all of the 520a's
+        args.summary = [];
+        FOR s IN xml.findnodes('//*[@tag="520"]/*[@code="a"]');
+            args.summary.push(s.textContent); 
+        END;
+
+        # MARC Callnumber
+        args.marc_cn = xml.findnodes('//*[@tag="092" or @tag="099"]/*').textContent;
+
+        # clean up the ISBN
+        args.isbn_clean = args.isbns.0.replace('\ .*', '');
+
+        # Extract the 856 URLs that are not otherwise represented by asset.uri's
+        args.online_res = [];
+        FOR node IN xml.findnodes('//*[@tag="856"]');
+            IF node.findnodes('./*[@code="9" or @code="w" or @code="n"]'); NEXT; END; # asset.uri's
+            label = node.findnodes('./*[@code="z"]'); # XXX KCLS => y -> z
+            #notes = node.findnodes('./*[@code="z" or @code="3"]'); # XXX KCLS
+            FOR href IN node.findnodes('./*[@code="u"]');
+                NEXT UNLESS href;
+                # it's possible for multiple $u's to exist within 1 856 tag.
+                # in that case, honor the label/notes data for the first $u, but
+                # leave any subsequent $u's as unadorned href's. 
+                # use href/link/note keys to be consistent with args.uri's
+                args.online_res.push({
+                    href => href.textContent, 
+                    link => (loop.first AND label) ? label.textContent : href.textContent,
+                    #note => (loop.first) ? notes.textContent : '' # XXX KCLS
+                    note => ''
+                });
+            END;
+        END;
+
+        args.holdings = [];
+        FOR holding IN xml.findnodes('//*[local-name()="volumes"]/*[local-name()="volume"]');
+            args.holdings.push(
+                holding.getAttribute('label')
+            );
+        END;
+
+        # Extract the copy count summary
+        count_type = (ctx.is_staff) ? 'staff' : 'public';
+        xpath = '//*[local-name()="counts"]/*[local-name()="count"][@type="' _ count_type _ '"]';
+        FOR node IN xml.findnodes(xpath);
+            args.copy_counts = {};
+            FOR attr IN ['count', 'available', 'unshadow', 'transcendant']; 
+                args.copy_counts.$attr = node.getAttribute(attr);
+            END;
+        END;
+
+        # "mattype" == "custom marc format specifier"
+        FOR icon_style IN ['mattype', 'item_type']; 
+            node = xml.findnodes(
+                '//*[local-name()="attributes"]/*[local-name()="field"][@name="' _ icon_style _ '"]');
+            IF node AND node.textContent;
+                args.format_label = node.getAttribute('coded-value')
+                args.format_icon = ctx.media_prefix _ '/images/format_icons/' _ icon_style _ '/' _ node.textContent _ '.png';
+                LAST;
+            END;
+        END;
+    END;
+%]
diff --git a/Open-ILS/src/templates_kcls/opac/parts/myopac/base.tt2 b/Open-ILS/src/templates_kcls/opac/parts/myopac/base.tt2
new file mode 100644 (file)
index 0000000..6a4e839
--- /dev/null
@@ -0,0 +1,37 @@
+[%  WRAPPER "opac/parts/base.tt2" %]
+
+[% myopac_pages = [
+        {url => "main", name => "Account Summary"},
+        {url => "circs", name => "Items Checked Out"},
+        {url => "holds", name => "Holds"},
+        {url => "prefs", name => "Account Preferences"},
+        {url => "lists", name => "My Lists"}
+    ];
+    skin_root = "../"
+%]
+    [% INCLUDE "opac/parts/topnav.tt2" %]
+    <div id="search-wrapper">
+        [% INCLUDE "opac/parts/printnav.tt2" %]
+        [% INCLUDE "opac/parts/searchbar.tt2" %]
+    </div>
+    <div id="content-wrapper">
+        <div id="myopac_tabs">
+            <div id="acct_tabs">
+                [%- FOREACH page IN myopac_pages;
+                    IF page.url == myopac_page;
+                        cls_which = "on";
+                        ctx.page_title = "Your Account - " _ page.name;
+                    ELSE;
+                        cls_which = "off";
+                    END -%]
+                <a href="[% ctx.opac_root _ '/myopac/' _ page.url %]"
+                    class="acct-[% page.url; '-'; cls_which %] acct-tab"></a>
+                [% END %]
+            </div>
+        </div>
+        <div id="main-content">
+            [% content %]
+            <div class="common-full-pad"></div>
+        </div>
+    </div>
+[% END %]
diff --git a/Open-ILS/src/templates_kcls/opac/parts/myopac/main_base.tt2 b/Open-ILS/src/templates_kcls/opac/parts/myopac/main_base.tt2
new file mode 100644 (file)
index 0000000..87b2389
--- /dev/null
@@ -0,0 +1,102 @@
+[%  PROCESS "opac/parts/header.tt2";
+    PROCESS "opac/parts/misc_util.tt2";
+    WRAPPER "opac/parts/myopac/base.tt2";
+%]
+
+<div id='myopac_summary_div' style="padding:0px;">
+
+    <div style="width:742px;float:left;">
+        <div class="header_middle">[% l('Account Summary') %]</div>
+    </div>
+
+    <!-- fines summary along the right of the page -->
+    [% IF myopac_main_page == "payment_form" OR (
+        !ctx.fines.circulation.size AND !ctx.fines.grocery.size
+    ) %]
+    <div id="myopac_sum_fines_placehold"></div>
+    [% ELSE %]
+    <div id="myopac_sum_fines">
+        <div style="position:absolute;">
+            <div style="position:relative;top:-15px;left:-23px;">
+                <img src="[% ctx.media_prefix %]/images/acct_sum_fines_tl.png" />
+            </div>
+        </div>
+        <div style="position:absolute;">
+            <div style="position:relative;top:-15px;left:172px;">
+                <img src="[% ctx.media_prefix %]/images/acct_sum_fines_tr.png" />
+            </div>
+        </div>
+        <div style="position:absolute;">
+            <div style="position:relative;top:161px;left:-23px;">
+                <img src="[% ctx.media_prefix %]/images/acct_sum_fines_bl.png" />
+            </div>
+        </div>
+        <div style="position:absolute;">
+            <div style="position:relative;top:161px;left:172px;">
+                <img src="[% ctx.media_prefix %]/images/acct_sum_fines_br.png" />
+            </div>
+        </div>
+        [% l('Fines:') %]
+        <span id="myopac_sum_fines_bal" class='[% ctx.user_stats.fines.balance_owed ? "red" : ""%]'>
+            [% money(ctx.user_stats.fines.balance_owed) %]
+        </span><br />
+
+        <form action="[% ctx.opac_root %]/myopac/main_payment_form" method="GET"><input
+            type="image" title="[% l('Pay Fines') %]" alt="[% l('Pay Fines') %]"
+            onmouseover="this.src='[% ctx.media_prefix %]/images/pay-fines-btn-hover.png';"
+            onmouseout="this.src='[% ctx.media_prefix %]/images/pay-fines-btn.png';"
+            src="[% ctx.media_prefix %]/images/pay-fines-btn.png"
+            class="pos-rel-top-5" /></form>
+    </div>
+    [% END %]
+
+    <div style="width:662px;">
+        <div style="float:left;">
+            <div style="padding:10px 0px;" id="myopac_sum_name"></div>
+            <div class="acct_sum_row">
+                <table width="100%" cellspacing="0" cellpadding="0">
+                    <tr>
+                        <td>[% l("Items Currently Checked out ([_1])", ctx.user_stats.checkouts.total_out) %]</td>
+                        <td align="right">
+                            <a href="[% ctx.opac_root %]/myopac/circs">[% l("View All") %]</a>
+                        </td>
+                    </tr>
+                </table>
+            </div>
+            <div class="acct_sum_row">
+                <table width="100%" cellspacing="0" cellpadding="0">
+                    <tr>
+                        <td>[% l('Items Currently on Hold ([_1])', ctx.user_stats.holds.total) %]</td>
+                        <td align="right">
+                            <a href="[% ctx.opac_root %]/myopac/holds">[% l('View All') %]</a>
+                        </td>
+                    </tr>
+                </table>
+            </div>
+            <div class="acct_sum_row">
+                <table width="100%" cellspacing="0" cellpadding="0">
+                    <tr>
+                        <td>[% l('Items ready for pickup ([_1])', ctx.user_stats.holds.ready) %]</td>
+                        <td align="right">
+                            <a href="[% ctx.opac_root %]/myopac/holds?available=1">[% l('View All') %]</a>
+                        </td>
+                    </tr>
+                </table>
+            </div>
+        </div>
+    </div>
+    <div class="clear-both"></div>
+    <div id='fines_payments_wrapper'>
+        <div id='acct_fines_tabs'>
+            [% IF myopac_main_page == 'main' %]
+            <a href='#'><img src='[% ctx.media_prefix %]/images/acct_fines_on.jpg'/></a>
+            <a href='main_payments'><img src='[% ctx.media_prefix %]/images/acct_payments_off.jpg'/></a>
+            [% ELSE %]
+            <a href='main'><img src='[% ctx.media_prefix %]/images/acct_fines_off.jpg'/></a>
+            <a href='#'><img src='[% ctx.media_prefix %]/images/acct_payments_on.jpg'/></a>
+            [% END %]
+        </div>
+    </div>
+    [% content %]
+</div>
+[% END %]
diff --git a/Open-ILS/src/templates_kcls/opac/parts/myopac/main_refund_policy.tt2 b/Open-ILS/src/templates_kcls/opac/parts/myopac/main_refund_policy.tt2
new file mode 100644 (file)
index 0000000..937d167
--- /dev/null
@@ -0,0 +1,27 @@
+<tr>
+    <td colspan="3">
+        <br />
+        <strong style="color:red;font-size:16px;">
+        Important! You must have a printed receipt to be
+        eligible for a refund on lost items (regulations allow
+        for no exceptions).
+        </strong>
+        <br />
+        <br />
+        <strong>
+            To ensure your necessary receipt information is
+            not lost, enter your email address above and a
+            receipt will be emailed to you. Otherwise, make
+            certain you have a printed receipt in hand before
+            closing the payment receipt screen.
+        </strong>
+        <br />
+        Refunds are not available for parts and pieces, overdue
+        fines, or items that do not display a specific title in
+        My Account. For a full list of refundable and
+        non-refundable items, visit
+        <a href="http://www.kcls.org/usingthelibrary/borrowing/refundable.cfm">http://www.kcls.org/usingthelibrary/borrowing/refundable.cfm</a><br /><br />
+        This site uses VeriSign SSL encryption to ensure your
+        privacy.
+    </td>
+</tr>
diff --git a/Open-ILS/src/templates_kcls/opac/parts/myopac/prefs_base.tt2 b/Open-ILS/src/templates_kcls/opac/parts/myopac/prefs_base.tt2
new file mode 100644 (file)
index 0000000..1b641a6
--- /dev/null
@@ -0,0 +1,60 @@
+[%  PROCESS "opac/parts/header.tt2";
+    WRAPPER "opac/parts/myopac/base.tt2"; %]
+
+<div id='myopac_prefs_div'>
+    <div id="acct_prefs_tabs" style="padding-bottom: 12px;color:#666;">
+        <div style="float:left;">
+
+        [% IF prefs_page == 'personal' %]
+            <div class="align">
+                <a href='#'><img src="[% ctx.media_prefix %]/images/sub_prefs_info_on.jpg" /></a>
+            </div>
+            [% IF ctx.opt_in_settings.size > 0 %]
+            <div class="align">
+                <a href='prefs_notify'><img src="[% ctx.media_prefix %]/images/sub_prefs_notify_off.jpg" /></a>
+            </div>
+            [% END %]
+            <div class="align">
+                <a href='prefs_settings'><img src="[% ctx.media_prefix %]/images/sub_prefs_search_off.jpg" /></a>
+            </div>
+        [% ELSIF prefs_page == 'notify' %]
+            <div class="align">
+                <a href='prefs'><img src="[% ctx.media_prefix %]/images/sub_prefs_info_off.jpg" /></a>
+            </div>
+            <div class="align">
+                <a href='#'><img src="[% ctx.media_prefix %]/images/sub_prefs_notify_on.jpg" /></a>
+            </div>
+            <div class="align" >
+                <a href='prefs_settings'><img src="[% ctx.media_prefix %]/images/sub_prefs_search_off.jpg" /></a>
+            </div>
+        [% ELSE %]
+            <div class="align">
+                <a href='prefs'><img src="[% ctx.media_prefix %]/images/sub_prefs_info_off.jpg" /></a>
+            </div>
+            [% IF ctx.opt_in_settings.size > 0 %]
+            <div class="align">
+                <a href='prefs_notify'><img src="[% ctx.media_prefix %]/images/sub_prefs_notify_off.jpg" /></a>
+            </div>
+            [% END %]
+            <div class="align" >
+                <a href='#'><img src="[% ctx.media_prefix %]/images/sub_prefs_search_on.jpg" /></a>
+            </div>
+        [% END %]
+        </div>
+    </div> 
+
+    <div class="clear-both"></div> <br/>
+
+    <div class="header_middle">
+        <span id="acct_prefs_header">[% l('Account Information and Preferences') %]</span>
+        <span class="float-right"> 
+            <a class="hide_me" href="#">[% l('Export List') %]</a><!-- what does this do? -->
+        </span>
+    </div>
+
+    <div class="clear-both normal-height"></div>
+
+[% content; %]
+
+</div>
+[% END %]
diff --git a/Open-ILS/src/templates_kcls/opac/parts/myopac/prefs_hints.tt2 b/Open-ILS/src/templates_kcls/opac/parts/myopac/prefs_hints.tt2
new file mode 100644 (file)
index 0000000..bb7c642
--- /dev/null
@@ -0,0 +1,4 @@
+<a href=
+        "http://www.kcls.org/usingthelibrary/catalog_help/library_elf.cfm"><u>Try
+        Library Elf-to manage library materials!</u></a>
+
diff --git a/Open-ILS/src/templates_kcls/opac/parts/org_selector.tt2 b/Open-ILS/src/templates_kcls/opac/parts/org_selector.tt2
new file mode 100644 (file)
index 0000000..3a7e318
--- /dev/null
@@ -0,0 +1,34 @@
+[%
+    BLOCK build_org_selector_options;
+        disabled = '';
+        selected = '';
+        IF can_have_vols_only AND walker.ou_type.can_have_vols != 't';
+            disabled = 'disabled="disabled"';
+        ELSIF walker.id == value;
+            selected = 'selected="selected"';
+        END;
+        IF (ctx.is_staff || walker.opac_visible == 't') AND
+            !(hold_pickup_lib AND ctx.get_org_setting(walker.id, 'opac.holds.org_unit_not_pickup_lib'));
+%]
+            <option value='[% walker.id | uri %]' [% selected %] [% disabled %]>
+                [%
+                    pad = walker.ou_type.depth * 2;
+                    FOR idx IN [0..pad]; '&nbsp;'; END;
+                    walker.name | html;
+                %]
+            </option>
+            [% FOR child IN walker.children;
+                PROCESS build_org_selector_options walker=child value=value;
+            END;
+        END;
+    END;
+
+    # XXX TODO probably put this BLOCK somewhere else so it can be used widely.
+    # Org Unit Selector Widget :
+    #   PROCESS build_org_selector id='selector-id' name='selector-name'
+    BLOCK build_org_selector;
+%]
+    <select [% IF id %] id='[% id %]' [% END %] name='[% name %]'>
+    [% PROCESS build_org_selector_options walker=(org_unit || ctx.aou_tree) value=value %]
+    </select>
+[%  END %]
diff --git a/Open-ILS/src/templates_kcls/opac/parts/place_hold.tt2 b/Open-ILS/src/templates_kcls/opac/parts/place_hold.tt2
new file mode 100644 (file)
index 0000000..a7514ed
--- /dev/null
@@ -0,0 +1,81 @@
+[%  PROCESS "opac/parts/misc_util.tt2";
+    PROCESS "opac/parts/hold_error_messages.tt2";
+%]
+
+<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 %]" />
+        [%
+            redirect = CGI.param('hold_source_page') || CGI.param('redirect_to') || CGI.referer;
+            # since we have to be logged in to get this far, return to a secure page
+            redirect = redirect.replace('^http:', 'https:') 
+        %]
+        <input type="hidden" name="redirect_to" value="[% redirect | 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);"
+                    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 %]
+
+        <!-- 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>
+                <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>
+
+        <p>
+            [% l('Pickup location:') %]
+            [% PROCESS "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 hold_pickup_lib=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>
+
diff --git a/Open-ILS/src/templates_kcls/opac/parts/place_hold_result.tt2 b/Open-ILS/src/templates_kcls/opac/parts/place_hold_result.tt2
new file mode 100644 (file)
index 0000000..12b1bea
--- /dev/null
@@ -0,0 +1,113 @@
+[%  PROCESS "opac/parts/misc_util.tt2";
+    PROCESS "opac/parts/hold_error_messages.tt2";
+    override_possible = 0;
+    any_failures = 0;
+    any_success = 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; 
+                            any_success = 1 %]
+
+                        <div class='success'>[% l("Hold was successfully placed"); %]</div>
+
+                        [% ELSIF hdata.hold_failed; 
+                            any_failures = 1 %]
+
+                            <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:
+                                                FAIL_PART_MSG_MAP.$fail_part_key ||
+                                                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>
+        <br/>
+        <hr/>
+        [% IF override_possible %]
+            <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('Override') %]"
+                    alt="[% l('Override') %]" src="[% ctx.media_prefix %]/images/override.png" />
+            </span>
+            <span style='padding-right: 10px;'>
+                <a href="[% CGI.param('redirect_to') || CGI.referer | html %]"><img 
+                    alt="[% l('Return') %]" src="[% ctx.media_prefix %]/images/return.png"/></a>
+            </span>
+        [% ELSE %]
+            [% IF !any_success %]
+                <span style='padding-right: 10px;'>
+                    <a href="[% CGI.param('redirect_to') || CGI.referer | html %]"><img 
+                        alt="[% l('Cancel') %]" src="[% ctx.media_prefix %]/images/btnCancel.png"/></a>
+            [% ELSE %]
+                <span style='padding-right: 10px;'>
+                    <a href="[% CGI.param('redirect_to') || CGI.referer | html %]"><img 
+                        alt="[% l('Return') %]" src="[% ctx.media_prefix %]/images/return.png"/></a>
+                </span>
+            [% END %]
+        [% END %]
+    </form>
+</div>
+
diff --git a/Open-ILS/src/templates_kcls/opac/parts/printnav.tt2 b/Open-ILS/src/templates_kcls/opac/parts/printnav.tt2
new file mode 100644 (file)
index 0000000..13a8f66
--- /dev/null
@@ -0,0 +1,25 @@
+<div class="big-block">
+    <div class="float-right">
+        <div class="pos-rel">
+            <img src="[% ctx.media_prefix %]/images/utils-corner-left.png" class="float-left" />
+            <div class="left-corner"> 
+                <a href="javascript:history.go(-1)"
+                    id="util_back_btn"><img alt="[% l('Back') %]"
+                    src="[% ctx.media_prefix %]/images/tool_back.png" /></a>
+                <a href="[% ctx.opac_root %]/home"
+                    id="util_home_btn"><img alt="[% l('Homepage') %]"
+                    src="[% ctx.media_prefix %]/images/tool_home.png" /></a>
+                <a href="javascript:window.print();"
+                    id="util_print_btn"><img alt="[% l('Print Page') %]"
+                    src="[% ctx.media_prefix %]/images/tool_print.png" /></a>
+                <a href="http://www.kcls.org/usingthelibrary/catalog_help/index.cfm"
+                    id="util_help_btn"><img alt="[% l('Help') %]"
+                    src="[% ctx.media_prefix %]/images/tool_help.png" /></a>
+                <a href="javascript:history.go(+1)"
+                    id="util_forw_btn"><img alt="[% l('Forward') %]"
+                    src="[% ctx.media_prefix %]/images/tool_forward.png" /></a>
+            </div>
+            <img src="[% ctx.media_prefix %]/images/utils-corner-right.png" class="float-left" />
+        </div>
+    </div>
+</div>
diff --git a/Open-ILS/src/templates_kcls/opac/parts/qtype_selector.tt2 b/Open-ILS/src/templates_kcls/opac/parts/qtype_selector.tt2
new file mode 100644 (file)
index 0000000..2dcb40a
--- /dev/null
@@ -0,0 +1,17 @@
+[%  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")}
+    {value => "identifier", label => l("ISBN/ISSN/Other")}
+] %]
+<select name="qtype">
+    [%  query_type = query_type || CGI.param('qtype');
+        FOR qt IN query_types -%]
+    <option value='[% qt.value | html %]'[%
+        query_type == qt.value ? ' selected="selected"' : ''
+    %]>[% qt.label | html %]</option>
+    [% END -%]
+</select>
diff --git a/Open-ILS/src/templates_kcls/opac/parts/record/authors.tt2 b/Open-ILS/src/templates_kcls/opac/parts/record/authors.tt2
new file mode 100644 (file)
index 0000000..7304aeb
--- /dev/null
@@ -0,0 +1,51 @@
+[%  
+
+authors = [
+    {
+        type => 'author', 
+        label => l('Authors: '),
+        xpath => '//*[@tag="100"]|//*[@tag="110"]|//*[@tag="111"]'
+    }, {
+        type => 'added', 
+        label => l('Added Authors: '),
+        xpath => '//*[@tag="700"]|//*[@tag="710"]|//*[@tag="711"]'
+    }, {
+        type => 'credits', 
+        label => l('Credits: '),
+        xpath => '//*[@tag="100"]|//*[@tag="110"]|//*[@tag="111"]'
+    }, {
+        type => 'cast', 
+        label => l('Cast: '),
+        xpath => '//*[@tag="508"]'
+    }, {
+        type => 'notes', 
+        label => l('Author Notes: '),
+        xpath => '' # Comes from added content...
+    }
+];
+
+BLOCK build_author_links;
+    FOR node IN ctx.marc_xml.findnodes(xpath);
+        FOR subfield IN node.childNodes;
+            NEXT UNLESS subfield.nodeName == "subfield";
+            code = subfield.getAttribute('code');
+            NEXT UNLESS code.match('[a-z]');
+            term = subfield.textContent | html;
+            '<br/><a href="' _ ctx.opac_root _ '/results?qtype=author&amp;query=' _ term _ '&amp;loc=' _ loc _ '">' _ term _ '</a>';
+        END;
+    END;
+END;
+%]
+
+<div id='rdetail_authors_div' class='rdetail_extras_div'>
+[% FOREACH author IN authors;
+    NEXT UNLESS author.xpath; 
+    links = PROCESS build_author_links(xpath=author.xpath);
+    IF links.match('\S') %]
+    <strong>[% author.label | html %]</strong>
+    <div class='rdetail-author-div'>[% links %]</div>
+    [% END %]
+[% END %]
+</div>
+
+
diff --git a/Open-ILS/src/templates_kcls/opac/parts/record/awards.tt2 b/Open-ILS/src/templates_kcls/opac/parts/record/awards.tt2
new file mode 100644 (file)
index 0000000..fa8b4f6
--- /dev/null
@@ -0,0 +1,32 @@
+<div class='rdetail_extras_div'> 
+    <div style="margin-bottom:20px;"></div>
+
+        <!-- Chilifresh patron reviews -->
+        <strong>[% l('Patron Reviews:') %]</strong>
+        <div style="margin-bottom:20px;">
+            <span class="chili_review" id="isbn_[% attrs.isbn_clean | html %]"> </span>
+            <div id="chili_review_[% attrs.isbn_clean | html %]" style="display: none;" align="center" width="100%"></div>
+        </div>
+    
+        <!-- Reviews from added content provider -->
+        [% IF 0 %] 
+        <strong>[% l('Reviews:') %]</strong>
+        <div id='rdetail_review_container' style="margin-bottom:20px;"></div>
+        [% END %]
+
+        <!-- Novelist suggestions-->
+        [% IF ENV.OILS_NOVELIST_URL %] 
+        <strong>[% l('Similar Books:') %]</strong>
+        <div class='rdetail_extras_div'>
+            <div id="NoveListSelect" class="NoveListSelect">
+                <div id="NoveListAnchor" class="NoveListSelect"></div>
+                <div id="novsuggestions"></div>
+                <div id="nextreads"></div>
+                <div id="novrelatedauthors"></div>
+                <div id="novrelateditems"></div>
+            </div>
+        </div>
+        [% END %]
+    </div>
+</div>
+
diff --git a/Open-ILS/src/templates_kcls/opac/parts/record/body.tt2 b/Open-ILS/src/templates_kcls/opac/parts/record/body.tt2
new file mode 100644 (file)
index 0000000..8c7e77b
--- /dev/null
@@ -0,0 +1,56 @@
+<!-- ****************** page_rdetail.xml ***************************** -->
+[%  attrs = {marc_xml => ctx.marc_xml};
+    PROCESS "opac/parts/misc_util.tt2";
+    PROCESS get_marc_attrs args=attrs %]
+
+<div id='canvas_main' class='canvas'>
+
+    [% IF ctx.search_result_index >= 0 %]
+    <div id="rdetail_header">
+        <div style="float:left;">
+            <a href='[% mkurl(ctx.opac_root _ '/results') %]'>[% l('&#9668; Search Results') %]</a>
+            <span id="rdetail_result_count">
+                [% l('Showing Item [_1] of [_2]', ctx.search_result_index + 1, ctx.hit_count) %]
+            </span>
+        </div>
+        <div id="rdetail_result_nav">
+            [%
+                IF ctx.prev_search_record;
+                    prev_args = {};
+                    IF ctx.search_result_index % (ctx.page_size + 1) == 0; # first record in the page
+                        prev_args.page = ctx.search_page - 1;
+                    END;
+                    ctx.prev_rec_url = mkurl(ctx.prev_search_record, prev_args);
+            %]
+            <a class='np_nav_link classic_link' title='[% l("Previous Record") %]'
+                href='[% ctx.prev_rec_url %]'><span class="nav_arrow_fix">&#9668; </span>[% l('Previous') %]</a>
+            [% END %]
+
+            <span style="padding:0px 10px;"> </span>
+
+            [% 
+                IF ctx.next_search_record;
+                    next_args = {};
+                    IF ctx.page_size == ctx.search_result_index + 1;
+                        next_args.page = ctx.search_page + 1;
+                    END;
+                    ctx.next_rec_url = mkurl(ctx.next_search_record, next_args);
+            %]
+            <a class='np_nav_link classic_link' title='[% l("Next Record") %]'
+                href='[% ctx.next_rec_url %]'>[% l('Next') %]<span class="nav_arrow_fix"> &#9658;</span></a>
+            [% END %]
+
+        </div>
+        <div class="clear-both"></div>
+    </div>
+    [% END %]
+
+    <div style='font-weight: bold; padding: 5px; margin: 5px; width: 100%;'
+        class='hide_me color_4' id='rdetail_deleted_exp'>
+        [% l("This record has been deleted from the database.  We recommend that you remove this title from any bookbags it may have been added to.") %]
+    </div>
+    [% INCLUDE "opac/parts/record/summary.tt2" %]
+    <br />
+    [% INCLUDE "opac/parts/record/extras.tt2" %]
+</div>
+<!-- ****************** end; page_rdetail.xml ***************************** -->
diff --git a/Open-ILS/src/templates_kcls/opac/parts/record/cn_details.tt2 b/Open-ILS/src/templates_kcls/opac/parts/record/cn_details.tt2
new file mode 100644 (file)
index 0000000..2865026
--- /dev/null
@@ -0,0 +1,91 @@
+<table class="hide_me">
+    <tbody>
+        <tr class='opac-auto-009' id='rdetail_volume_details_row' templateRow='1'>
+            <td colspan='10'>
+                <div style='text-align: center; margin-top: 6px; margin-bottom: 6px'>
+                    <a name='print' href='#' class='classic_link'>[% l("print these details") %]</a>
+                    <table class='data_grid data_grid_center' style='width: 100%'>
+                        <tbody name='copies_tbody' class='copy_details_table' width='100%'>
+
+                                <!-- XXX keeping for now for reference...
+                                <td>
+                                    <span name='barcode'> </span>
+                                    <a class='hide_me classic_link copy_more_info'
+                                        name='details_link'>[% l("more info...") %]</a>
+                                    <a class='hide_me classic_link copy_more_info'
+                                        name='less_details_link'>[% l("less info") %]</a>
+                                    <a class='hide_me classic_link copy_more_info'
+                                        name='copy_hold_link' href='#'>[% l("place hold") %]</a>
+                                </td>
+                                <td name='status'> </td>
+                                <td name='location'> </td>
+                                <td name='age_protect_value' class='hide_me'>[% l("- Disabled -") %]</td>
+                                <td name='create_date_value' class='hide_me'> </td>
+                                <td name='copy_holdable_td' class='hide_me'>
+                                    <span name='copy_is_holdable'> </span>
+                                </td>
+                                <td name='copy_due_date_td' class='hide_me'>
+                                    <span name='copy_due_date'> </span>
+                                </td>
+                            </tr>
+                                -->
+
+                            <tr name='copy_extras_row' class='hide_me'>
+                                <td colspan='10'>
+                                    <table width='100%' class='data_grid'>
+                                        <tbody name='extras_tbody'>
+                                            <tr name='extras_row' class='hide_me'>
+                                                <td name='type' width='20%'>
+                                                    <span name='note' class='hide_me'>
+                                                        <b>[% l("Copy Note") %]</b>
+                                                    </span>
+                                                    <span name='cat' class='hide_me'>
+                                                        <b>[% l("Copy Category") %]</b>
+                                                    </span>
+                                                </td>
+                                                <td>
+                                                    <span name='key'> </span> : <span name='value'> </span>
+                                                </td>
+                                            </tr>
+                                        </tbody>
+                                    </table>
+                                </td>
+                            </tr>
+                        </tbody>
+                    </table>
+                </div>
+            </td>
+        </tr>
+    </tbody>
+</table>
+
+<span class='hide_me' id='rdetail.yes'>[% l("Yes") %]</span>
+<span class='hide_me' id='rdetail.no'>[% l("No") %]</span>
+
+<div id='rdetail_print_details' class='hide_me'>
+    <div style='text-align: center; padding: 20px; width: 100%'>
+        <div style='width:100%; border: 2px solid #E0F0E0; margin-bottom: 20px;'>
+            <input type='submit' value='[% l("Print Page") %]' onclick='window.print();' />
+        </div>
+        <div name='body'>
+            <table>
+                <tbody name='tbody'>
+                    <tr><td>[% l("Library") %]</td><td colspan='2' name='lib'></td></tr>
+                    <tr><td>[% l("Title") %]</td><td colspan='2' name='title'></td></tr>
+                    <tr><td>[% l("Author") %]</td><td colspan='2' name='author'></td></tr>
+                    <tr><td>[% l("Edition") %]</td><td colspan='2' name='edition'></td></tr>
+                    <tr><td>[% l("Publication Date") %]</td><td colspan='2' name='pubdate'></td></tr>
+                    <tr><td>[% l("Publisher") %]</td><td colspan='2' name='publisher'></td></tr>
+                    <tr><td>[% l("Physical Description") %]</td><td colspan='2' name='phys'></td></tr>
+                    <tr>
+                        <td colspan='3' class='opac-auto-004'> </td>
+                    </tr>
+                    <tr name='cnrow'>
+                        <td><b>[% l("Call Number") %]</b></td>
+                        <td><b colspan='2' name='cn'></b></td>
+                    </tr>
+                </tbody>
+            </table>
+        </div>
+    </div>
+</div>
diff --git a/Open-ILS/src/templates_kcls/opac/parts/record/cnbrowse.tt2 b/Open-ILS/src/templates_kcls/opac/parts/record/cnbrowse.tt2
new file mode 100644 (file)
index 0000000..1b83642
--- /dev/null
@@ -0,0 +1,61 @@
+[% 
+    cnoffset = CGI.param('cnoffset');
+    cnoffset = cnoffset.match('^\d+$') ? cnoffset : 0; # verify cnoffset is a sane value
+%]
+
+<div id='cn_browse' class='cn_browser'>
+    <div id='cn_browse_div'> 
+        <div class='color_4'>
+            <span>[% l("You are now browsing") %]</span>
+            <strong>[% ctx.browsing_ou.name | html %]</strong>
+        </div>
+        <table class='data_grid bookshelf' width='100%'>
+            <thead>
+                <tr>
+                    <td>
+                        <a id='cn_browse_prev' class='classic_link' 
+                            href="[% mkurl('', {cnoffset => cnoffset - 1}) %]#cnbrowse"><b>[% l("&lt;&lt; Previous Page") %]</b></a>
+                    </td>
+                    <td colspan='1' align='center'>[% l("Shelf Browser") %]</td>
+                    <td>
+                        <a id='cn_browse_next' class='classic_link' 
+                            href="[% mkurl('', {cnoffset => cnoffset + 1}) %]#cnbrowse"><b>[% l("Next Page &gt;&gt;") %]</b></a>
+                    </td>
+                </tr>
+            </thead>
+            <tbody id='cn_tbody'>
+            [% tr_open = 0; FOR cn IN ctx.browsed_call_numbers %]
+                [%- IF loop.index % 3 == 0; tr_open = 1 %]
+                <tr class='cn_browse_row'>
+                [% END -%]
+                    <td class='cn_browse_item' width='25%' valign='top'>
+                        [%  rec_attrs = {marc_xml => cn.record.marc};
+                            PROCESS get_marc_attrs args=rec_attrs;
+                            ident = rec_attrs.isbn_clean || rec_attrs.upc;
+                            IF ident %]
+                        <a href="[% mkurl(ctx.opac_root _ '/record/' _ cn.record.id, {}, 1) %]"><img height='60' width='50' 
+                            class='cn_browse_info' name='cn_browse_pic' border='0'
+                            src="[% ctx.media_prefix %]/opac/extras/ac/jacket/small/[% ident | uri %]" /></a>
+                        [% END %]
+                        <div class='cn_browse_info bold' name='cn_browse_cn'>[% cn.label | html %]</div>
+                        <div class='cn_browse_info'>
+                            <a name='cn_browse_title' class='classic_link' 
+                                href="[% mkurl(ctx.opac_root _ '/record/' _ cn.record.id, {}, 1) %]">[% rec_attrs.title | html %]</a>
+                        </div>
+                        [% IF rec_attrs.author %]<div class='cn_browse_info'>
+                            <a name='cn_browse_author' class='classic_link'
+                                href="[%-
+                                    authorquery = rec_attrs.author | replace('[,\.:;]', '');
+                                    mkurl(ctx.opac_root _ '/results', {qtype => 'author', query => authorquery}, 1)
+                                    -%]">[% rec_attrs.author | html %]</a>
+                        </div>[% END %]
+                        <div class='cn_browse_info' name='cn_browse_lib'>[% cn.owning_lib.name | html %]</div>
+                    </td>
+                [% IF loop.index % 3 == 2; tr_open = 0 %]
+                </tr>
+                [% END %]
+            [% END; IF tr_open %]</tr>[% END %]
+            </tbody>
+        </table>
+    </div>
+</div>
diff --git a/Open-ILS/src/templates_kcls/opac/parts/record/copyinfo.tt2 b/Open-ILS/src/templates_kcls/opac/parts/record/copyinfo.tt2
new file mode 100644 (file)
index 0000000..9d4673f
--- /dev/null
@@ -0,0 +1,68 @@
+<!-- ****************** rdetail_copyinfo.xml ***************************** -->
+<div id='rdetail_copy_info_div' class='rdetail_extras_div hide_me'>
+    <div style='width: 100%; text-align: center; padding-bottom: 5px;'>
+        <span>
+            <a href='javascript:void(0);' id='copy_info_local_link' 
+                class='rdetail_copy_nav_link hide_me classic_link'><b>[% l("View Copy Information for this location only") %]</b></a>
+        </span>
+        <span width=''>
+            <a href='javascript:void(0);' id='copy_info_all_link' 
+                class='rdetail_copy_nav_link classic_link'><b>[% l("View copy information for all libraries") %]</b></a>
+        </span>
+    </div>
+    <table id='rdetail_copy_info_table' class='data_grid'>
+        <thead>
+            <tr>
+                <td class='rdetail_copy_info_header_cell'>[% l("Library") %]</td>
+                <td class='rdetail_copy_info_header_cell'>[% l("Callnumber") %]</td>
+                <td name='rdetail_copylocation_header' class='rdetail_copy_info_header_cell hide_me'>
+                    [% l("Copy Location") %]
+                </td>
+                <td class='rdetail_copy_info_header_cell'>[% l("Actions") %]</td>
+                <td nowrap='nowrap' class='rdetail_copy_info_header_cell' id='rdetail_copy_info_status'> 
+                    <div name='rdetail_status_cell'> </div>
+                </td>
+            </tr>
+        </thead>
+        <tbody id='rdetail_copy_info_tbody'>
+            <tr id='rdetail_copy_info_row' class='hide_me'>
+                <td name='rdetail_library_cell'>
+                    <a name='lib_print_link' class='hide_me classic_link'
+                        style='font-size: 8pt; padding-left: 20px;'>[% l("Print Call Numbers for this library") %]</a>
+                </td>
+                <td name='rdetail_callnumber_cell'> </td>
+                <td class="hide_me" name='rdetail_copylocation_cell'> </td>
+                <td name='rdetail_actions_cell'> 
+                    <div style='padding-bottom: 1px;'>
+                        <a style='font-size: 8pt;'
+                            name='details' class='hide_me classic_link'>[% l("Copy Details") %]</a>
+                    </div>
+                    <div style='margin-top: 2px;'>
+                        <a name='browse' style='font-size: 8pt;'
+                            class='hide_me classic_link'>[% l("Browse Call Numbers") %]</a>
+                    </div>
+                    <div style='margin-top: 2px;' name='hold_div' class='hide_me'>
+                        <a name='hold' style='font-size: 8pt;' href='javascript:void(0);'
+                            class='classic_link'>[% l("Place Hold") %]</a>
+                    </div>
+                </td>
+                <td nowrap='nowrap' class='rdetail_copy_count_cell vertical' 
+                    name='rdetail_copy_count_cell'>
+                </td>
+            </tr>
+            <tr id='rdetail_copy_info_loading'>
+                <td>
+                    [% l("Loading copy information...") %]
+                </td>
+            </tr>
+        </tbody>
+    </table>
+    <!-- <table class='hide_me'>
+        <tbody>
+        <tr class='opac-auto-009' id='rdetail_volume_details_row'><td colspan='10'></td></tr>
+        </tbody>
+    </table> -->
+    <br/><br/>
+    <div id='rdetail_copy_info_none' class='hide_me'>[% l(" * There are no copies in this location") %]</div>
+</div> <!-- copy info -->
+<!-- ****************** end: rdetail_copyinfo.xml ***************************** -->
diff --git a/Open-ILS/src/templates_kcls/opac/parts/record/extras.tt2 b/Open-ILS/src/templates_kcls/opac/parts/record/extras.tt2
new file mode 100644 (file)
index 0000000..2649148
--- /dev/null
@@ -0,0 +1,78 @@
+<div id="rdetail_main_div">
+    <div id='rdetail_extras_div' style='width: 100%;'> 
+
+        [%  # Hidden extras are not yet implemented.  Some may require JS
+
+        # Let's see if we should hide the content cafe / simple summary content
+        hide_summary = 1;
+        IF attrs.summary.0; hide_summary = 0; ELSE;
+            # Expose content cafe if it's reasonable to do so.
+            # This approach only works when using embedded content cafe.
+            IF ENV.OILS_CONTENT_CAFE_USER; 
+                ident = attrs.isbn_clean || attrs.upc; 
+                IF ident; hide_summary = 0; END;
+            END;
+        END;
+
+        extras = [
+            {name => 'subjects', label => l('Subject')}, 
+            {name => 'summaryplus',  label => l('Summaries &amp; More'), hide => hide_summary}, 
+            {name => 'contents',  label => l('Contents'), hide => !attrs.contents},
+            {name => 'authors',  label => l('Authors')}, 
+            {name => 'series',   label => l('Series')},
+            {name => 'annotation', label => l('Annotation'), hide => 1}, 
+            {name => 'awards',  label => l('Awards, Reviews, & Suggested Reads')}, 
+            {name => 'excerpt',  label => l('Excerpt'), hide => 1},
+            {name => 'issues',   label => l('Issues Held'), hide => !(ctx.have_holdings_to_show || ctx.have_mfhd_to_show)},
+            {name => 'preview',  label => l('Preview'), hide => 1}, 
+            {name => 'cnbrowse', label => l('Shelf Browser')},
+            {name => 'copyinfo', label => l('Copy Summary'), hide => 1}, 
+            {name => 'marchtml', label => l('MARC Record')}
+        ];
+
+        MACRO tab_is_active(tab) BLOCK;
+            exp_name = 'expand_' _ tab;
+            IF ctx.$exp_name OR ctx.expand_all; 1; END;
+        END;
+
+        FOREACH extra IN extras;
+            IF extra.hide; NEXT; END; 
+            name = extra.name;
+        %]
+        <div class="rdetail_extras">
+            <div class="rdetail_extras_hr"></div>
+            <div class="rdetail_extras_link">
+                [%  
+                    IF tab_is_active(name);
+                        href = mkurl('', {}, ['expand']);
+                        img_url = ctx.media_prefix _ '/images/rdetail_arrow_down.png';
+                    ELSE;
+                        href = mkurl('', {expand => name}) _ '#' _ name; 
+                        img_url = ctx.media_prefix _ '/images/rdetail_arrow.png';
+                    END;
+                %]
+                <a name='[% name %]' href='[% href %]'><img alt='[% extra.label %]' src='[% img_url %]'/></a>
+                <a href='[% href %]' class="rdetail_extras_lbl">[% extra.label %]</a>
+            </div>
+        </div>
+        <div class='rdetail_extras_div'>
+            [%  IF tab_is_active(name);
+                    IF name == 'marchtml';
+                        ctx.marchtml;
+                    ELSIF name == 'contents';
+                        attrs.contents;
+                    ELSE;
+                        # Load the template for the selected extra
+                        INCLUDE "opac/parts/record/${name}.tt2";
+                    END;
+                END; 
+            %]
+        </div>
+        [% END %]
+    </div>
+    <!--
+    <div id='rdetail_preview_full_text' class='hide_me'>[% l("Full text") %]</div>
+    <div id='rdetail_preview_title' class='hide_me'>[% l("See the full text of this book.") %]</div>
+    <div id='rdetail_preview_badge' class='hide_me'>[% l("Show a preview of this book from Google Book Search") %]</div>
+    -->
+</div>
diff --git a/Open-ILS/src/templates_kcls/opac/parts/record/issues.tt2 b/Open-ILS/src/templates_kcls/opac/parts/record/issues.tt2
new file mode 100644 (file)
index 0000000..15e4214
--- /dev/null
@@ -0,0 +1,67 @@
+<div id='rdetail_issues_div' class='rdetail_extras_div'>
+[%
+base_expando = ctx.full_path _ "?expand=issues";
+FOREACH type IN ctx.holding_summaries.keys;
+    NEXT UNLESS ctx.holding_summaries.$type.size;
+    expanded = CGI.param('expand_holding_type') == type; %]
+    <div class="rdetail-issue-type">
+        <a href="[% base_expando; expanded ? '' : '&amp;expand_holding_type=' _ type; %]#issues">[[% expanded ? '-' : '+' %]]</a>
+        [% ctx.holding_summaries.$type.join(", ") %]
+        [% IF expanded %]
+        <table>
+            [% FOR blob IN ctx.expanded_holdings %]
+            <tr>
+                <td class="rdetail-issue-issue">[% blob.issuance.label | html %]</td>
+                [% IF blob.has_units %]
+                <td class="rdetail-issue-place-hold">
+                    <a href="[% mkurl(ctx.opac_root _ '/place_hold', 
+                        {hold_target => blob.issuance.id, hold_type => 'I', hold_source_page => mkurl()}) %]">[% l("Place Hold") %]</a>
+                </td>
+                [% END %]
+            </tr>
+            [% END %]
+        </table>
+        [% END %]
+    </div>
+[% END %]
+[% IF ctx.mfhd_summaries.size; %]
+    <div class="rdetail-mfhd-holdings">
+        <table><tbody>
+[%
+        mfhd = {
+            basic_holdings = l('Volumes'),
+            basic_holdings_add = l('Additional Volume Information'),
+            supplement_holdings = l('Supplements'),
+            supplement_holdings_add = l('Additional Supplement Information'),
+            index_holdings = l('Indexes'),
+            index_holdings_add = l('Additional Index Information'),
+            online = l('Online'),
+            missing = l('Missing'),
+            incomplete = l('Incomplete'),
+        };
+
+        FOREACH serial IN ctx.mfhd_summaries;
+%]
+            <tr>
+                <td class="rdetail-mfhd-head" colspan="2">[% l('Holdings summary ([_1])', serial.location) %]</td>
+            </tr>
+[%
+            FOREACH type IN mfhd.keys;
+                NEXT UNLESS serial.$type.size;
+%]
+            <tr>
+                <td class="rdetail-mfhd-type">[% mfhd.$type %]</td>
+                <td class="rdetail-mfhd-contents">[%
+                    FOR thing IN serial.$type;
+                        thing.join(", ");
+                    END %]</td>
+            </tr>
+        [% END %]
+            <tr>
+                <td class="rdetail-mfhd-foot" colspan="2"> </td>
+            </tr>
+    [% END %]
+        </tbody></table>
+    </div>
+[% END %]
+</div>
diff --git a/Open-ILS/src/templates_kcls/opac/parts/record/series.tt2 b/Open-ILS/src/templates_kcls/opac/parts/record/series.tt2
new file mode 100644 (file)
index 0000000..cdfe588
--- /dev/null
@@ -0,0 +1,16 @@
+[% 
+    series_tags = ['440', '490', '800', '810', '811', '830', '694']; 
+    loc = CGI.param('loc');
+%]
+
+<div id='rdetail_series_div'>
+    <table cellpadding="0" cellspacing="0" border="0">
+    [%  FOR tag IN series_tags; %]
+        <tr><td style='padding-top:5px;'>
+        [%  FOR node IN ctx.marc_xml.findnodes('//*[@tag="' _ tag _ '"]/*') %]
+            [% IF !loop.first %]<span>&mdash;</span> [% END %]
+            <a href="[% ctx.opac_root %]/results?qtype=series&amp;query=[% node.textContent | uri %]&amp;loc=[% loc %]">[% node.textContent | html %]</a>
+        [% END %]
+    [% END; %]
+    </table>
+</div>
diff --git a/Open-ILS/src/templates_kcls/opac/parts/record/subjects.tt2 b/Open-ILS/src/templates_kcls/opac/parts/record/subjects.tt2
new file mode 100644 (file)
index 0000000..3d02231
--- /dev/null
@@ -0,0 +1,70 @@
+[% 
+    subjects = [
+        {
+            label => l('Subject: '),
+            xpath => '//*[@tag="600" or @tag="610" or @tag="611" or @tag="630" or @tag="650" or @tag="651"]'
+        }, {
+            label => l('Genre: '),
+            xpath => '//*[@tag="655"]|//*[@tag="659"]'
+        }, {
+            label => l('Topic Heading: '),
+            xpath => '//*[@tag="690"]'
+        }, {
+            label => l('Geographic Setting: '),
+            xpath => '//*[@tag="691"]'
+        }, {
+            label => l('Biographical Subject: '),
+            xpath => '//*[@tag="692"]'
+        }, {
+            label => l('Character Attributes: '),
+            xpath => '//*[@tag="693"]'
+        }, {
+            label => l('Setting: '),
+            xpath => '//*[@tag="698"]'
+        }, {
+            label => l('Time Period: '),
+            xpath => '//*[@tag="699"]'
+        }
+    ];
+
+    BLOCK render_subject;
+        loc = CGI.param('loc') | uri;
+        xpath = xpath || '//*[starts-with(@tag,"6")]';
+        FOR node IN ctx.marc_xml.findnodes(xpath);
+            all_terms = [];
+            FOR subfield IN node.childNodes;
+                NEXT UNLESS subfield.nodeName == "subfield";
+                code = subfield.getAttribute('code');
+                NEXT UNLESS code.match('[a-z]');
+                IF code.match('[vxyz]'); " &mdash; "; END;
+                # at this point, we actually have a partial term to use.
+                single_term = subfield.textContent | html;
+                all_terms.push(subfield.textContent);
+                total_term = all_terms.join(" ").replace('\s+$', '') | uri;
+                '<a href="' _ ctx.opac_root _ '/results?qtype=subject&amp;query=' _ total_term _ '&amp;loc=' _ loc _ '">' _ single_term _ '</a>';
+            END;
+            IF all_terms.size; "<br/>"; END;
+        END;
+    END 
+%]
+
+<div id='rdetail_subject_div'>
+    <table cellpadding="0" cellspacing="0" border="0">
+    [%  any_subjects = 0;
+        FOREACH subj IN subjects;
+            content = PROCESS render_subject(xpath=subj.xpath);
+            IF content.match('\S');
+                any_subjects = 1; %]
+            <tr>
+                <td width="1" style="padding:5px 7px 0px 0px;" valign="top">
+                    <strong>[% subj.label %]</strong>
+                </td>
+                <td style="padding-top:5px;"><div>[% content %] </div></td>
+            </tr>
+            [% END; %]
+        [% END; %]
+    [% IF any_subjects == 0 %]
+        <tr><td><i>[% l('No Subjects') %]</i></td></tr>
+    [% END; %]
+    </table>
+</div>
diff --git a/Open-ILS/src/templates_kcls/opac/parts/record/summary.tt2 b/Open-ILS/src/templates_kcls/opac/parts/record/summary.tt2
new file mode 100644 (file)
index 0000000..d12ab7a
--- /dev/null
@@ -0,0 +1,256 @@
+[% ctx.page_title = attrs.title | html %]
+<!-- ****************** rdetail_summary.xml ***************************** -->
+<abbr class="unapi-id" title='tag:[% ctx.hostname %],[% date.format(date.now, '%Y') %]:biblio-record_entry/[% ctx.bre_id %]'></abbr>
+<!-- This holds the record summary information -->
+
+<table width="100%" border="0" cellpadding="0" cellspacing="0" id="rdetail_details_table">
+    <tbody id="rdetail_details_tbody">
+        <tr>
+            <td width="90" valign="top" id="rdetail_image_cell">
+                [% ident = attrs.isbn_clean || attrs.upc; IF ident; %]
+                <a id='rdetail_img_link' href='[% ctx.media_prefix %]/opac/extras/ac/jacket/large/[% ident | uri %]'><img
+                    alt="[% l('Image of item') %]" id='rdetail_image'
+                    src='[% ctx.media_prefix %]/opac/extras/ac/jacket/small/[% ident | uri %]' /></a>
+                [% END %]
+                <br />
+            </td>
+    
+            <td valign="top">
+                <table border="0" cellpadding="0" cellspacing="0" width="100%">
+                    <tr>
+                        <td valign="top">
+                            <span id='rdetail_title'>[% attrs.title_extended | html %]</span><br />
+                            [% IF attrs.author %]
+                            <span class='opac-auto-030'>[% l("Author") %]:</span>
+                            <em><a title='[% l("Perform an author search") %]'
+                                    id='rdetail_author'
+                                    href="[%- 
+                                        authorquery = attrs.author | replace('[,\.:;]', '');
+                                        mkurl(ctx.opac_root _ '/results', {qtype => 'author', query => authorquery}, ['page'])
+                                        -%]">[% attrs.author | html %]</a></em>
+                            [% END %]
+                            [% IF attrs.online_res.size > 0 %]
+                                <div class='opac-auto-030'>[% l("Online Resources") %]: </div>
+                                [% FOR uri IN attrs.online_res %]
+                                    <div>
+                                        [% text = uri.link; IF uri.notes; text = text _ ' - ' _ uri.notes; END %]
+                                        <a href='[% uri.href %]'><span style='font-size:125%; font-weight:bold;'>[% text | html %]</span></a>
+                                    </div>
+                                [% END %]
+                            [% END %]
+                        </td>
+                        <td align="right" valign="top" nowrap="nowrap" style="white-space:nowrap;">
+                            <div style="width:230px;text-align:left;margin-top:3px;">
+                                <div style="float:right;">
+                                    <div class="rdetail_aux_utils opac-auto-010">
+                                        <a href="[% mkurl(ctx.opac_root _ '/place_hold', 
+                                            {hold_target => ctx.bre_id, hold_type => 'T', hold_source_page => mkurl()}) %]" 
+                                            class="no-dec"><img src="[% ctx.media_prefix %]/images/green_check.png" alt="[% l('place hold') %]" /><span 
+                                                    style="position:relative;top:-3px;left:3px;">[% l('Place Hold') %]</span></a>
+                                    </div>
+                                    <div class="rdetail_aux_utils opac-auto-121">
+                                        [%  
+                                            operation = ctx.mylist.grep(ctx.bre_id).size ? "delete" : "add";
+                                            label = (operation == "add") ? l("Add to my list") : l("Remove from my list"); 
+                                        %]
+                                        <form action="[% ctx.opac_root %]/mylist/[% operation %]" method="POST">
+                                            <input type="hidden" name="record" value="[% ctx.bre_id %]" />
+                                            <div class="pos-abs">
+                                                <div class="opac-auto-149">
+                                                    <input type="submit" title="[% label %]" value="[% label %]" class="subtle-button" />
+                                                </div>
+                                            </div>
+                                            <input type="image" alt="[% label %]"
+                                                src="[% ctx.media_prefix %]/images/clipboard.png" />
+                                        </form>
+                                    </div>
+                                </div>
+                                <div style="float:right;margin-right:17px;">
+                                    [% IF attrs.format_icon %]
+                                    <img alt="[% attrs.format_label %]" title="[% attrs.format_label | html %]" src="[% attrs.format_icon %]" />
+                                    [% END %]
+                                </div>
+                            </div>
+                        </td>
+                    </tr>
+                </table>
+                <div class='opac-auto-018'>
+                    <table border="0" cellpadding="0" width="100%">
+                        <tr>
+                            <td nowrap='nowrap' valign="top">
+                                [% IF attrs.isbns.0 %]<strong id="rdetail_isbn_lbl">[% l("ISBN") %]</strong>[% END %]
+                            </td>
+                            <td valign="top" id='rdetail_isbn'>
+                                [% FOR isbn IN attrs.isbns %][% IF !loop.first; %]<br/>[% END; isbn | html ; END %]
+                            </td>
+                            <td nowrap='nowrap' valign="top">
+                                [% IF attrs.phys_desc %]<strong id="rdetail_phys_lbl">[% l("Physical Description") %]</strong>[% END %]
+                            </td>
+                            <td valign="top" id='rdetail_physical_desc'>[% attrs.phys_desc | html %]</td>
+                        </tr>
+                        <tr>
+                            <td nowrap='nowrap' valign="top">
+                                <strong>[% IF attrs.marc_cn; l("Call Number"); END %]</strong>
+                            </td>
+                            <td valign="top">[% attrs.marc_cn | html %]</td>
+                            <td nowrap='nowrap' valign="top">
+                                <strong id="rdetail_ed_lbl">[% IF attrs.edition; l("Edition"); END %]</strong>
+                            </td>
+                            <td valign="top" id='rdetail_edition'>[% attrs.edition | html %]</td>
+                        </tr>
+                        <tr>
+                            <td nowrap='nowrap' valign="top">
+                                <strong id="rdetail_pub_lbl">[% IF attrs.publisher; l("Publisher"); END %]</strong>
+                            </td>
+                            <td valign="top" id='rdetail_publisher'>[% attrs.publisher | html %]</td>
+                            <td nowrap='nowrap' valign="top">
+                                <strong id="rdetail_pubdate_lbl">[% IF attrs.pubdate; l("Publication Date"); END %]</strong>
+                            </td>
+                            <td valign="top" id='rdetail_pubdate'>[% attrs.pubdate | html %]</td>
+                        </tr>
+                    </table>
+
+                    <!-- hold/copy summary -->
+                    <div style="padding-top:15px;">
+                        <div>
+                            [% l("[quant,_1,Hold,Holds] with [quant,_2,total copy,total copies]", 
+                                ctx.record_hold_count, ctx.copy_summary.0.count) %]
+                        </div>
+                        <div>[% l('[quant,_1,Copy,Copies] available', ctx.copy_summary.0.available) %]</div>
+                    </div>
+
+                </div>
+            </td>
+        </tr>
+    </tbody>
+</table>
+<br /><br />
+
+<table cellpadding="0" cellspacing="0" border="0" width="100%" id="rdetails_status">
+    <thead>
+        <tr id="rdetails_status_head">
+            <td>[% l("Location") %]</td>
+            <td>[% l("Call Number") %]</td>
+            <td>[% l("Barcode") %]</td>
+            <td>[% l("Shelving Location") %]</td>
+            [% IF ctx.is_staff %]
+            <td>[% l("Age Hold Protection") %]</td>
+            <td>[% l("Create Date") %]</td>
+            <td>[% l("Holdable?") %]</td>
+            [% END %]
+            <td>[% l("Status") %]</td>
+            <td>[% l("Due Date") %]</td>
+        </tr>
+    </thead>
+    <tbody class="copy_details_table">
+        [% last_cn = 0;
+        FOR copy_info IN ctx.copies %]
+        <tr>
+            <td>[%
+                # XXX KCLS-specific kludging
+                org_name = ctx.get_aou(copy_info.circ_lib).name;
+                dir = org_name | lower | replace('[^\w]', '') |
+                    replace('.+320th', '320th'); %]
+                <a href="http://www.kcls.org/[% dir %]/"
+                    class="classic_link">[% org_name %]</a>
+            </td>
+            <td>[% copy_info.call_number_label | html %]</td>
+            <td>[% copy_info.barcode | html %]</td>
+            <td>[% copy_info.copy_location | html %]</td>
+            [% IF ctx.is_staff %]
+            <td>
+                [% copy_info.age_protect ?
+                    ctx.get_crahp(copy_info.age_protect).name : l('None') | html %]
+            </td>
+            <td>[% date.format(
+                ctx.parse_datetime(copy_info.create_date),
+                DATE_FORMAT
+            ) %]</td>
+            <td>[%  # Show copy/volume hold links to staff (without
+                    # checking whether they have permissions to do those).
+                    overall_holdable = (copy_info.holdable == 't' AND
+                        copy_info.location_holdable == 't' AND
+                        copy_info.status_holdable == 't');
+                    IF overall_holdable;
+                        l("Place on"); %]
+                <a href="[% mkurl(ctx.opac_root _ '/place_hold', 
+                    {hold_target => copy_info.id, hold_type => 'C', hold_source_page => mkurl()}) %]">[% l("copy") %]</a>
+                [%      IF copy_info.call_number != last_cn;
+                            last_cn = copy_info.call_number;
+                            l(" / "); %]
+                <a href="[% mkurl(ctx.opac_root _ '/place_hold', 
+                    {hold_target => copy_info.call_number, hold_type => 'V', hold_source_page => mkurl()}) %]">[% l("volume") %]</a>
+                [%      END;
+                    ELSE;
+                        l("No");
+                    END %]</td>
+            [% END %]
+            <td>[% copy_info.copy_status | html %]</td>
+            <td>[%
+                IF copy_info.due_date;
+                    date.format(
+                        ctx.parse_datetime(copy_info.due_date),
+                        DATE_FORMAT
+                    );
+                ELSE;
+                    '-';
+                END %]</td>
+        </tr>
+        [% END %]
+        <tr>
+        [% IF ctx.copy_offset > 0;
+            new_offset = ctx.copy_offset - ctx.copy_limit;
+            IF new_offset < 0; new_offset = 0; END %]
+            <td>
+                <a href="[% mkurl('', {copy_offset => new_offset, copy_limit => ctx.copy_limit}) %]">&laquo; [%
+                    l('Previous [_1]', ctx.copy_offset - new_offset) %]</a>
+            </td>
+        [% END %]
+        [% IF ctx.copies.size >= ctx.copy_limit %]
+            <td>
+                <a href="[% mkurl('', {copy_offset => ctx.copy_offset + ctx.copy_limit, copy_limit => ctx.copy_limit}) %]">[%
+                    l('Next [_1]', ctx.copy_limit) %] &raquo;</a>
+            </td>
+        [% END %]
+        </tr>
+        <tr>
+            <td>
+                [% more_copies_limit = 50 %] [%# TODO: config %]
+                [% IF  ctx.copy_limit != more_copies_limit AND ctx.copies.size >= ctx.copy_limit %]
+                    <div style='margin-top:10px;'>
+                        <img src="[% ctx.media_prefix %]/images/plus_sign.png" />
+                        <a href="[% mkurl('', {copy_limit => more_copies_limit, copy_offset => 0}) %]">[% l('Show more copies') %]</a>
+                    </div>
+                [% ELSIF ctx.copy_limit == more_copies_limit %]
+                    <div style='margin-top:10px;'>
+                        <img src="[% ctx.media_prefix %]/images/minus_sign.png" />
+                        <a href="[% mkurl('', {copy_limit => 0, copy_offset => 0}) %]">[% l('Show fewer copies') %]</a>
+                    </div>
+                [% END %]
+            </td>
+        </tr>
+        <tr>
+            <td>
+                [% IF CGI.param('expand') == 'all' %]
+                    <img src="[% ctx.media_prefix %]/images/minus_sign.png" />
+                    <a href="[% mkurl('', {}, ['expand']) %]">[% l('Collapse all tabs') %]</a>
+                [% ELSE %]
+                    <img src="[% ctx.media_prefix %]/images/plus_sign.png" />
+                    <a href="[% mkurl('', {expand => 'all'}) %]">[% l('Expand all tabs') %]</a>
+                [% END %]
+            </td>
+        </tr>
+
+    </tbody>
+</table>
+
+<div id="rdetail_extras_expand" class="hide_me">
+    <a href="#"><img
+        src="[% ctx.media_prefix %]/images/plus_sign.png" /></a>
+    <a style="position:relative;top:-3px;" href="#">[% l('Expand all tabs') %]</a>
+</div>
+
+<div id="rdetail_extras_collapse" class="hide_me">
+    <a href="#"><img src="[% ctx.media_prefix %]/images/plus_sign.png" /></a>
+    <a style="position:relative;top:-3px;" href="#">[% l('Collapse all tabs') %]</a>
+</div>
diff --git a/Open-ILS/src/templates_kcls/opac/parts/record/summaryplus.tt2 b/Open-ILS/src/templates_kcls/opac/parts/record/summaryplus.tt2
new file mode 100644 (file)
index 0000000..7796213
--- /dev/null
@@ -0,0 +1,19 @@
+<div class='rdetail_extras_div'> 
+    [%  IF attrs.summary %]
+    <div class='rdetail-extras-summary'>
+        <strong>[% l('Summary: ') %]</strong>
+        [% FOR sum IN attrs.summary %]
+            [% IF !loop.first; '<br/>'; END %]
+            <span>[% sum | html %] </span>
+        [% END %]
+    </div>
+    [% END %]
+
+    <!-- Embedded content cafe iframe -->
+    [% ident = attrs.isbn_clean || attrs.upc %]
+    <iframe width="100%" height="400" frameborder="0" 
+        src="[% ctx.proto %]://contentcafe2.btol.com/ContentCafeClient/ContentCafe.aspx?UserID=[%- 
+            ENV.OILS_CONTENT_CAFE_USER %]&amp;Password=[% ENV.OILS_CONTENT_CAFE_PASS %]&amp;ItemKey=[% ident | uri %]&amp;Options=Y" >
+    </iframe>
+</div>
+
diff --git a/Open-ILS/src/templates_kcls/opac/parts/result/facets.tt2 b/Open-ILS/src/templates_kcls/opac/parts/result/facets.tt2
new file mode 100644 (file)
index 0000000..dd27dd9
--- /dev/null
@@ -0,0 +1,129 @@
+<div class="facet_box_wrapper">
+[% 
+
+close_facets = CGI.param('close_facet') || [];
+selected_facets = CGI.param('facet') || [];
+
+# sorted list of search facets
+sorted_facets = [];
+
+IF facet.display;
+
+    # facet display configuration present.  Traverse the 
+    # configuration lists, find the matching facets from 
+    # search facet data, and append them to the sorted 
+    # list of facets.
+
+    FOR display_chunk IN facet.display;
+        FOR display_field IN display_chunk.facet_order;
+            # find the matching facet in the facet data
+            FOR facet IN ctx.search_facets.values;
+                IF facet.cmf.field_class == display_chunk.facet_class 
+                        AND facet.cmf.name == display_field;
+                    sorted_facets.push(facet);
+                END;
+            END;
+        END;
+    END;
+
+ELSE; 
+
+    # No facet display configuration is present.
+    # show all facets, sorted by name.
+
+    # collect facet type labels for easier sorting
+    labels = []; 
+    FOR facet IN ctx.search_facets.values;
+        labels.push(facet.cmf.label);
+    END;
+    
+    FOR facet_label IN labels.sort;
+        FOR facet IN ctx.search_facets.values;
+            IF facet.cmf.label == facet_label;
+                sorted_facets.push(facet);
+            END;
+        END;
+    END;
+END;
+
+FOR facet IN sorted_facets;
+    fclass = facet.cmf.field_class;
+    fname = facet.cmf.name;
+    close_key = fclass _ fname %]
+
+    <div class="facet_box_temp">
+        <div class="header">
+            <span class="button">
+
+                [% IF close_facets.grep(close_key).0;
+                    new_close = [];
+                    FOR fct IN close_facets;
+                        IF fct != close_key;
+                            new_close.push(fct);
+                        END;
+                    END;
+                    expand_url = mkurl('', {close_facet => new_close});
+                    IF new_close.size == 0;
+                        expand_url  = mkurl('', {}, ['close_facet']);
+                    END;
+                %]
+                    <a href="[% expand_url %]"><img 
+                        src="[% ctx.media_prefix %]/images/adv_search_plus_btn.png" alt="[% l('Expand') %]" /></a>
+                [% ELSE %]
+                    <a href="[% mkurl('', {close_facet => close_facets.merge([close_key])}) %]"><img 
+                        src="[% ctx.media_prefix %]/images/adv_search_minus_btn.png" alt="[% l('Collapse') %]" /></a>
+                [% END %]
+            </span>
+            <div class="title">[% facet.cmf.label %]</div>
+        </div>
+        [% IF !close_facets.grep(close_key).0 %]
+        <div class="box_wrapper">
+            <div class="box">
+            [% FOR facet_data IN facet.data;
+                display_value = facet_data.value | html;
+                param_string = fclass _ '|' _ fname _ '[' _ facet_data.value _ ']';
+                new_facets = [];
+                this_selected = 0;
+                FOR selected IN selected_facets;
+                    IF selected == param_string; 
+                        this_selected = 1; 
+                    ELSE;
+                        new_facets.push(selected);
+                    END;
+                END;
+                IF this_selected;
+                    # This facet is already selected by the user. 
+                    # Link removes the facet from the set of selected facets.
+                %] 
+                    <div class="facet_template facet_template_selected">
+                        <div class="facet">
+                            [% IF new_facets.size == 0 %]
+                            <a href="[% mkurl('', {}, ['facet']) %]">[% display_value %]</a>
+                            [% ELSE %]
+                            <a href="[% mkurl('', {facet => new_facets}) %]">[% display_value %]</a>
+                            [% END %]
+                        </div>
+                        <div class="count">([% facet_data.count %])</div>
+                        <div class="clear">&nbsp;</div>
+                    </div>
+                [% 
+                    ELSE;
+                    # This facet is not currently selected.  If selected, 
+                    # append this facet to the list of currently active facets.
+                %]
+                    <div class="facet_template">
+                        <div class="facet">
+                            <a href='[% mkurl('', {facet => selected_facets.merge([param_string])}, ['page']) %]'>[% display_value %]</a>
+                        </div>
+                        <div class="count">([% facet_data.count %])</div>
+                        <div class="clear">&nbsp;</div>
+                    </div>
+                [% END %]
+            [% END %]
+            </div>
+        </div> <!-- box_wrapper -->
+        [% END %]
+    </div> <!-- facet_box_temp -->
+[% END %]
+</div> <!-- facet_box_wrapper -->
+
diff --git a/Open-ILS/src/templates_kcls/opac/parts/result/lowhits.tt2 b/Open-ILS/src/templates_kcls/opac/parts/result/lowhits.tt2
new file mode 100644 (file)
index 0000000..fe2d160
--- /dev/null
@@ -0,0 +1,94 @@
+<div id='result_low_hits'>
+    <div id="zero_search_hits">
+        <div>
+            <p>[% l('Sorry, no entries were found for') %]
+                [% IF is_advanced OR is_special; l('your search'); ELSE %]
+                <q>[% CGI.param('query') | html %]</q>
+                [% END %]
+                <br />
+                <span id="zero_hits_label1" class="hide_me">[% l('Did you mean') %]
+                    <strong><a id="spell_check_link" href="javascript:;"></a></strong>?</span>
+            </p>
+            <table cellpadding="0" cellspacing="0" border="0">
+                <tr>
+                    <td valign="top" style="padding-right:10px;">
+                        <span id="zero_hits_label2" class="hide_me">[% l('Other Possibilities:') %]</span>
+                    </td>
+                    <td id="zero_hits_suggestions"></td>
+                </tr>
+            </table>
+        </div>
+        <div style="float:right;width:353px;background:#ccc;padding:10px;margin-top:7px;">
+            [% INCLUDE "opac/parts/result/lowhits_purchase.tt2" %]
+            <p>
+                <strong>Keyword Search Tips</strong><br />
+                Try changing to <strong>Advanced Search</strong>.
+            </p>
+            <p>
+                <strong>Adjacency</strong><br />
+                Multiple words are not searched together as a phrase. They will
+                be found in various parts of the record. To search for a phrase, enclose your
+                search terms in quotation marks.<br />
+                (example:  <strong>&quot;garcia marquez&quot;</strong>)
+            </p>
+            <p>
+                <strong>Truncation</strong><br />
+                Words may be right-hand truncated using an asterisk. Use a single asterisk *
+                to truncate any number of characters.<br />
+                (example: <strong>environment* agency</strong>)
+            </p>
+            <p>
+                <strong>Anchored Searching</strong><br />
+                You may use ^ and $ to indicate "phrase begins with" and
+                "phrase ends with," respectively, within a search phrase
+                enclosed in quotation marks.<br />
+                (examples: <strong>"^harry"</strong> for phrases that begin with
+                the term <em>harry</em>.
+                <strong>"stone$"</strong> for phrases that end in <em>stone</em>.)
+            </p>
+        </div>
+    </div>
+    <div class="hide_me">
+        <div style='text-align: center; padding-bottom: 8px;' class="hide_me">
+            <div id='result_low_hits_msg' class='hide_me'>[% l("Few hits were returned for your search.") %]</div>
+            <div id='result_zero_hits_msg' class='hide_me'>[% l("Zero hits were returned for your search.") %]</div>
+        </div>
+
+        <!-- spell checker -->
+        <div id='did_you_mean' class='lowhits_div hide_me'>
+            <span>[% l("Maybe you meant:") %] </span>
+            <!-- <a class='classic_link' id='spell_check_link'> </a> -->
+        </div>
+
+        <div id='low_hits_remove_format' class='lowhits_div hide_me'>
+            <span>[% l("You will find more hits when searching all item formats:") %] </span>
+            <a id='low_hits_remove_format_link' class='classic_link'>[% l("Search again with all formats?") %]</a>
+        </div>
+
+        <div id='low_hits_cross_ref' class='lowhits_div hide_me'>
+            <span>[% l("You may also like to try these related searches:") %]</span>
+            <div style='padding: 5px;'>
+                <a id='low_hits_xref_link' class='classic_link' style='padding-right: 5px;'> </a>
+            </div>
+        </div>
+
+        <div id='low_hits_expand_range' class='lowhits_div hide_me'>
+            <span>[% l("You may also wish to expand your search range to:") %] </span>
+            <a id='low_hits_expand_link' class='classic_link' style='padding-right: 5px;'> </a>
+        </div>
+
+        <div id='low_hits_search_type' class='lowhits_div hide_me'>
+            <span>[% l("You can try searching the same terms by:") %]</span>
+            <a id='low_hits_title_search' class='hide_me classic_link' 
+                style='padding-right: 5px;'>[% l("title") %]</a>
+            <a id='low_hits_author_search' class='hide_me classic_link' 
+                style='padding-right: 5px;'>[% l("author") %]</a>
+            <a id='low_hits_subject_search' class='hide_me classic_link' 
+                style='padding-right: 5px;'>[% l("subject") %]</a>
+            <a id='low_hits_series_search' class='hide_me classic_link' 
+                    style='padding-right: 5px;'>[% l("series") %]</a>
+            <a id='low_hits_keyword_search' class='hide_me classic_link' 
+                style='padding-right: 5px;'>[% l("keyword") %]</a>
+        </div>
+    </div>
+</div>
diff --git a/Open-ILS/src/templates_kcls/opac/parts/result/lowhits_purchase.tt2 b/Open-ILS/src/templates_kcls/opac/parts/result/lowhits_purchase.tt2
new file mode 100644 (file)
index 0000000..cdfde46
--- /dev/null
@@ -0,0 +1,6 @@
+<p>
+    <strong>Still not finding what you are looking for?</strong><br />
+    Request that KCLS purchase the material you are looking for by making a
+    <a href="http://www.kcls.org/usingthelibrary/request/">Purchase Request</a><br />
+    <strong>Note:</strong> You must be logged in to make a Purchase Request<br />
+</p>
diff --git a/Open-ILS/src/templates_kcls/opac/parts/result/paginate.tt2 b/Open-ILS/src/templates_kcls/opac/parts/result/paginate.tt2
new file mode 100644 (file)
index 0000000..6582c01
--- /dev/null
@@ -0,0 +1,59 @@
+[% 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">&#9668;</span> [% l('Previous') %] </a>
+
+                    <span style='padding-left: 11px; padding-right:11px;'>
+                        [%  # show links to 4 previous pages, the current page, and 3 more pages.
+                            added = 0;
+                            pageitr = page - 5; 
+                            IF page_count > 1; # no need to paginate 1 page
+                                WHILE (pageitr = pageitr + 1) < page_count;
+                                    IF pageitr < 0; NEXT; END;
+                                    IF pageitr == page; %]
+                                        <span class='results-paginator-selected'>[% pageitr + 1%]</span>
+                                    [% ELSE %]
+                                        <a href="[% mkurl('', {page => pageitr}) %]">[% pageitr + 1%]</a>
+                                [%  END;
+                                    added = added + 1;
+                                    IF added == 8; LAST; END;
+                                END;
+                            END;
+                        %]
+                    </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">&#9658;</span></a>
+                </span>
+            </td>
+        </tr>
+    </table>
+</div>
+[% END %]
+
diff --git a/Open-ILS/src/templates_kcls/opac/parts/result/table.tt2 b/Open-ILS/src/templates_kcls/opac/parts/result/table.tt2
new file mode 100644 (file)
index 0000000..aa55f15
--- /dev/null
@@ -0,0 +1,217 @@
+[%  PROCESS "opac/parts/misc_util.tt2";
+
+    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>
+
+[% PROCESS "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;">
+                    [% INCLUDE 'opac/parts/result/facets.tt2' %]
+                </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 | uri %]' /></a><br />
+                                                [% END %]
+                                            </td>
+                                            <td class='result_table_title_cell' name='result_table_title_cell' valign="top">
+                                                <div class="bold">
+                                                    <a name='record_[% rec.id %]' title="[% attrs.title_extended | uri %]" name='item_title'
+                                                        href="[% mkurl(ctx.opac_root _ '/record/' _ rec.id) %]"
+                                                        class='search_link'>[% attrs.title_extended | html %]</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}, ['page'])
+                                                                    -%]">[% attrs.author | html %]</a></em>
+                                                        &nbsp;&nbsp;
+                                                        [% attrs.pubdate | html %]
+                                                    </div>
+                                                    <table cellpadding="0" cellspacing="0" border="0"
+                                                        class="results_info_table">
+                                                        <tr name='bib_cn_list' class='result_table_title_cell'>
+                                                            <td valign='top'>
+                                                                <strong>[% l('Call number:') %]</strong>
+                                                            </td>
+                                                            <td>[% attrs.marc_cn | html %]</td>
+                                                        </tr>
+
+                                                        [% IF CGI.param('detail_record_view') %]
+                                                        <!-- These fields are visible when viewing the results page in 'detailed' mode -->
+                                                        <tr name="results_pub_tr" class="[% attrs.publisher ? '' : 'hide_me' %]">
+                                                            <td valign="top">
+                                                                <strong>[% l('Publisher:') %]</strong>
+                                                            </td>
+                                                            <td>[% attrs.publisher | html %]</td>
+                                                        </tr>
+                                                        <tr name="results_isbn_tr" class="[% attrs.isbns.0 ? '' : 'hide_me' %]">
+                                                            <td valign="top">
+                                                                <strong>[% l('ISBN:') %]</strong>
+                                                            </td>
+                                                            <td>[% attrs.isbns.0 | html %]</td>
+                                                        </tr>
+                                                        <tr name="results_edition_tr" class="[% attrs.edition ? '' : 'hide_me' %]">
+                                                            <td valign="top">
+                                                                <strong>[% l('Edition:') %]</strong>
+                                                            </td>
+                                                            <td>[% attrs.edition | html %]</td>
+                                                        </tr>
+                                                        <tr name="results_phys_desc_tr" class="[% attrs.phys_desc ? '' : 'hide_me' %]">
+                                                            <td nowrap="nowrap" valign="top">
+                                                                <strong>[% l('Phys. Desc.:') %]</strong>
+                                                            </td>
+                                                            <td>
+                                                                [% args.phys_desc | html %]
+                                                            </td>
+                                                        </tr>
+                                                        [% END %]
+
+                                                    </table>
+                                                    <div>
+                                                        [% l('[quant,_1,hold,holds] on first copy returned of [quant,_2,copy,copies]',
+                                                                rec.hold_count, attrs.copy_counts.count) %]
+                                                        <br/>
+                                                        [% l('[quant,_1,copy,copies] available', attrs.copy_counts.available) %]
+                                                    </div>
+                                                    [% IF rec.user_circulated %]
+                                                    <div class="result_item_circulated">
+                                                        <img src="[% ctx.media_prefix %]/images/green_check.png" alt="[% l('Checked Out Before') %]"/>
+                                                        <span style="position:relative;top:-3px;left:3px;">[%  l('I have checked this item out before') %]</span></a>
+                                                    </div>
+                                                    [% END %]
+                                                </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 | html %]" alt="[% attrs.format_label | html %]" 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', hold_source_page => mkurl()}) %]" 
+                                                                    name="place_hold_link" class="no-dec"><img
+                                                                src="[% ctx.media_prefix %]/images/green_check.png"
+                                                                alt="[% l('Place hold') %]"/><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") : l("Remove from"); %]
+                                                            <form action="[% ctx.opac_root %]/mylist/[% operation %]" method="POST">
+                                                                <input type="hidden" name="record" value="[% rec.id %]" />
+                                                                <input type="hidden" name="anchor" value="record_[% rec.id %]" />
+                                                            <div style="position:absolute;">
+                                                                <div style="position:relative;top:5px; left: 25px;">
+                                                                    <input type="submit" title="[% '[_1] my list' | l(label) %]" 
+                                                                        value="[% '[_1] my list' | l(label) %]" class="subtle-button" />
+                                                                </div>
+                                                            </div>
+                                                                <input type="image"
+                                                                alt="[% '[_1] my list' | l(label) %]"
+                                                                src="[% ctx.media_prefix %]/images/clipboard.png" />
+                                                            </form>
+                                                        </div>
+                                                        [% IF ENV.OILS_CONTENT_CAFE_USER %]
+                                                        <div class="results_aux_utils opac-auto-011">
+                                                            <a title="[% l('Reviews and More') %]" target='_blank' 
+                                                                href="[% ctx.proto %]://contentcafe2.btol.com/ContentCafeClient/ContentCafe.aspx?UserID=[%- 
+                                                                    ENV.OILS_CONTENT_CAFE_USER %]&amp;Password=[%-
+                                                                    ENV.OILS_CONTENT_CAFE_PASS %]&amp;ItemKey=[% ident | uri %]&Options=Y">
+                                                                <img src='[% ctx.media_prefix %]/images/starz.png'/> 
+                                                                <span style='position:relative;top:-5px;'>[% l('Reviews &amp; More') %]</span>
+                                                            </a>
+                                                        </div>
+                                                        [% END %]
+                                                    </div>
+                                                </div>
+                                            </td>
+                                        </tr>
+                                        <tr>
+                                            <td/>
+                                            <td align='center'> <!-- Chilifresh reviews link --> 
+                                                <span class="chili_review" id="isbn_[% attrs.isbn_clean | html %]"> </span>
+                                            </td>
+                                        </tr>
+                                        <tr>
+                                            <td/>
+                                            <td colspan='5'> <!-- Chilifresh reviews panel -->
+                                                <div id="chili_review_[% attrs.isbn_clean | html %]" 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>
diff --git a/Open-ILS/src/templates_kcls/opac/parts/searchbar.tt2 b/Open-ILS/src/templates_kcls/opac/parts/searchbar.tt2
new file mode 100644 (file)
index 0000000..8b08913
--- /dev/null
@@ -0,0 +1,78 @@
+[% PROCESS "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="[% mkurl(ctx.opac_root _ '/advanced') %]"
+                    id="home_adv_search_link"><span
+                    class="adv_search_font">[% l('Advanced Search') %]</span></a>
+            </td>
+        </tr>
+        <tr>
+            <td>
+            [% INCLUDE "opac/parts/qtype_selector.tt2" %]
+            </td>
+            <td>
+                <div id="search_box_wrapper">
+                    [%  placeholder = l("Search Keyword");
+                        value = is_advanced ? ctx.processed_search_query : CGI.param('query') || placeholder | html;
+                    %]
+                    <!-- Note: when common browsers support HTML5 placeholder text, we can remove the JS -->
+                    <input type="text" id="search_box" name="query" value="[% value %]" 
+                        [% IF value == placeholder %] style='color:#999' [% END %]
+                        onfocus="if (this.value=='[% placeholder %]'){this.value='';this.style.color='#000';}"
+                        onblur="if (this.value==''){this.value='[% placeholder %]';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=''/>
+                        [% 
+                            # If/when we have marc tag search support in query parser, we can remove this
+                            tags = CGI.param('tag');
+                            IF tags.0; # is this a marc search?
+                                subs = CGI.param('subfield');
+                                terms = CGI.param('term');
+                                marc_search = '';
+                                FOR tag IN tags;
+                                    i = loop.index;
+                                    marc_search = marc_search _ ' ' _ tags.$i _ subs.$i _ ':' _ terms.$i;
+                                END %]
+                                <span style='padding-left: 10px; color:#999'>[% marc_search | html %]</span>
+                        [% END %]
+                    </div>
+                </div>
+            </td>
+        </tr>
+        <tr>
+            <td>
+                [% INCLUDE "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>
+    </table>
+    [% UNLESS took_care_of_form %]</form>[% END %]
+    <div id="breadcrumb">
+        <a href="[% ctx.opac_root %]/home">[% l('Catalog Home') %]</a> &gt;
+    </div>
+    <div class="clear-both"></div>
+</div>
diff --git a/Open-ILS/src/templates_kcls/opac/parts/tips.tt2 b/Open-ILS/src/templates_kcls/opac/parts/tips.tt2
new file mode 100644 (file)
index 0000000..f4e73ed
--- /dev/null
@@ -0,0 +1,11 @@
+<!-- ****************** tips.xml ***************************** -->
+<div class="hide_me">
+    <div id='tips' class='tips hide_me'>
+        <div class='hide_me'>
+            <span>[% l("Click on a folder icon in the sidebar to access related quick searches") %]</span>
+            <span>[% l("If you don't find what you want try expanding your search using the range selector at the right of the search bar") %]</span>
+        </div>
+        <strong>[% l("Tip:") %]</strong>
+    </div>
+</div>
+<!-- ****************** end: tips.xml ***************************** -->
diff --git a/Open-ILS/src/templates_kcls/opac/parts/topnav.tt2 b/Open-ILS/src/templates_kcls/opac/parts/topnav.tt2
new file mode 100644 (file)
index 0000000..763c57f
--- /dev/null
@@ -0,0 +1,107 @@
+[% INCLUDE "opac/parts/banner.tt2" %]
+[% IF !ctx.is_staff %]
+<div id="header">
+    <div class="float-left">
+        [% INCLUDE "opac/parts/topnav_logo.tt2" %]
+    </div>
+    <div class="float-right">
+        [% IF !ctx.user %]
+        <div id="your-acct-login">
+            <a href="[% ctx.opac_root %]/myopac/main" id="home_myopac_link"><img
+                alt="[% l('Your Account Log in') %]"
+                src="[% ctx.media_prefix %]/images/login-btn.png"
+                onmouseover="this.src='[% ctx.media_prefix %]/images/login-btn-hover.png';"
+                onmouseout="this.src='[% ctx.media_prefix %]/images/login-btn.png';" /></a>
+        </div>
+        [% ELSE %]
+        <div id="dash_wrapper">
+            <div class="float-right">
+                <table cellpadding="0" cellspacing="0" border="0">
+                    <tr>
+                        <td>
+                            <img src="[% ctx.media_prefix %]/images/dash-corner-left1.png" />
+                        </td>
+                        <td id="dash_corner_mid1a">
+                            <span id="dash_user">
+                                [%  l('[_1] [_2]', ctx.user.first_given_name, ctx.user.family_name) | html %]
+                            </span>
+                        </td>
+                        <td id="dash_corner_mid1b">
+                            <img src="[% ctx.media_prefix %]/images/dash-divider.jpg" />
+                        </td>
+                        <td id="dash_corner_mid1c">
+
+                            <a href="[% ctx.opac_root %]/myopac/main" class="pos-rel-top4"><img
+                                alt="[% l('My Account') %]"
+                                src="[% ctx.media_prefix %]/images/acct-btn.png"
+                                onmouseover="this.src='[% ctx.media_prefix %]/images/acct-btn-hover.png';"
+                                onmouseout="this.src='[% ctx.media_prefix %]/images/acct-btn.png';" /></a>
+
+                            <a href="[% ctx.opac_root %]/logout" class="pos-rel-top4"
+                                id="logout_link"><img
+                                alt="[% l('Logout') %]"
+                                src="[% ctx.media_prefix %]/images/logout-btn.png"
+                                onmouseover="this.src='[% ctx.media_prefix %]/images/logout-btn-hover.png';"
+                                onmouseout="this.src='[% ctx.media_prefix %]/images/logout-btn.png';" /></a>
+                        </td>
+                        <td>
+                            <img src="[% ctx.media_prefix %]/images/dash-corner-right1.png" />
+                        </td>
+                    </tr>
+                </table>
+            </div>
+            <div id="dashboard">
+                <div class="pos-abs">
+                    <div class="pos-rel-top4">
+                        <table cellpadding="0" cellspacing="0" border="0">
+                            <tr>
+                                <td>
+                                    <img src="[% ctx.media_prefix %]/images/dash-corner-left2.png" />
+                                </td>
+                                <td id="dash_corner_mid2a">
+                                    <div id="dash_number_row">
+                                        <table>
+                                            <tr>
+                                                <td>
+                                                    <div class="dash-align-out">
+                                                        <a class="dash-link" href="[% ctx.opac_root %]/myopac/circs"><span 
+                                                            id="dash_checked">[% ctx.user_stats.checkouts.total_out %]</span> [% l("Checked Out") %]</a>
+                                                    </div>
+                                                </td>
+                                                <td>
+                                                    <div class="dash-align-holds">
+                                                        <a class="dash-link" href="[% ctx.opac_root %]/myopac/holds"><span 
+                                                            id="dash_holds">[% ctx.user_stats.holds.total %]</span> [% l("On Hold") %]</a>
+                                                    </div>
+                                                </td>
+                                                <td>
+                                                    <div class="dash-align-pickup">
+                                                        <a class="dash-link" href="[% ctx.opac_root %]/myopac/holds?available=1"><span 
+                                                            id="dash_pickup">[% ctx.user_stats.holds.ready %]</span> [% l("Ready for Pickup") %]</a>
+                                                    </div>
+                                                </td>
+                                                <td>
+                                                    <div class="dash-align-fines">
+                                                        <a class="dash-link" href="[% ctx.opac_root %]/myopac/main"><span 
+                                                            id="dash_fines">[% money(ctx.user_stats.fines.balance_owed) %]</span> [% l("Fines") %]</a>
+                                                    </div>
+                                                </td>
+                                            </tr>
+                                        </table>
+                                    </div>
+                                </td>
+                                <td>
+                                    <img src="[% ctx.media_prefix %]/images/dash-corner-right2.png" />
+                                </td>
+                            </tr>
+                        </table>
+                    </div>
+                </div>
+            </div>
+        </div>
+        [% END %]
+    </div>
+    <div class="common-no-pad"></div>
+</div>
+[% END %]
+[% INCLUDE "opac/parts/topnav_links.tt2" %]
diff --git a/Open-ILS/src/templates_kcls/opac/parts/topnav_links.tt2 b/Open-ILS/src/templates_kcls/opac/parts/topnav_links.tt2
new file mode 100644 (file)
index 0000000..6ea4b4d
--- /dev/null
@@ -0,0 +1,13 @@
+<div id="gold-links-holder">
+    <div id="gold-links">
+        <div id="header-links">
+            <a href="http://www.kcls.org/usingthelibrary/index.cfm">Using the Library</a>
+            <a href="http://www.kcls.org/booksandreading/">Books &amp; Reading</a>
+            <a href="http://www.kcls.org/research/index.cfm">Research &amp; Homework</a>
+            <a href="http://www.kcls.org/programs/">Programs &amp; Classes</a>
+            <a href="http://www.kcls.org/events/">Events</a>
+            <a href="/opac/extras/mobile/">Mobile Catalog</a>
+            <a href="http://www.kcls.org/about/">About KCLS</a>
+        </div>
+    </div>
+</div>
diff --git a/Open-ILS/src/templates_kcls/opac/parts/topnav_logo.tt2 b/Open-ILS/src/templates_kcls/opac/parts/topnav_logo.tt2
new file mode 100644 (file)
index 0000000..f9d4320
--- /dev/null
@@ -0,0 +1,2 @@
+        <a href="http://www.kcls.org"><img alt="[% l('KCLS Logo') %]" 
+            src="[% ctx.media_prefix %]/images/KCLS_logo_horiz.gif" /></a>
diff --git a/Open-ILS/src/templates_kcls/opac/password_reset.tt2 b/Open-ILS/src/templates_kcls/opac/password_reset.tt2
new file mode 100644 (file)
index 0000000..beccb2a
--- /dev/null
@@ -0,0 +1,72 @@
+[%  PROCESS "opac/parts/header.tt2";
+    WRAPPER "opac/parts/base.tt2";
+    INCLUDE "opac/parts/topnav.tt2";
+    ctx.page_title = l('Library system password reset request form');
+%]
+<div id="search-wrapper">
+    [% INCLUDE "opac/parts/printnav.tt2" %]
+    [% INCLUDE "opac/parts/searchbar.tt2" %]
+</div>
+
+[%  
+    uuid = ctx.page_args.0;
+    msg_map = {
+        SUCCESS => l('Password has been reset'),
+        NO_MATCH => l('Passwords did not match. Please try again'),
+        NOT_ACTIVE => l('This was not an active password reset request. Your password has not been reset.'),
+        NOT_STRONG => l('The password you chose was not considered complex enough to protect your account. Your password has not been reset.'),
+        TWO_PASSWORDS => l('Please enter and repeat your new password.'),
+        REQUEST_SUCCESS => l('Your user name or barcode has been submitted for a password reset. ' _ 
+            'If a matching account with an email address is found, you will soon receive an email at that address with further instructions for resetting your password.')
+    }
+%]
+<div id="content-wrapper">
+    <div id="main-content">
+        <br/>
+        <p class='[% ctx.pwreset.style %]'>[% stat = ctx.pwreset.status; msg_map.$stat %]</p>
+        [% IF uuid %]
+            [% IF stat == 'SUCCESS' %]
+                <p><a href='[% mkurl(ctx.opac_root _ '/myopac/main', {}, 1) %]'>[% l('Log in to My Account') %]</a>
+            [% ELSE %]
+            <form method="post">
+                <input type='hidden' name='uuid' value='[% uuid | html %]'/>
+                <table>
+                    <tr>
+                        <td><label for="pwd1">[% l('New password:') %]</label></td>
+                        <td><input type="password" name="pwd1"/></td>
+                    </tr>
+                    <tr>
+                        <td><label for="pwd2">[% l('Re-enter new password:') %]</label></td>
+                        <td><input type="password" name="pwd2"/></td>
+                    </tr>
+                    <tr>
+                        <td>
+                            <button name="submit" id="submitButton" type="submit">[% l('Submit') %]</button>
+                        </td>
+                    </tr>
+                </table>
+            </form>
+            [% END %]
+        [% ELSIF !ctx.pwreset.status %]
+        <h2>[% l('Please enter your user name or barcode to identify your library account and request a password reset') %]</h2>
+        <form method="post">
+            <table>
+                <tr>
+                    <td><label for="barcode">[% l('Barcode:') %] </label></td>
+                    <td><input type="text" id="barcode" name="barcode"/></td>
+                </tr>
+                <tr>
+                    <td><label for="username">[% l('User name:') %] </label></td>
+                    <td><input type="text" id="username" name="username"/></td>
+                </tr>
+            </table>
+            [% IF ctx.get_org_setting(ctx.physical_loc || ctx.aou_tree.id, 'circ.password_reset_request_requires_matching_email') %]
+            <label for="email">[% l('Email address associated with the account:') %] </label><input type="text" name="email"/></br>
+            [% END %]
+            <button name="submit" id="submitButton" type="submit">[% l('Submit') %]</button>
+        </form>
+        [% END %]
+    </div>
+</div>
+[% END %]
+
diff --git a/Open-ILS/src/templates_kcls/opac/place_hold.tt2 b/Open-ILS/src/templates_kcls/opac/place_hold.tt2
new file mode 100644 (file)
index 0000000..bbe6951
--- /dev/null
@@ -0,0 +1,20 @@
+[%  PROCESS "opac/parts/header.tt2";
+    WRAPPER "opac/parts/base.tt2";
+    INCLUDE "opac/parts/topnav.tt2";
+    ctx.page_title = l("Place Hold") %]
+    <div id="search-wrapper">
+        [% INCLUDE "opac/parts/printnav.tt2" %]
+        [% INCLUDE "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 "opac/parts/place_hold_result.tt2" %]
+            [% ELSE %]
+                [% INCLUDE "opac/parts/place_hold.tt2" %]
+            [% END %]
+            <div class="common-full-pad"></div>        
+        </div>
+    </div>
+[% END %]
diff --git a/Open-ILS/src/templates_kcls/opac/record.tt2 b/Open-ILS/src/templates_kcls/opac/record.tt2
new file mode 100644 (file)
index 0000000..2507a44
--- /dev/null
@@ -0,0 +1,15 @@
+[%  PROCESS "opac/parts/header.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>
+    <div id="content-wrapper" class="content-wrapper-record-page">
+        <div id="main-content">
+            [% INCLUDE "opac/parts/record/body.tt2" %]
+            <div class="common-full-pad"></div>        
+        </div>
+    </div>
+[% END %]
diff --git a/Open-ILS/src/templates_kcls/opac/results.tt2 b/Open-ILS/src/templates_kcls/opac/results.tt2
new file mode 100644 (file)
index 0000000..d19ee47
--- /dev/null
@@ -0,0 +1,83 @@
+[%  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="[% mkurl(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>
+    <div id="content-wrapper">
+        <div id="main-content">
+            <div id="tehResultsPage">
+                [% path = "opac/parts/result/" _
+                    (ctx.records.size ? "table.tt2" : "lowhits.tt2");
+                INCLUDE $path %]
+            </div>
+            <div class="common-full-pad"></div>    
+        </div>
+    </div>
+[% END %]