Bugzilla – Attachment 26123 Details for
Bug 10860
On-site checkouts (was In-House Use)
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 10860: In-House Use
Bug-10860-In-House-Use.patch (text/plain), 50.17 KB, created by
Jonathan Druart
on 2014-03-11 16:03:36 UTC
(
hide
)
Description:
Bug 10860: In-House Use
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2014-03-11 16:03:36 UTC
Size:
50.17 KB
patch
obsolete
>From 43c343bf3209c5eafd553c17bc4ddb209270e318 Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@biblibre.com> >Date: Wed, 18 Sep 2013 14:16:49 +0200 >Subject: [PATCH] Bug 10860: In-House Use > >This patch implements the In-House Use feature for Koha. > >It adds: >- 2 new sysprefs: > 'In-House Use' to enable/disable this feature > 'In-House Use Forced' to enable/disable the feature for *all* users. >- 2 new columns issues.inhouse_use and old_issues.inhouse_use >- 1 new script misc/cronjobs/bulk_transfers.pl >- Datatable on the circulation history pages (readingrec) at the OPAC > and the intranet. > >A new checkbox in the Circulation tab. If checked, the issue become a >in-house use (in the statistics and issues tables). >When you check it, the due date changes to the today date. > >The syspref "In-House Use Force" allows to force the in-house use to >permit the checkout even if the borrower is debarred or others problems. > >In the issue table, a new string (in red) marks the issue as "in-house use". > >The circulation history contains 3 tabs : "all", "checkout" and >"in-house use" (OPAC and intranet). > >The cronjob script: >If AutomaticItemReturn if off, a library would like not to do a transit >operation manually. This script (to launch each night) do returns >for a specific branches. > >Test plan: >1/ Execute the updatedatabase entry >2/ Enable the 'In-House Use' pref. >3/ Checkout a biblio for a patron and check the 'in-house use' checkbox. >4/ Check that the due date is the today date (with 23:59) and is not modifiable. >5/ Click on the check out button and check that the new check out >appears in the table bellow with the "(In-house use)" string. >6/ Go on the circulation history pages (readingrec and opac-readingrec) >and try the 3 tabs. In the last one, your last checkout should appear. >7/ Check in. >8/ Check readingrec pages. >9/ Choose a debarred patron and check that you cannot checkout a biblio >for him. >10/ Switch on the 'In-House Use Forced' pref >11/ You are now allowed to checkout a biblio for the debarred patron. >--- > C4/Circulation.pm | 18 +- > C4/Items.pm | 6 + > circ/circulation.pl | 27 ++- > installer/data/mysql/kohastructure.sql | 2 + > installer/data/mysql/sysprefs.sql | 2 + > installer/data/mysql/updatedatabase.pl | 28 +++ > .../intranet-tmpl/prog/en/css/staff-global.css | 15 ++ > koha-tmpl/intranet-tmpl/prog/en/js/datatables.js | 16 +- > .../intranet-tmpl/prog/en/js/pages/circulation.js | 6 +- > .../en/modules/admin/preferences/circulation.pref | 12 ++ > .../prog/en/modules/catalogue/detail.tt | 8 + > .../prog/en/modules/circ/circulation.tt | 80 ++++++-- > .../prog/en/modules/members/readingrec.tt | 122 +++++++----- > koha-tmpl/opac-tmpl/prog/en/css/datatables.css | 194 ++++++++++---------- > .../opac-tmpl/prog/en/includes/item-status.inc | 8 + > koha-tmpl/opac-tmpl/prog/en/js/datatables.js | 2 +- > .../prog/en/modules/opac-readingrecord.tt | 100 ++++++---- > misc/cronjobs/bulk_transferts.pl | 105 +++++++++++ > 18 files changed, 534 insertions(+), 217 deletions(-) > create mode 100644 misc/cronjobs/bulk_transferts.pl > >diff --git a/C4/Circulation.pm b/C4/Circulation.pm >index f8b204a..e84ef8b 100644 >--- a/C4/Circulation.pm >+++ b/C4/Circulation.pm >@@ -1178,9 +1178,12 @@ AddIssue does the following things : > =cut > > sub AddIssue { >- my ( $borrower, $barcode, $datedue, $cancelreserve, $issuedate, $sipmode) = @_; >+ my ( $borrower, $barcode, $datedue, $cancelreserve, $issuedate, $sipmode, $params ) = @_; >+ my $inhouse_use = $params->{inhouse_use}; > my $dbh = C4::Context->dbh; >- my $barcodecheck=CheckValidBarcode($barcode); >+ my $barcodecheck=CheckValidBarcode($barcode); >+ $inhouse_use = ( $inhouse_use ? 1 : 0 ); >+ > if ($datedue && ref $datedue ne 'DateTime') { > $datedue = dt_from_string($datedue); > } >@@ -1248,8 +1251,8 @@ sub AddIssue { > my $sth = > $dbh->prepare( > "INSERT INTO issues >- (borrowernumber, itemnumber,issuedate, date_due, branchcode) >- VALUES (?,?,?,?,?)" >+ (borrowernumber, itemnumber,issuedate, date_due, branchcode, inhouse_use) >+ VALUES (?,?,?,?,?,?)" > ); > unless ($datedue) { > my $itype = ( C4::Context->preference('item-level_itypes') ) ? $biblio->{'itype'} : $biblio->{'itemtype'}; >@@ -1257,12 +1260,14 @@ sub AddIssue { > > } > $datedue->truncate( to => 'minute'); >+ > $sth->execute( > $borrower->{'borrowernumber'}, # borrowernumber > $item->{'itemnumber'}, # itemnumber > $issuedate->strftime('%Y-%m-%d %H:%M:00'), # issuedate > $datedue->strftime('%Y-%m-%d %H:%M:00'), # date_due >- C4::Context->userenv->{'branch'} # branchcode >+ C4::Context->userenv->{'branch'}, # branchcode >+ $inhouse_use, > ); > if ( C4::Context->preference('ReturnToShelvingCart') ) { ## ReturnToShelvingCart is on, anything issued should be taken off the cart. > CartToShelf( $item->{'itemnumber'} ); >@@ -1303,7 +1308,8 @@ sub AddIssue { > # Record the fact that this book was issued. > &UpdateStats( > C4::Context->userenv->{'branch'}, >- 'issue', $charge, >+ ( $inhouse_use ? 'inhouse_use' : 'issue' ), >+ $charge, > ($sipmode ? "SIP-$sipmode" : ''), $item->{'itemnumber'}, > $item->{'itype'}, $borrower->{'borrowernumber'}, undef, $item->{'ccode'} > ); >diff --git a/C4/Items.pm b/C4/Items.pm >index 12dce85..05f56d0 100644 >--- a/C4/Items.pm >+++ b/C4/Items.pm >@@ -1271,6 +1271,10 @@ sub GetItemsInfo { > holding.branchurl, > holding.branchname, > holding.opac_info as branch_opac_info >+ "; >+ $query .= ", issues.inhouse_use" >+ if C4::Context->preference("In-House Use"); >+ $query .= " > FROM items > LEFT JOIN branches AS holding ON items.holdingbranch = holding.branchcode > LEFT JOIN branches AS home ON items.homebranch=home.branchcode >@@ -1278,6 +1282,8 @@ sub GetItemsInfo { > LEFT JOIN biblioitems ON biblioitems.biblioitemnumber = items.biblioitemnumber > LEFT JOIN itemtypes ON itemtypes.itemtype = " > . (C4::Context->preference('item-level_itypes') ? 'items.itype' : 'biblioitems.itemtype'); >+ $query .= " LEFT JOIN issues ON issues.itemnumber = items.itemnumber" >+ if C4::Context->preference("In-House Use"); > $query .= " WHERE items.biblionumber = ? ORDER BY home.branchname, items.enumchron, LPAD( items.copynumber, 8, '0' ), items.dateaccessioned DESC" ; > my $sth = $dbh->prepare($query); > $sth->execute($biblionumber); >diff --git a/circ/circulation.pl b/circ/circulation.pl >index 8af776f..3049b49 100755 >--- a/circ/circulation.pl >+++ b/circ/circulation.pl >@@ -25,6 +25,8 @@ > use strict; > use warnings; > use CGI; >+use DateTime; >+use DateTime::Duration; > use C4::Output; > use C4::Print; > use C4::Auth qw/:DEFAULT get_session/; >@@ -322,13 +324,15 @@ if ($barcode) { > } > } > >- delete $question->{'DEBT'} if ($debt_confirmed); >- foreach my $impossible ( keys %$error ) { >- $template->param( >- $impossible => $$error{$impossible}, >- IMPOSSIBLE => 1 >- ); >- $blocker = 1; >+ unless( $query->param('inhouse_use') and C4::Context->preference("In-House Use Force") ) { >+ delete $question->{'DEBT'} if ($debt_confirmed); >+ foreach my $impossible ( keys %$error ) { >+ $template->param( >+ $impossible => $$error{$impossible}, >+ IMPOSSIBLE => 1 >+ ); >+ $blocker = 1; >+ } > } > if( !$blocker ){ > my $confirm_required = 0; >@@ -344,13 +348,15 @@ if ($barcode) { > $needsconfirmation => $$question{$needsconfirmation}, > getTitleMessageIteminfo => $getmessageiteminfo->{'title'}, > getBarcodeMessageIteminfo => $getmessageiteminfo->{'barcode'}, >- NEEDSCONFIRMATION => 1 >+ NEEDSCONFIRMATION => 1, >+ inhouse_use => $query->param('inhouse_use'), > ); > $confirm_required = 1; > } > } > unless($confirm_required) { >- AddIssue( $borrower, $barcode, $datedue, $cancelreserve ); >+ my $inhouse_use = $query->param('inhouse_use'); >+ AddIssue( $borrower, $barcode, $datedue, $cancelreserve, undef, undef, { inhouse_use => $inhouse_use } ); > $inprocess = 1; > } > } >@@ -781,6 +787,9 @@ $template->param( > export_with_csv_profile => C4::Context->preference("ExportWithCsvProfile"), > canned_bor_notes_loop => $canned_notes, > debarments => GetDebarments({ borrowernumber => $borrowernumber }), >+ todaysdate => dt_from_string()->set(hour => 23)->set(minute => 59), >+ inhouse_use_feature => C4::Context->preference("In-House Use"), >+ inhouse_use_forced => C4::Context->preference("In-House Use Force"), > ); > > output_html_with_http_headers $query, $cookie, $template->output; >diff --git a/installer/data/mysql/kohastructure.sql b/installer/data/mysql/kohastructure.sql >index 6618d58..01fb588 100644 >--- a/installer/data/mysql/kohastructure.sql >+++ b/installer/data/mysql/kohastructure.sql >@@ -1122,6 +1122,7 @@ CREATE TABLE `issues` ( -- information related to check outs or issues > `renewals` tinyint(4) default NULL, -- lists the number of times the item was renewed > `timestamp` timestamp NOT NULL default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP, -- the date and time this record was last touched > `issuedate` datetime default NULL, -- date the item was checked out or issued >+ `inhouse_use` int(1) NOT NULL default 0, -- in house use flag > KEY `issuesborridx` (`borrowernumber`), > KEY `itemnumber_idx` (`itemnumber`), > KEY `branchcode_idx` (`branchcode`), >@@ -1587,6 +1588,7 @@ CREATE TABLE `old_issues` ( -- lists items that were checked out and have been r > `renewals` tinyint(4) default NULL, -- lists the number of times the item was renewed > `timestamp` timestamp NOT NULL default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP, -- the date and time this record was last touched > `issuedate` datetime default NULL, -- date the item was checked out or issued >+ `inhouse_use` int(1) NOT NULL default 0, -- in house use flag > KEY `old_issuesborridx` (`borrowernumber`), > KEY `old_issuesitemidx` (`itemnumber`), > KEY `branchcode_idx` (`branchcode`), >diff --git a/installer/data/mysql/sysprefs.sql b/installer/data/mysql/sysprefs.sql >index 66c2017..6982328 100644 >--- a/installer/data/mysql/sysprefs.sql >+++ b/installer/data/mysql/sysprefs.sql >@@ -137,6 +137,8 @@ INSERT INTO systempreferences ( `variable`, `value`, `options`, `explanation`, ` > ('ImageLimit','5','','Limit images stored in the database by the Patron Card image manager to this number.','Integer'), > ('IncludeSeeFromInSearches','0','','Include see-from references in searches.','YesNo'), > ('IndependentBranches','0',NULL,'If ON, increases security between libraries','YesNo'), >+('In-House use','0','','Enable/Disable the in-house use feature','YesNo'), >+('In-House use Force','0','','Enable/Disable the in-house for all cases (Even if a user is debarred, etc.)','YesNo'), > ('InProcessingToShelvingCart','0','','If set, when any item with a location code of PROC is \'checked in\', it\'s location code will be changed to CART.','YesNo'), > ('INTRAdidyoumean',NULL,NULL,'Did you mean? configuration for the Intranet. Do not change, as this is controlled by /cgi-bin/koha/admin/didyoumean.pl.','Free'), > ('IntranetBiblioDefaultView','normal','normal|marc|isbd|labeled_marc','Choose the default detail view in the staff interface; choose between normal, labeled_marc, marc or isbd','Choice'), >diff --git a/installer/data/mysql/updatedatabase.pl b/installer/data/mysql/updatedatabase.pl >index 0768a88..bdb46be 100755 >--- a/installer/data/mysql/updatedatabase.pl >+++ b/installer/data/mysql/updatedatabase.pl >@@ -8037,6 +8037,34 @@ if(CheckVersion($DBversion)) { > SetVersion($DBversion); > } > >+ >+ >+ >+ >+ >+ >+$DBversion = "3.15.00.XXX"; >+if ( C4::Context->preference("Version") < TransformToNum($DBversion) ) { >+ $dbh->do(q{ >+ INSERT IGNORE INTO systempreferences >+ (variable,value,explanation,options,type) >+ VALUES('In-House use','0','Enable/Disable the in-house use feature','','YesNo'); >+ }); >+ $dbh->do(q{ >+ INSERT IGNORE INTO systempreferences >+ (variable,value,explanation,options,type) >+ VALUES('In-House use Force','0','Enable/Disable the in-house for all cases (Even if a user is debarred, etc.)','','YesNo'); >+ }); >+ $dbh->do(q{ >+ ALTER TABLE issues ADD COLUMN inhouse_use INT(1) NOT NULL DEFAULT 0 AFTER issuedate; >+ }); >+ $dbh->do(q{ >+ ALTER TABLE old_issues ADD COLUMN inhouse_use INT(1) NOT NULL DEFAULT 0 AFTER issuedate; >+ }); >+ print "Upgrade to $DBversion done (Bug 10860: Add new system preference In-House use + fields [old_]issues.inhouse_use)\n"; >+ SetVersion($DBversion); >+} >+ > =head1 FUNCTIONS > > =head2 TableExists($table) >diff --git a/koha-tmpl/intranet-tmpl/prog/en/css/staff-global.css b/koha-tmpl/intranet-tmpl/prog/en/css/staff-global.css >index 685ebef..1e8764b 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/css/staff-global.css >+++ b/koha-tmpl/intranet-tmpl/prog/en/css/staff-global.css >@@ -972,6 +972,17 @@ tr.highlight th[scope=row] { > padding : 1px; > } > >+.inhouse_use-select { >+ font-size : 85%; >+ font-weight: normal; >+ padding-top : .3em; >+} >+#circ_circulation_issue .inhouse_use-select label, >+.inhouse_use-select label { >+ font-size : inherit; >+ font-weight: normal; >+} >+ > tr.expired td { > color : #999999; > } >@@ -2725,3 +2736,7 @@ span.browse-button { > font-size:0.8em; > padding:0.5em; > } >+ >+span.inhouse_use { >+ color: red; >+} >diff --git a/koha-tmpl/intranet-tmpl/prog/en/js/datatables.js b/koha-tmpl/intranet-tmpl/prog/en/js/datatables.js >index aa2dcca..1e610f1 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/js/datatables.js >+++ b/koha-tmpl/intranet-tmpl/prog/en/js/datatables.js >@@ -175,9 +175,13 @@ function dt_add_type_uk_date() { > > jQuery.fn.dataTableExt.oSort['uk_date-asc'] = function(a,b) { > var re = /(\d{2}\/\d{2}\/\d{4})/; >- a.match(re); >+ if ( !a.match(re) ) { >+ return 1; >+ } > var ukDatea = RegExp.$1.split("/"); >- b.match(re); >+ if ( !b.match(re) ) { >+ return -1; >+ } > var ukDateb = RegExp.$1.split("/"); > > var x = (ukDatea[2] + ukDatea[1] + ukDatea[0]) * 1; >@@ -188,9 +192,13 @@ function dt_add_type_uk_date() { > > jQuery.fn.dataTableExt.oSort['uk_date-desc'] = function(a,b) { > var re = /(\d{2}\/\d{2}\/\d{4})/; >- a.match(re); >+ if ( !a.match(re) ) { >+ return -1; >+ } > var ukDatea = RegExp.$1.split("/"); >- b.match(re); >+ if ( !b.match(re) ) { >+ return 1 >+ } > var ukDateb = RegExp.$1.split("/"); > > var x = (ukDatea[2] + ukDatea[1] + ukDatea[0]) * 1; >diff --git a/koha-tmpl/intranet-tmpl/prog/en/js/pages/circulation.js b/koha-tmpl/intranet-tmpl/prog/en/js/pages/circulation.js >index fe307bf..a562637 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/js/pages/circulation.js >+++ b/koha-tmpl/intranet-tmpl/prog/en/js/pages/circulation.js >@@ -84,6 +84,11 @@ $(document).ready(function() { > }); > } > }); >+ >+ toggle_inhouse_use(); >+ $("#inhouse_use").click(function(){ >+ toggle_inhouse_use(); >+ }); > }); > > function export_checkouts(format) { >@@ -113,7 +118,6 @@ function export_checkouts(format) { > > /* Reset form action to its initial value */ > document.issues.action="/cgi-bin/koha/reserve/renewscript.pl"; >- > } > > function validate1(date) { >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/circulation.pref b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/circulation.pref >index 70ac352..0e502bb 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/circulation.pref >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/circulation.pref >@@ -351,6 +351,18 @@ Circulation: > no: "Don't" > - calculate and update overdue charges when an item is returned. > - <br /><b>NOTE If you are doing hourly loans then you should have this on.</b> >+ - >+ - pref: In-House use >+ choices: >+ yes: Enable >+ no: Disable >+ - the in-house use feature. >+ - >+ - pref: In-House use Force >+ choices: >+ yes: Enable >+ no: Disable >+ - the in-house for all cases (Even if a user is debarred, etc.). > Holds Policy: > - > - pref: AllowHoldPolicyOverride >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt >index 1e1fcd2..69fd3bf 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt >@@ -566,9 +566,17 @@ function verify_images() { > <td class="status"> > > [% IF ( item.datedue ) %] >+ [% IF inhouse_use %] >+ <span>Currently in local use >+ [% ELSE %] > <span class="datedue">Checked out >+ [% END %] > [% UNLESS ( item.NOTSAMEBRANCH ) %] >+ [% IF inhouse_use %] >+ by <a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% item.borrowernumber %]"> >+ [% ELSE %] > to <a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% item.borrowernumber %]"> >+ [% END %] > [% IF ( item.hidepatronname ) %] > [% item.cardnumber %] > [% ELSE %] >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tt >index e667bc3..b5b795c 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tt >@@ -94,7 +94,23 @@ var MSG_EXPORT_SELECT_CHECKOUTS = _("You must select checkout(s) to export"); > } ).attr( 'checked', false ); > [% END %] > [% END %] >+ > }); >+ >+// In-house use >+function toggle_inhouse_use(){ >+ if ( $("#inhouse_use").attr('checked') ) { >+ $("#duedatespec").val("[% todaysdate | $KohaDates with_hours => 1%]") >+ $("#duedatespec").datetimepicker('destroy'); >+ } else { >+ $("#duedatespec").datetimepicker({ >+ onClose: function(dateText, inst) { $("#barcode").focus(); }, >+ hour: 23, >+ minute: 59 >+ }); >+ } >+} >+ > //]]> > </script> > </head> >@@ -318,6 +334,7 @@ var MSG_EXPORT_SELECT_CHECKOUTS = _("You must select checkout(s) to export"); > [% ELSE %] > <input type="submit" class="approve" value="Yes, Check Out (Y)" accesskey="y" /> > [% END %] >+ <input type="hidden" name="inhouse_use" value="[% inhouse_use %]" /> > </form> > [% END %] > >@@ -492,7 +509,7 @@ No patron matched <span class="ex">[% message %]</span> > > [% IF ( borrowernumber ) %] > <div class="yui-g"> >-[% UNLESS ( noissues ) %] >+[% IF !noissues || inhouse_use_forced %] > [% IF ( flagged ) %] > <div class="yui-u first"> > [% ELSE %] >@@ -529,7 +546,20 @@ No patron matched <span class="ex">[% message %]</span> > <input type="checkbox" id="stickyduedate" onclick="this.form.barcode.focus();" name="stickyduedate" /> > [% END %] > <input type="button" class="action" id="cleardate" value="Clear" name="cleardate" onclick="this.checked = false; this.form.duedatespec.value = ''; this.form.stickyduedate.checked = false; this.form.barcode.focus(); return false;" /> >-</div>[% END %] >+</div> >+[% END %] >+ >+ [% IF inhouse_use_feature %] >+ <div class="inhouse_use-select"> >+ [% IF noissues %] >+ <input type="checkbox" id="inhouse_use" name="inhouse_use_forced" checked="checked" disabled="disabled" /> <label for="inhouse_use">In-house use</label> >+ <input type="hidden" name="inhouse_use" checked="checked" value="1" /> >+ [% ELSE %] >+ <input type="checkbox" id="inhouse_use" name="inhouse_use" /> <label for="inhouse_use">In-house use</label> >+ [% END %] >+ </div> >+ [% END %] >+ > <input type="hidden" name="borrowernumber" id="borrowernumber" value="[% borrowernumber %]" /> > <input type="hidden" name="branch" value="[% branch %]" /> > <input type="hidden" name="printer" value="[% printer %]" /> >@@ -544,17 +574,24 @@ No patron matched <span class="ex">[% message %]</span> > > [% IF ( noissues ) %]<div>[% ELSE %]<div class="yui-u">[% END %] > >- [% IF ( flagged ) %] >- [% IF ( noissues ) %] >- <h4>Checking out to [% INCLUDE 'patron-title.inc' %]</h4> >- <div id="circmessages" class="circmessage warning"> >- [% ELSE %] >+ [% IF flagged %] >+ [% IF NOT noissues || ( noissues && inhouse_use_forced ) %] > <div id="circmessages" class="circmessage attention"> >- [% END %] >+ [% ELSE %] >+ <h4>Checking out to [% INCLUDE 'patron-title.inc' %]</h4> >+ <div id="circmessages" class="circmessage warning"> >+ [% END %] >+ <h3> >+ [% IF noissues %] >+ Cannot check out! >+ [% IF inhouse_use_forced %] >+ <span style="color:red;">Only in-house use is allowed</span> >+ [% END %] >+ [% ELSE %] >+ Attention: >+ [% END %] >+ </h3> > >- <h3>[% IF ( noissues ) %] >- Cannot check out! >- [% ELSE %]Attention:[% END %]</h3> > <ul> > > [% IF ( warndeparture ) %] >@@ -748,7 +785,12 @@ No patron matched <span class="ex">[% message %]</span> > <span class="dmg">[% AuthorisedValues.GetByCode( 'DAMAGED', todayissue.damaged ) %]</span> > [% END %] > </td> >- <td><a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=[% todayissue.biblionumber %]&type=intra"><strong>[% todayissue.title |html %][% FOREACH subtitl IN todayissue.subtitle %] [% subtitl.subfield %][% END %]</strong></a>[% IF ( todayissue.author ) %], by [% todayissue.author %][% END %][% IF ( todayissue.itemnotes ) %]- <span class="circ-hlt">[% todayissue.itemnotes %]</span>[% END %] <a href="/cgi-bin/koha/catalogue/moredetail.pl?biblionumber=[% todayissue.biblionumber %]&itemnumber=[% todayissue.itemnumber %]#item[% todayissue.itemnumber %]">[% todayissue.barcode %]</a></td> >+ <td> >+ <a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=[% todayissue.biblionumber %]&type=intra"><strong>[% todayissue.title |html %][% FOREACH subtitl IN todayissue.subtitle %] [% subtitl.subfield %][% END %]</strong></a>[% IF ( todayissue.author ) %], by [% todayissue.author %][% END %][% IF ( todayissue.itemnotes ) %]- <span class="circ-hlt">[% todayissue.itemnotes %]</span>[% END %] <a href="/cgi-bin/koha/catalogue/moredetail.pl?biblionumber=[% todayissue.biblionumber %]&itemnumber=[% todayissue.itemnumber %]#item[% todayissue.itemnumber %]">[% todayissue.barcode %]</a> >+ [% IF todayissue.inhouse_use %] >+ <span class="inhouse_use">(In-house use)</span> >+ [% END %] >+ </td> > <td>[% UNLESS ( noItemTypeImages ) %] [% IF ( todayissue.itemtype_image ) %]<img src="[% todayissue.itemtype_image %]" alt="" />[% END %][% END %][% todayissue.itemtype %]</td> > <td><span title="[% todayissue.displaydate_sort %]">[% todayissue.checkoutdate %]</span></td> > [% IF ( todayissue.multiple_borrowers ) %]<td>[% todayissue.firstname %] [% todayissue.surname %]</td>[% END %] >@@ -841,7 +883,12 @@ No patron matched <span class="ex">[% message %]</span> > <span class="dmg">[% AuthorisedValues.GetByCode( 'DAMAGED', previssue.damaged ) %]</span> > [% END %] > </td> >- <td><a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=[% previssue.biblionumber %]&type=intra"><strong>[% previssue.title |html %][% FOREACH subtitl IN previssue.subtitle %] [% subtitl.subfield %][% END %]</strong></a>[% IF ( previssue.author ) %], by [% previssue.author %][% END %] [% IF ( previssue.itemnotes ) %]- [% previssue.itemnotes %][% END %] <a href="/cgi-bin/koha/catalogue/moredetail.pl?biblionumber=[% previssue.biblionumber %]&itemnumber=[% previssue.itemnumber %]#item[% previssue.itemnumber %]">[% previssue.barcode %]</a></td> >+ <td> >+ <a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=[% previssue.biblionumber %]&type=intra"><strong>[% previssue.title |html %][% FOREACH subtitl IN previssue.subtitle %] [% subtitl.subfield %][% END %]</strong></a>[% IF ( previssue.author ) %], by [% previssue.author %][% END %] [% IF ( previssue.itemnotes ) %]- [% previssue.itemnotes %][% END %] <a href="/cgi-bin/koha/catalogue/moredetail.pl?biblionumber=[% previssue.biblionumber %]&itemnumber=[% previssue.itemnumber %]#item[% previssue.itemnumber %]">[% previssue.barcode %]</a></td> >+ [% IF previssue.inhouse_use %] >+ <span class="inhouse_use">(In-house use)</span> >+ [% END %] >+ </td> > <td> > [% previssue.itemtype %] > </td> >@@ -988,7 +1035,12 @@ No patron matched <span class="ex">[% message %]</span> > <span class="dmg">[% AuthorisedValues.GetByCode( 'DAMAGED', relissue.damaged ) %]</span> > [% END %] > </td> >- <td><a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=[% relissue.biblionumber %]&type=intra"><strong>[% relissue.title |html %][% FOREACH subtitl IN relissue.subtitle %] [% subtitl.subfield %][% END %]</strong></a>[% IF ( relissue.author ) %], by [% relissue.author %][% END %][% IF ( relissue.itemnotes ) %]- <span class="circ-hlt">[% relissue.itemnotes %]</span>[% END %] <a href="/cgi-bin/koha/catalogue/moredetail.pl?biblionumber=[% relissue.biblionumber %]&itemnumber=[% relissue.itemnumber %]#item[% relissue.itemnumber %]">[% relissue.barcode %]</a></td> >+ <td> >+ <a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=[% relissue.biblionumber %]&type=intra"><strong>[% relissue.title |html %][% FOREACH subtitl IN relissue.subtitle %] [% subtitl.subfield %][% END %]</strong></a>[% IF ( relissue.author ) %], by [% relissue.author %][% END %][% IF ( relissue.itemnotes ) %]- <span class="circ-hlt">[% relissue.itemnotes %]</span>[% END %] <a href="/cgi-bin/koha/catalogue/moredetail.pl?biblionumber=[% relissue.biblionumber %]&itemnumber=[% relissue.itemnumber %]#item[% relissue.itemnumber %]">[% relissue.barcode %]</a></td> >+ [% IF relissue.inhouse_use %] >+ <span class="inhouse_use">(In-house use)</span> >+ [% END %] >+ </td> > <td>[% UNLESS ( noItemTypeImages ) %] [% IF ( relissue.itemtype_image ) %]<img src="[% relissue.itemtype_image %]" alt="" />[% END %][% END %][% relissue.itemtype %]</td> > <td><span title="[% relissue.displaydate_sort %]">[% relissue.displaydate %]</span></td> > <td>[% relissue.issuingbranchname %]</td> >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/members/readingrec.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/members/readingrec.tt >index 29fe1af..81f0c23 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/members/readingrec.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/members/readingrec.tt >@@ -8,14 +8,15 @@ > //<![CDATA[ > > $(document).ready(function() { >- [% IF (dateformat == 'metric') %] >+ [% IF dateformat == 'metric' %] > dt_add_type_uk_date(); > [% END %] >- $("#table_readingrec").dataTable($.extend(true, {}, dataTablesDefaults, { >+ var table = $("#table_readingrec").dataTable($.extend(true, {}, dataTablesDefaults, { > "sPaginationType": "four_button", > "aaSorting": [], > "aoColumns": [ > null, >+ null, > { "sType": "anti-the" }, > null, > null, >@@ -27,6 +28,18 @@ > { "sType": "title-string" } > ] > })); >+ 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_inhouse_use" ) { >+ table.fnFilter("inhouse_use", 0); >+ } else { // all >+ table.fnFilter('', 0); >+ } >+ } >+ }); > }); > //]]> > </script> >@@ -53,57 +66,76 @@ > <form action="/cgi-bin/koha/members/readingrec.pl" method="get"><input type="hidden" name="borrowernumber" id="borrowernumber" value="[% borrowernumber %]" /></form> > > >-<table id="table_readingrec"> >-<thead> >- <th>Date</th> >- <th>Title</th> >- <th>Author</th> >- <th>Call no.</th> >- <th>Barcode</th> >- <th>Number of renewals</th> >- <th>Checked out on</th> >- <th>Checked out from</th> >- <th>Date due</th> >- <th>Return date</th> >-</thead> >-[% FOREACH issue IN loop_reading %] >- [% IF issue.returndate %]<tr>[% ELSE %]<tr class="onissue">[% END %] >- <td> >- [% issue.issuestimestamp | $KohaDates %] >- </td> >- <td><a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=[% issue.biblionumber %]">[% issue.title |html %]</a></td> >+<div id="tabs" class="toptabs"> >+ <ul> >+ <li><a href="#readingrec" id="tab_all">All</a></li> >+ <li><a href="#readingrec" id="tab_checkout">Checkouts</a></li> >+ <li><a href="#readingrec" id="tab_inhouse_use">In-house use</a></li> >+ </ul> >+ <div id="readingrec" style="overflow:hidden"> >+ <table id="table_readingrec"> >+ <thead> >+ <th style="display:none;">Type</th> >+ <th>Date</th> >+ <th>Title</th> >+ <th>Author</th> >+ <th>Call no.</th> >+ <th>Barcode</th> >+ <th>Number of renewals</th> >+ <th>Checked out on</th> >+ <th>Checked out from</th> >+ <th>Date due</th> >+ <th>Return date</th> >+ </thead> >+ <tbody> >+ [% FOREACH issue IN loop_reading %] >+ [% IF issue.returndate %]<tr>[% ELSE %]<tr class="onissue">[% END %] >+ <td style="display:none;"> >+ [% IF issue.inhouse_use %] >+ inhouse_use >+ [% ELSE %] >+ checkout >+ [% END %] >+ </td> >+ <td> >+ <span title="[% issue.issuestimestamp %]">[% issue.issuestimestamp | $KohaDates %]</span> >+ </td> >+ <td><a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=[% issue.biblionumber %]">[% issue.title |html %]</a></td> > >- <td>[% issue.author %]</td> >+ <td>[% issue.author %]</td> > >- <td> >+ <td> > [% IF issue.classification %] > [% issue.classification %] > [% ELSE %] > [% issue.itemcallnumber %] > [% END %] >- </td> >+ </td> > >- <td>[% issue.barcode %]</td> >- >- <td> >- [% issue.renewals %]</td> >- <td> >- [% issue.issuedate | $KohaDates %]</td> >- <td> >- [% issue.issuingbranch %]</td> >- <td>[% IF issue.date_due %] >- [% issue.date_due | $KohaDates %] >- [% ELSE %] [% END %]</td> >- <td> >- [% IF issue.returndate %] >- <span title="[% issue.returndate %]">[% issue.returndate | $KohaDates %]</span> >- [% ELSE %] >- <span title="Checked Out"><small>Checked Out</small></span> >- [% END %] >- </td> >-</tr> >-[% END %] >-</table> >+ <td>[% issue.barcode %]</td> >+ <td>[% issue.renewals %]</td> >+ <td>[% issue.issuedate | $KohaDates %]</td> >+ <td>[% issue.issuingbranch %]</td> >+ <td> >+ [% IF issue.date_due %] >+ [% issue.date_due | $KohaDates %] >+ [% ELSE %] [% END %] >+ </td> >+ <td> >+ [% IF issue.returndate %] >+ <span title="[% issue.returndate %]">[% issue.returndate | $KohaDates %]</span> >+ [% ELSE %] >+ <span title="Checked Out"><small>Checked Out</small></span> >+ [% END %] >+ </td> >+ </tr> >+ [% END %] >+ </tbody> >+ </table> >+ </div> >+</div> >+[% ELSE %] >+<div class="dialog message">This patron has no circulation history.</div> > [% END %] > </div> > </div> >diff --git a/koha-tmpl/opac-tmpl/prog/en/css/datatables.css b/koha-tmpl/opac-tmpl/prog/en/css/datatables.css >index e7b11bd..5669543 100644 >--- a/koha-tmpl/opac-tmpl/prog/en/css/datatables.css >+++ b/koha-tmpl/opac-tmpl/prog/en/css/datatables.css >@@ -3,23 +3,23 @@ input.search_init { > } > .sorting_asc { > padding-right: 19px; >- background: url("../../img/asc.gif") no-repeat scroll right center #EEEEEE; >+ background: url("../../images/asc.gif") no-repeat scroll right center #EEEEEE; > } > .sorting_desc { > padding-right: 19px; >- background: url("../../img/desc.gif") no-repeat scroll right center #EEEEEE; >+ background: url("../../images/desc.gif") no-repeat scroll right center #EEEEEE; > } > .sorting { > padding-right: 19px; >- background: url("../../img/ascdesc.gif") no-repeat scroll right center #EEEEEE; >+ background: url("../../images/ascdesc.gif") no-repeat scroll right center #EEEEEE; > } > .sorting_asc_disabled { > padding-right: 19px; >- background: url("../../img/datatables/sort_asc_disabled.png") no-repeat scroll right center #EEEEEE; >+ background: url("../../images/datatables/sort_asc_disabled.png") no-repeat scroll right center #EEEEEE; > } > .sorting_desc_disabled { > padding-right: 19px; >- background: url("../../img/datatables/sort_desc_disabled.png") no-repeat scroll right center #EEEEEE; >+ background: url("../../images/datatables/sort_desc_disabled.png") no-repeat scroll right center #EEEEEE; > } > .sorting_disabled { > padding-right: 19px; >@@ -64,12 +64,11 @@ div.dataTables_filter { > } > div.dataTables_paginate { > background-color : #F4F4F4; >- font-size: 110%; > padding : 0; > } > >-.paging_full_numbers span.paginate_button, >-.paging_full_numbers span.paginate_active { >+.paging_full_numbers a.paginate_button, >+.paging_full_numbers a.paginate_active { > border-right : 1px solid #AAA; > border-left : 1px solid #FFF; > display : block; >@@ -79,48 +78,48 @@ div.dataTables_paginate { > cursor: pointer; > } > >-.paging_full_numbers span.paginate_button { >+.paging_full_numbers a.paginate_button { > color : #0000CC; > } >-.paging_full_numbers span.paginate_button.first { >- background-image : url('../../img/first.png'); >+.paging_full_numbers a.paginate_button.first { >+ background-image : url('../../images/first.png'); > background-repeat: no-repeat; >- background-position : 2px center; >+ background-position : 1% center; > padding-left : 2em; > } >-.paging_full_numbers span.paginate_button.previous { >- background-image : url('../../img/prev.png'); >+.paging_full_numbers a.paginate_button.previous { >+ background-image : url('../../images/prev.png'); > background-repeat: no-repeat; >- background-position : 2px center; >+ background-position : 1% center; > padding-left : 2em; > } >-.paging_full_numbers span.paginate_button.next { >- background-image : url('../../img/next.png'); >+.paging_full_numbers a.paginate_button.next { >+ background-image : url('../../images/next.png'); > background-repeat: no-repeat; >- background-position : right center; >+ background-position : 96% center; > padding-right : 2em; > } >-.paging_full_numbers span.paginate_button.last { >- background-image : url('../../img/last.png'); >+.paging_full_numbers a.paginate_button.last { >+ background-image : url('../../images/last.png'); > background-repeat: no-repeat; >- background-position : right center; >+ background-position : 96% center; > border-right : 1px solid #686868; > padding-right : 2em; > } >-div.bottom.pager .paging_full_numbers span.paginate_button.last { >+div.bottom.pager .paging_full_numbers a.paginate_button.last { > border-right-width : 0; > } >-.paging_full_numbers span.paginate_active { >+.paging_full_numbers a.paginate_active { > background-color : #FFFFEA; > color : #000; > font-weight: bold; > } > >-.paging_full_numbers span.paginate_button:hover { >+.paging_full_numbers a.paginate_button:hover { > background-color: #FFC; > } > >-.paging_full_numbers span.paginate_button.paginate_button_disabled { >+.paging_full_numbers a.paginate_button.paginate_button_disabled { > color : #666; > } > >@@ -131,7 +130,7 @@ div.dataTables_paginate.paging_four_button { > background-color : transparent; > border-right : 1px solid #686868; > border-left : 1px solid #FFF; >- line-height : 1.8em; >+ line-height : 2.5em; > } > .paginate_disabled_first, > .paginate_enabled_first, >@@ -141,55 +140,67 @@ div.dataTables_paginate.paging_four_button { > .paginate_enabled_next, > .paginate_disabled_last, > .paginate_enabled_last { >- float: left; >- height: 16px; >- margin: .5em; >- width: 16px; >+ cursor: pointer; >+ *cursor: hand; >+ padding: .1em 0; >+} >+ >+.paginate_disabled_previous, >+.paginate_enabled_previous, >+.paginate_disabled_next, >+.paginate_enabled_next { >+ color: #111 !important; >+} >+ >+.paginate_disabled_previous, >+.paginate_enabled_previous { >+ padding-left: 23px; > } >+.paginate_disabled_next, >+.paginate_enabled_next, >+.paginate_disabled_last, >+.paginate_enabled_last { >+ padding-right: 23px; >+ margin-left: 10px; >+ margin-right : .3em; >+} >+ >+.paging_four_button .paginate_disabled_first, >+.paging_four_button .paginate_disabled_previous, >+.paging_four_button .paginate_enabled_first, >+.paging_four_button .paginate_enabled_previous { >+ margin-left : .3em; >+} >+ > .paginate_disabled_first { >- background-image: url("../../img/first-disabled.png"); >+ background: transparent url("../../images/first-disabled.png") no-repeat 3px top; > } > .paginate_enabled_first { >- background-image: url("../../img/first.png"); >+ background: transparent url("../../images/first.png") no-repeat 3px top; > cursor: pointer; > } > .paginate_disabled_previous { >- background-image: url("../../img/prev-disabled.png"); >+ background: transparent url("../../images/prev-disabled.png") no-repeat 3px top; > } > .paginate_enabled_previous { >- background-image: url("../../img/prev.png"); >+ background: transparent url("../../images/prev.png") no-repeat 3px top; > cursor: pointer; > } > .paginate_disabled_next { >- background-image: url("../../img/next-disabled.png"); >+ background: transparent url("../../images/next-disabled.png") no-repeat right top; > } > .paginate_enabled_next { >- background-image: url("../../img/next.png"); >+ background: transparent url("../../images/next.png") no-repeat right top; > cursor: pointer; > } > .paginate_disabled_last { >- background-image: url("../../img/last-disabled.png"); >+ background: transparent url("../../images/last-disabled.png") no-repeat right top; > } > .paginate_enabled_last { >- background-image: url("../../img/last.png"); >+ background: transparent url("../../images/last.png") no-repeat right top; > cursor: pointer; > } > >- >-/* >-table.display { >- width: 100%; >-} >-table.display thead th { >- border-bottom: 1px solid black; >- cursor: pointer; >- font-weight: bold; >- padding: 3px 18px 3px 10px; >-} >-.dataTables_wrapper { >- clear: both; >- position: relative; >-} > .dataTables_processing { > background-color: white; > border: 1px solid #DDDDDD; >@@ -205,61 +216,44 @@ table.display thead th { > top: 50%; > width: 250px; > } >-.dataTables_info { >- float: left; >- width: 60%; >-} >-.dataTables_paginate { >- float: right; >- text-align: right; >- width: 44px; >-} >-.paging_full_numbers { >- height: 22px; >- line-height: 22px; >- width: 400px; >-} >-.paging_full_numbers span.paginate_button, >- .paging_full_numbers span.paginate_active { >- border: 1px solid #aaa; >- -webkit-border-radius: 5px; >- -moz-border-radius: 5px; >- padding: 2px 5px; >- margin: 0 3px; >- cursor: pointer; >- *cursor: hand; >-} > >-.paging_full_numbers span.paginate_button { >- background-color: #ddd; >+tr.odd.selected td { >+ background-color: #D3D3D3; > } > >-.paging_full_numbers span.paginate_button:hover { >- background-color: #ccc; >+tr.even.selected td { >+ background-color: #D3D3D3; > } > >-.paging_full_numbers span.paginate_active { >- background-color: #99B3FF; >-} >-.paginate_disabled_previous, .paginate_enabled_previous, .paginate_disabled_next, .paginate_enabled_next { >- float: left; >- height: 19px; >- margin-left: 3px; >- width: 19px; >+/* ColumnFilter */ >+span.filter_column > input.text_filter { >+ font-size: 80%; >+ width: 100%; > } >-.paginate_disabled_previous { >- background-image: url("../../img/datatables/back_disabled.jpg"); >+ >+div.pager { >+ background-color : #E8E8E8; >+ border : 1px solid #BCBCBC; >+ -moz-border-radius : 5px; >+ border-radius : 5px; >+ display : inline-block; >+ font-size : 85%; >+ padding : .3em .5em .3em .5em; >+ margin : .4em 0; > } >-.paginate_enabled_previous { >- background-image: url("../../img/datatables/back_enabled.jpg"); >+div.pager img { >+ vertical-align : middle; > } >-.paginate_disabled_next { >- background-image: url("../../img/datatables/forward_disabled.jpg"); >+ >+div.pager img.last { >+ padding-right: 5px; > } >-.paginate_enabled_next { >- background-image: url("../../img/datatables/forward_enabled.jpg"); >+div.pager input.pagedisplay { >+ border : 0; >+ background-color : transparent; >+ font-weight: bold; >+ text-align : center; > } >-.spacer { >- clear: both; >- height: 20px; >+div.pager p { >+ margin: 0; > } >diff --git a/koha-tmpl/opac-tmpl/prog/en/includes/item-status.inc b/koha-tmpl/opac-tmpl/prog/en/includes/item-status.inc >index 21bde2c..852a7bc 100644 >--- a/koha-tmpl/opac-tmpl/prog/en/includes/item-status.inc >+++ b/koha-tmpl/opac-tmpl/prog/en/includes/item-status.inc >@@ -19,11 +19,19 @@ not use an API to fetch items that populates item.datedue. > [% END %] > [% END %] > [% ELSIF ( item.datedue || issue.date_due ) %] >+ [% IF inhouse_use %] >+ [% IF ( OPACShowCheckoutName ) %] >+ Currently in local use by [% item.cardnumber %] [% item.firstname %] [% item.surname %] >+ [% ELSE %] >+ Currently in local use >+ [% END %] >+ [% ELSE %] > [% IF ( OPACShowCheckoutName ) %] > Checked out to [% item.cardnumber %] [% item.firstname %] [% item.surname %] > [% ELSE %] > Checked out > [% END %] >+ [% END %] > [% ELSIF ( item.transfertwhen ) %] > In transit from [% item.transfertfrom %] > to [% item.transfertto %] since [% item.transfertwhen %] >diff --git a/koha-tmpl/opac-tmpl/prog/en/js/datatables.js b/koha-tmpl/opac-tmpl/prog/en/js/datatables.js >index 3c4ffdf..5f0892d 100644 >--- a/koha-tmpl/opac-tmpl/prog/en/js/datatables.js >+++ b/koha-tmpl/opac-tmpl/prog/en/js/datatables.js >@@ -97,4 +97,4 @@ jQuery.extend( jQuery.fn.dataTableExt.oSort, { > } > }); > >-}()); >\ No newline at end of file >+}()); >diff --git a/koha-tmpl/opac-tmpl/prog/en/modules/opac-readingrecord.tt b/koha-tmpl/opac-tmpl/prog/en/modules/opac-readingrecord.tt >index 7ee7e12..c0b7476 100644 >--- a/koha-tmpl/opac-tmpl/prog/en/modules/opac-readingrecord.tt >+++ b/koha-tmpl/opac-tmpl/prog/en/modules/opac-readingrecord.tt >@@ -2,15 +2,32 @@ > [% USE KohaDates %] > [% INCLUDE 'doc-head-open.inc' %][% LibraryNameTitle or "Koha online" %] catalog › Your checkout history > [% INCLUDE 'doc-head-close.inc' %] >-<style type="text/css">ul.ui-tabs-nav li a, ul.ui-tabs-nav li span.a { padding:0.6em 1em; }</style> >+<link rel="stylesheet" href="[% themelang %]/css/datatables.css" /> >+[% INCLUDE 'datatables.inc' %] > <script type="text/javascript"> > //<![CDATA[ > $(document).ready(function(){ > [% IF ( GoogleJackets ) %]KOHA.Google.GetCoverFromIsbn();[% END %] >- $('#sortsubmit').hide(); >+ $('#sortsubmit').hide(); > $('#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_inhouse_use" ) { >+ table.fnFilter("inhouse_use", 0); >+ } else { // all >+ table.fnFilter('', 0); >+ } >+ } >+ }); > }); > //]]> > </script> >@@ -30,43 +47,51 @@ $(document).ready(function(){ > You have never borrowed anything from this library. > [% ELSE %] > <div id="opac-user-readingrec" class="statictabs"> >+ <p> >+ [% IF showfulllink %] >+ [% IF limit %] >+ <a href="/cgi-bin/koha/opac-readingrecord.pl?limit=full">Show All Items</a> | Showing Last 50 Items >+ [% ELSE %] >+ Showing All Items | <a href="/cgi-bin/koha/opac-readingrecord.pl?limit=50">Show Last 50 Items Only</a> >+ [% END %] >+ [% ELSE %] >+ Showing All Items >+ [% END %] >+ </p> >+</div> > >-<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 %] >-<select name="order" id="order"> >- >-[% IF ( orderbydate ) %]<option value="" selected="selected">Order by date</option>[% ELSE %]<option value="">Order by date</option>[% END %] >- >-[% IF ( orderbytitle ) %]<option value="title" selected="selected">Order by title</option>[% ELSE %]<option value="title">Order by title</option>[% END %] >- >- </select> <input type="submit" value="Go" id="sortsubmit" class="submit clearfix" /></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"> >-<tr> >-<th colspan="2">Title</th> >-<th>Item type</th> >-<th>Call no.</th> >-<th>Date</th> >-[% IF ( OPACMySummaryHTML ) %] >-<th>Links</th> >-[% END %] >-</tr> >- >-[% FOREACH issue IN READING_RECORD %] >+<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_inhouse_use">In-house use</a></li> >+ </ul> >+ <div id="tabs-container" style="overflow:hidden"> >+ <table id="readingrec"> >+ <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 %] >+ <tr> >+ <td style="display:none;"> >+ [% IF issue.inhouse_use %] >+ inhouse_use >+ [% ELSE %] >+ checkout >+ [% END %] >+ </td> > >-[% IF loop.even %]<tr class="highlight">[% ELSE %]<tr>[% END %] > <td> > [% IF OPACAmazonCoverImages %] > [% IF issue.normalized_isbn %] >@@ -129,6 +154,7 @@ You have never borrowed anything from this library. > </tr> > > [% END %] >+</tbody> > </table></div></div> > > [% END %] >diff --git a/misc/cronjobs/bulk_transferts.pl b/misc/cronjobs/bulk_transferts.pl >new file mode 100644 >index 0000000..45b4ea8 >--- /dev/null >+++ b/misc/cronjobs/bulk_transferts.pl >@@ -0,0 +1,105 @@ >+#!/usr/bin/perl >+ >+# Copyright 2013 BibLibre >+# >+# This file is part of Koha. >+# >+# Koha is free software; you can redistribute it and/or modify it under the >+# terms of the GNU General Public License as published by the Free Software >+# Foundation; either version 2 of the License, or (at your option) any later >+# version. >+# >+# Koha is distributed in the hope that it will be useful, but WITHOUT ANY >+# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR >+# A PARTICULAR PURPOSE. See the GNU General Public License for more details. >+# >+# You should have received a copy of the GNU General Public License along >+# with Koha; if not, write to the Free Software Foundation, Inc., >+# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. >+ >+use Modern::Perl; >+ >+use Pod::Usage; >+use Getopt::Long; >+ >+use C4::Context; >+use C4::Circulation; >+ >+my ( $help, $verbose, $locations, $branch); >+GetOptions( >+ 'h|help' => \$help, >+ 'v|verbose' => \$verbose, >+ 'locations:s' => \$locations, >+ 'branch:s' => \$branch, >+); >+ >+if ( $help or not $branch ) { >+ usage(); >+ exit; >+} >+ >+my $dbh = C4::Context->dbh; >+ >+my @locations; >+@locations = split /, /, $locations >+ if $locations =~ /, /; >+@locations = split /[, ]/, $locations >+ unless @locations; >+ >+my $query = q{ >+ SELECT barcode >+ FROM branchtransfers >+ LEFT JOIN items ON branchtransfers.itemnumber = items.itemnumber >+ WHERE tobranch = ? >+ AND branchtransfers.datearrived IS NULL >+}; >+$query .= q{AND items.location IN (} . ( "?, " x (scalar(@locations) - 1 )) . q{?)} >+ if @locations; >+ >+my $sth = $dbh->prepare( $query ); >+ >+$sth->execute( $branch, @locations ); >+ >+while ( my $barcode = $sth->fetchrow ) { >+ # We force the return >+ say "Returning barcode $barcode" if $verbose; >+ C4::Circulation::AddReturn( $barcode, $branch, undef, undef, 1 ); >+} >+ >+sub usage { >+ pod2usage( -verbose => 2 ); >+ exit; >+} >+ >+=head1 NAME >+ >+bulk_transfers.pl - Make a transfer for items of a specified branch. >+ >+=head1 USAGE >+ >+bulk_transfers.pl --branch [--locations -v -h] >+ >+=head1 PARAMETERS >+ >+=over >+ >+=item B<-h> >+ >+Print a brief help message >+ >+=item B<--branch> >+ >+The transfer is made for items going to this branch. >+ >+=item B<--locations> >+ >+List of item's locations. Filter to add to the branch parameter. >+ >+=item B<-v> >+ >+Verbose mode. >+ >+=back >+ >+=cut >+ >-- >1.7.10.4
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 10860
:
20959
|
20960
|
20961
|
21195
|
21642
|
22461
|
26089
|
26114
|
26123
|
26185
|
26191
|
26192
|
31388
|
31507
|
31548
|
31664
|
31665
|
32213
|
32214
|
32216
|
32223
|
32579
|
32580
|
32581
|
32954
|
32979
|
32980
|
32981
|
32982
|
32983
|
32984
|
32997
|
32998
|
33031
|
33032
|
33033
|
33034
|
33035
|
33036
|
33037
|
33105
|
33106
|
33107
|
33108
|
33109
|
33110
|
33111
|
33163
|
33165