Bugzilla – Attachment 33497 Details for
Bug 13234
Make on-site checkouts visible in OPAC
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
[SIGNED-OFF] Bug 13234: On-site checkouts - OPAC
SIGNED-OFF-Bug-13234-On-site-checkouts---OPAC.patch (text/plain), 11.13 KB, created by
Owen Leonard
on 2014-11-12 17:19:57 UTC
(
hide
)
Description:
[SIGNED-OFF] Bug 13234: On-site checkouts - OPAC
Filename:
MIME Type:
Creator:
Owen Leonard
Created:
2014-11-12 17:19:57 UTC
Size:
11.13 KB
patch
obsolete
>From 39d505e9d61a7e7a51d91974f39d4daa960dd1e7 Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@biblibre.com> >Date: Wed, 12 Nov 2014 11:52:46 +0100 >Subject: [PATCH] [SIGNED-OFF] Bug 13234: On-site checkouts - OPAC >Content-Type: text/plain; charset="utf-8" > >This patch introduces the code lost in bug 10860 for the OPAC side. > >Test plan: >Go on opac-readingrecord.pl and verify the tabs work as expected and the >"show all items" and "show 50 items" links. > >Signed-off-by: Owen Leonard <oleonard@myacpl.org> >--- > .../bootstrap/en/modules/opac-readingrecord.tt | 103 +++++++++++++------- > opac/opac-readingrecord.pl | 1 - > 2 files changed, 66 insertions(+), 38 deletions(-) > >diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-readingrecord.tt b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-readingrecord.tt >index e23fb91..9a57af8 100644 >--- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-readingrecord.tt >+++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-readingrecord.tt >@@ -31,7 +31,7 @@ > [% IF READING_RECORD.size == 0 %] > You have never borrowed anything from this library. > [% ELSE %] >- <div id="opac-user-readingrec" class="statictabs"> >+ <div id="opac-user-readingrec" class="statictabs2"> > <div class="resultscontrol resort"> > <form id="sortform" action="/cgi-bin/koha/opac-readingrecord.pl" method="get"> > [% UNLESS ( limit ) %]<input type="hidden" name="limit" value="full" />[% END %] >@@ -43,32 +43,43 @@ > </form> > </div> > >- <ul> >- [% IF ( showfulllink ) %] >- [% IF ( limit ) %] >- <li><a href="/cgi-bin/koha/opac-readingrecord.pl?limit=full[% IF ( orderbytitle ) %]&order=title[% END %]">Show all items</a></li><li class="active"><a href="#readingrec">Showing last 50 items</a></li> >- [% ELSE %] >- <li class="active"><a href="/cgi-bin/koha/opac-readingrecord.pl#readingrec">Showing all items</a></li><li><a href="/cgi-bin/koha/opac-readingrecord.pl?limit=50[% IF ( orderbytitle ) %]&order=title[% END %]">Show last 50 items only</a></li> >- [% END %] >- [% ELSE %] >- <li class="active"><a href="/cgi-bin/koha/opac-readingrecord.pl#readingrec">Showing all items</a></li> >- [% END %] >- </ul> >- >- <div class="tabs-container"> >- <table id="readingrec" class="table table-bordered table-striped"> >- <tr> >- <th colspan="2">Title</th> >- <th>Item type</th> >- <th>Call no.</th> >- <th>Date</th> >- [% IF ( OPACMySummaryHTML ) %] >- <th>Links</th> >- [% END %] >- </tr> >+ [% IF limit %] >+ <a href="/cgi-bin/koha/opac-readingrecord.pl?limit=full[% IF ( orderbytitle ) %]&order=title[% END %]">Show all items</a> >+ [% ELSE %] >+ <a href="/cgi-bin/koha/opac-readingrecord.pl?limit=50[% IF ( orderbytitle ) %]&order=title[% END %]">Showing last 50 items</a> >+ [% END %] > >+ <div id="tabs" class="toptabs"> >+ <ul> >+ <li><a href="#tabs-container" id="tab_all">All</a></li> >+ <li><a href="#tabs-container" id="tab_checkout">Checkouts</a></li> >+ <li><a href="#tabs-container" id="tab_onsite_checkout">On-site checkouts</a></li> >+ </ul> >+ <div id="tabs-container" style="overflow:hidden"> >+ <table id="readingrec" class="table table-bordered table-striped"> >+ <thead> >+ <tr> >+ <th style="display:none;">Type</th> >+ <th></th> >+ <th>Title</th> >+ <th>Item type</th> >+ <th>Call no.</th> >+ <th>Date</th> >+ [% IF ( OPACMySummaryHTML ) %] >+ <th>Links</th> >+ [% END %] >+ </tr> >+ </thead> >+ <tbody> > [% FOREACH issue IN READING_RECORD %] >- [% IF loop.even %]<tr class="highlight">[% ELSE %]<tr>[% END %] >+ <tr> >+ <td style="display:none;"> >+ [% IF issue.onsite_checkout %] >+ onsite >+ [% ELSE %] >+ checkout >+ [% END %] >+ </td> > <td> > [% IF OPACAmazonCoverImages %] > [% IF issue.normalized_isbn %] >@@ -101,8 +112,8 @@ > <img src="http://www.syndetics.com/index.aspx?isbn=[% issue.normalized_isbn %]/SC.GIF&client=[% SyndeticsClientCode %]&type=xw10&upc=[% issue.normalized_upc %]&oclc=[% issue.normalized_oclc %]" alt="" class="item-thumbnail" /> > [% END %] > [% END %] >- </td> >- <td> >+ </td> >+ <td> > [% IF issue.BiblioDefaultViewmarc %] > <a class="title" href="/cgi-bin/koha/opac-MARCdetail.pl?biblionumber=[% issue.biblionumber |url %]">[% issue.title |html %] [% IF issue.subtitle %][% FOREACH subtitl IN issue.subtitle %][% subtitl.subfield %][% END %][% END %]</a> > [% ELSIF issue.BiblioDefaultViewisbd %] >@@ -111,8 +122,8 @@ > <a class="title" href="/cgi-bin/koha/opac-detail.pl?biblionumber=[% issue.biblionumber |url %]">[% issue.title |html %] [% IF issue.subtitle %][% FOREACH subtitl IN issue.subtitle %][% subtitl.subfield %][% END %][% END %]</a> > [% END %] > <span class="item-details">[% issue.author %]</span> >- </td> >- <td> >+ </td> >+ <td> > [% UNLESS ( noItemTypeImages ) %] > [% IF ( issue.imageurl ) %] > <img src="[% issue.imageurl %]" alt="" /> >@@ -120,23 +131,24 @@ > [% END %] > <span class="tdlabel">Item type:</span> > [% issue.description %]</td> >- <td> >+ <td> > <span class="tdlabel">Call number:</span> > [% issue.itemcallnumber %] >- </td> >- <td> >+ </td> >+ <td> > [% IF issue.returndate %] > <span class="tdlabel">Check-in date:</span> > [% issue.returndate | $KohaDates %] > [% ELSE %] > <em>(Checked out)</em> > [% END %] >- </td> >- [% IF OPACMySummaryHTML %] >- <td>[% issue.MySummaryHTML %]</td> >+ </td> >+ [% IF OPACMySummaryHTML %] >+ <td>[% issue.MySummaryHTML %]</td> >+ [% END %] >+ </tr> > [% END %] >- </tr> >- [% END %] >+ </tbody> > </table> > </div> <!-- / .tabs-container --> > </div> <!-- / .opac-user-readingrec --> >@@ -149,6 +161,7 @@ > > [% INCLUDE 'opac-bottom.inc' %] > [% BLOCK jsinclude %] >+[% INCLUDE 'datatables.inc' %] > <script type="text/javascript"> > //<![CDATA[ > $(document).ready(function(){ >@@ -157,6 +170,22 @@ > $('#order').change(function() { > $('#sortform').submit(); > }); >+ >+ var table = $("#readingrec").dataTable($.extend(true, {}, dataTablesDefaults, { >+ "sPaginationType": "four_button", >+ })); >+ var tabs = $("#tabs").tabs({ >+ select: function(e, ui) { >+ var id = $(ui.tab).attr("id"); >+ if ( id == "tab_checkout" ) { >+ table.fnFilter("checkout", 0); >+ } else if ( id == "tab_onsite_checkout" ) { >+ table.fnFilter("onsite", 0); >+ } else { // all >+ table.fnFilter('', 0); >+ } >+ } >+ }); > }); > //]]> > </script> >diff --git a/opac/opac-readingrecord.pl b/opac/opac-readingrecord.pl >index 6d9e2fc..6e38cfd 100755 >--- a/opac/opac-readingrecord.pl >+++ b/opac/opac-readingrecord.pl >@@ -139,7 +139,6 @@ for(qw(AmazonCoverImages GoogleJackets)) { # BakerTaylorEnabled handled above > $template->param( > READING_RECORD => $issues, > limit => $limit, >- showfulllink => 1, > readingrecview => 1, > OPACMySummaryHTML => $opac_summary_html ? 1 : 0, > ); >-- >1.7.9.5
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 13234
:
33488
|
33497
|
33498
|
33515
|
33516
|
33598
|
33599