View | Details | Raw Unified | Return to bug 10860
Collapse All | Expand All

(-)a/C4/Circulation.pm (-6 / +11 lines)
Lines 1183-1191 AddIssue does the following things : Link Here
1183
=cut
1183
=cut
1184
1184
1185
sub AddIssue {
1185
sub AddIssue {
1186
    my ( $borrower, $barcode, $datedue, $cancelreserve, $issuedate, $sipmode) = @_;
1186
    my ( $borrower, $barcode, $datedue, $cancelreserve, $issuedate, $sipmode, $params ) = @_;
1187
    my $inhouse_use = $params->{inhouse_use};
1187
    my $dbh = C4::Context->dbh;
1188
    my $dbh = C4::Context->dbh;
1188
	my $barcodecheck=CheckValidBarcode($barcode);
1189
    my $barcodecheck=CheckValidBarcode($barcode);
1190
    $inhouse_use = ( $inhouse_use ? 1 : 0 );
1191
1189
    if ($datedue && ref $datedue ne 'DateTime') {
1192
    if ($datedue && ref $datedue ne 'DateTime') {
1190
        $datedue = dt_from_string($datedue);
1193
        $datedue = dt_from_string($datedue);
1191
    }
1194
    }
Lines 1253-1260 sub AddIssue { Link Here
1253
        my $sth =
1256
        my $sth =
1254
          $dbh->prepare(
1257
          $dbh->prepare(
1255
                "INSERT INTO issues
1258
                "INSERT INTO issues
1256
                    (borrowernumber, itemnumber,issuedate, date_due, branchcode)
1259
                    (borrowernumber, itemnumber,issuedate, date_due, branchcode, inhouse_use)
1257
                VALUES (?,?,?,?,?)"
1260
                VALUES (?,?,?,?,?,?)"
1258
          );
1261
          );
1259
        unless ($datedue) {
1262
        unless ($datedue) {
1260
            my $itype = ( C4::Context->preference('item-level_itypes') ) ? $biblio->{'itype'} : $biblio->{'itemtype'};
1263
            my $itype = ( C4::Context->preference('item-level_itypes') ) ? $biblio->{'itype'} : $biblio->{'itemtype'};
Lines 1262-1273 sub AddIssue { Link Here
1262
1265
1263
        }
1266
        }
1264
        $datedue->truncate( to => 'minute');
1267
        $datedue->truncate( to => 'minute');
1268
1265
        $sth->execute(
1269
        $sth->execute(
1266
            $borrower->{'borrowernumber'},      # borrowernumber
1270
            $borrower->{'borrowernumber'},      # borrowernumber
1267
            $item->{'itemnumber'},              # itemnumber
1271
            $item->{'itemnumber'},              # itemnumber
1268
            $issuedate->strftime('%Y-%m-%d %H:%M:00'), # issuedate
1272
            $issuedate->strftime('%Y-%m-%d %H:%M:00'), # issuedate
1269
            $datedue->strftime('%Y-%m-%d %H:%M:00'),   # date_due
1273
            $datedue->strftime('%Y-%m-%d %H:%M:00'),   # date_due
1270
            C4::Context->userenv->{'branch'}    # branchcode
1274
            C4::Context->userenv->{'branch'},   # branchcode
1275
            $inhouse_use,
1271
        );
1276
        );
1272
        if ( C4::Context->preference('ReturnToShelvingCart') ) { ## ReturnToShelvingCart is on, anything issued should be taken off the cart.
1277
        if ( C4::Context->preference('ReturnToShelvingCart') ) { ## ReturnToShelvingCart is on, anything issued should be taken off the cart.
1273
          CartToShelf( $item->{'itemnumber'} );
1278
          CartToShelf( $item->{'itemnumber'} );
Lines 1308-1314 sub AddIssue { Link Here
1308
        # Record the fact that this book was issued.
1313
        # Record the fact that this book was issued.
1309
        &UpdateStats({
1314
        &UpdateStats({
1310
                      branch => C4::Context->userenv->{'branch'},
1315
                      branch => C4::Context->userenv->{'branch'},
1311
                      type => 'issue',
1316
                      type => ( $inhouse_use ? 'inhouse_use' : 'issue' ),
1312
                      amount => $charge,
1317
                      amount => $charge,
1313
                      other => ($sipmode ? "SIP-$sipmode" : ''),
1318
                      other => ($sipmode ? "SIP-$sipmode" : ''),
1314
                      itemnumber => $item->{'itemnumber'},
1319
                      itemnumber => $item->{'itemnumber'},
(-)a/C4/Items.pm (+6 lines)
Lines 1284-1289 sub GetItemsInfo { Link Here
1284
           holding.branchname,
1284
           holding.branchname,
1285
           holding.opac_info as holding_branch_opac_info,
1285
           holding.opac_info as holding_branch_opac_info,
1286
           home.opac_info as home_branch_opac_info
1286
           home.opac_info as home_branch_opac_info
1287
    ";
1288
    $query .= ", issues.inhouse_use"
1289
        if C4::Context->preference("In-House Use");
1290
    $query .= "
1287
     FROM items
1291
     FROM items
1288
     LEFT JOIN branches AS holding ON items.holdingbranch = holding.branchcode
1292
     LEFT JOIN branches AS holding ON items.holdingbranch = holding.branchcode
1289
     LEFT JOIN branches AS home ON items.homebranch=home.branchcode
1293
     LEFT JOIN branches AS home ON items.homebranch=home.branchcode
Lines 1291-1296 sub GetItemsInfo { Link Here
1291
     LEFT JOIN biblioitems ON biblioitems.biblioitemnumber = items.biblioitemnumber
1295
     LEFT JOIN biblioitems ON biblioitems.biblioitemnumber = items.biblioitemnumber
1292
     LEFT JOIN itemtypes   ON   itemtypes.itemtype         = "
1296
     LEFT JOIN itemtypes   ON   itemtypes.itemtype         = "
1293
     . (C4::Context->preference('item-level_itypes') ? 'items.itype' : 'biblioitems.itemtype');
1297
     . (C4::Context->preference('item-level_itypes') ? 'items.itype' : 'biblioitems.itemtype');
1298
    $query .= " LEFT JOIN issues ON issues.itemnumber = items.itemnumber"
1299
        if C4::Context->preference("In-House Use");
1294
    $query .= " WHERE items.biblionumber = ? ORDER BY home.branchname, items.enumchron, LPAD( items.copynumber, 8, '0' ), items.dateaccessioned DESC" ;
1300
    $query .= " WHERE items.biblionumber = ? ORDER BY home.branchname, items.enumchron, LPAD( items.copynumber, 8, '0' ), items.dateaccessioned DESC" ;
1295
    my $sth = $dbh->prepare($query);
1301
    my $sth = $dbh->prepare($query);
1296
    $sth->execute($biblionumber);
1302
    $sth->execute($biblionumber);
(-)a/C4/Stats.pm (-1 / +1 lines)
Lines 87-93 sub UpdateStats { Link Here
87
    return () if ! defined $params;
87
    return () if ! defined $params;
88
# change these arrays if new types of transaction or new parameters are allowed
88
# change these arrays if new types of transaction or new parameters are allowed
89
    my @allowed_keys = qw (type branch amount other itemnumber itemtype borrowernumber accountno ccode);
89
    my @allowed_keys = qw (type branch amount other itemnumber itemtype borrowernumber accountno ccode);
90
    my @allowed_circulation_types = qw (renew issue localuse return);
90
    my @allowed_circulation_types = qw (renew issue localuse return inhouse_use);
91
    my @allowed_accounts_types = qw (writeoff payment);
91
    my @allowed_accounts_types = qw (writeoff payment);
92
    my @circulation_mandatory_keys = qw (type branch borrowernumber itemnumber ccode itemtype);
92
    my @circulation_mandatory_keys = qw (type branch borrowernumber itemnumber ccode itemtype);
93
    my @accounts_mandatory_keys = qw (type branch borrowernumber amount);
93
    my @accounts_mandatory_keys = qw (type branch borrowernumber amount);
(-)a/circ/circulation.pl (-9 / +18 lines)
Lines 25-30 Link Here
25
use strict;
25
use strict;
26
use warnings;
26
use warnings;
27
use CGI;
27
use CGI;
28
use DateTime;
29
use DateTime::Duration;
28
use C4::Output;
30
use C4::Output;
29
use C4::Print;
31
use C4::Print;
30
use C4::Auth qw/:DEFAULT get_session/;
32
use C4::Auth qw/:DEFAULT get_session/;
Lines 316-328 if ($barcode) { Link Here
316
        }
318
        }
317
    }
319
    }
318
320
319
    delete $question->{'DEBT'} if ($debt_confirmed);
321
    unless( $query->param('inhouse_use') and C4::Context->preference("In-House Use Force") ) {
320
    foreach my $impossible ( keys %$error ) {
322
        delete $question->{'DEBT'} if ($debt_confirmed);
321
        $template->param(
323
        foreach my $impossible ( keys %$error ) {
322
            $impossible => $$error{$impossible},
324
            $template->param(
323
            IMPOSSIBLE  => 1
325
                $impossible => $$error{$impossible},
324
        );
326
                IMPOSSIBLE  => 1
325
        $blocker = 1;
327
            );
328
            $blocker = 1;
329
        }
326
    }
330
    }
327
    if( !$blocker ){
331
    if( !$blocker ){
328
        my $confirm_required = 0;
332
        my $confirm_required = 0;
Lines 338-350 if ($barcode) { Link Here
338
                    $needsconfirmation => $$question{$needsconfirmation},
342
                    $needsconfirmation => $$question{$needsconfirmation},
339
                    getTitleMessageIteminfo => $getmessageiteminfo->{'title'},
343
                    getTitleMessageIteminfo => $getmessageiteminfo->{'title'},
340
                    getBarcodeMessageIteminfo => $getmessageiteminfo->{'barcode'},
344
                    getBarcodeMessageIteminfo => $getmessageiteminfo->{'barcode'},
341
                    NEEDSCONFIRMATION  => 1
345
                    NEEDSCONFIRMATION  => 1,
346
                    inhouse_use => $query->param('inhouse_use'),
342
                );
347
                );
343
                $confirm_required = 1;
348
                $confirm_required = 1;
344
            }
349
            }
345
        }
350
        }
346
        unless($confirm_required) {
351
        unless($confirm_required) {
347
            AddIssue( $borrower, $barcode, $datedue, $cancelreserve );
352
            my $inhouse_use = $query->param('inhouse_use');
353
            AddIssue( $borrower, $barcode, $datedue, $cancelreserve, undef, undef, { inhouse_use => $inhouse_use } );
348
            $inprocess = 1;
354
            $inprocess = 1;
349
        }
355
        }
350
    }
356
    }
Lines 574-579 $template->param( Link Here
574
    export_with_csv_profile   => C4::Context->preference("ExportWithCsvProfile"),
580
    export_with_csv_profile   => C4::Context->preference("ExportWithCsvProfile"),
575
    canned_bor_notes_loop     => $canned_notes,
581
    canned_bor_notes_loop     => $canned_notes,
576
    debarments                => GetDebarments({ borrowernumber => $borrowernumber }),
582
    debarments                => GetDebarments({ borrowernumber => $borrowernumber }),
583
    todaysdate                => dt_from_string()->set(hour => 23)->set(minute => 59),
584
    inhouse_use_feature       => C4::Context->preference("In-House Use"),
585
    inhouse_use_forced        => C4::Context->preference("In-House Use Force"),
577
);
586
);
578
587
579
output_html_with_http_headers $query, $cookie, $template->output;
588
output_html_with_http_headers $query, $cookie, $template->output;
(-)a/installer/data/mysql/kohastructure.sql (+2 lines)
Lines 1125-1130 CREATE TABLE `issues` ( -- information related to check outs or issues Link Here
1125
  `renewals` tinyint(4) default NULL, -- lists the number of times the item was renewed
1125
  `renewals` tinyint(4) default NULL, -- lists the number of times the item was renewed
1126
  `timestamp` timestamp NOT NULL default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP, -- the date and time this record was last touched
1126
  `timestamp` timestamp NOT NULL default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP, -- the date and time this record was last touched
1127
  `issuedate` datetime default NULL, -- date the item was checked out or issued
1127
  `issuedate` datetime default NULL, -- date the item was checked out or issued
1128
  `inhouse_use` int(1) NOT NULL default 0, -- in house use flag
1128
  KEY `issuesborridx` (`borrowernumber`),
1129
  KEY `issuesborridx` (`borrowernumber`),
1129
  KEY `itemnumber_idx` (`itemnumber`),
1130
  KEY `itemnumber_idx` (`itemnumber`),
1130
  KEY `branchcode_idx` (`branchcode`),
1131
  KEY `branchcode_idx` (`branchcode`),
Lines 1596-1601 CREATE TABLE `old_issues` ( -- lists items that were checked out and have been r Link Here
1596
  `renewals` tinyint(4) default NULL, -- lists the number of times the item was renewed
1597
  `renewals` tinyint(4) default NULL, -- lists the number of times the item was renewed
1597
  `timestamp` timestamp NOT NULL default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP, -- the date and time this record was last touched
1598
  `timestamp` timestamp NOT NULL default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP, -- the date and time this record was last touched
1598
  `issuedate` datetime default NULL, -- date the item was checked out or issued
1599
  `issuedate` datetime default NULL, -- date the item was checked out or issued
1600
  `inhouse_use` int(1) NOT NULL default 0, -- in house use flag
1599
  KEY `old_issuesborridx` (`borrowernumber`),
1601
  KEY `old_issuesborridx` (`borrowernumber`),
1600
  KEY `old_issuesitemidx` (`itemnumber`),
1602
  KEY `old_issuesitemidx` (`itemnumber`),
1601
  KEY `branchcode_idx` (`branchcode`),
1603
  KEY `branchcode_idx` (`branchcode`),
(-)a/installer/data/mysql/sysprefs.sql (+2 lines)
Lines 146-151 INSERT INTO systempreferences ( `variable`, `value`, `options`, `explanation`, ` Link Here
146
('ImageLimit','5','','Limit images stored in the database by the Patron Card image manager to this number.','Integer'),
146
('ImageLimit','5','','Limit images stored in the database by the Patron Card image manager to this number.','Integer'),
147
('IncludeSeeFromInSearches','0','','Include see-from references in searches.','YesNo'),
147
('IncludeSeeFromInSearches','0','','Include see-from references in searches.','YesNo'),
148
('IndependentBranches','0',NULL,'If ON, increases security between libraries','YesNo'),
148
('IndependentBranches','0',NULL,'If ON, increases security between libraries','YesNo'),
149
('In-House use','0','','Enable/Disable the in-house use feature','YesNo'),
150
('In-House use Force','0','','Enable/Disable the in-house for all cases (Even if a user is debarred, etc.)','YesNo'),
149
('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'),
151
('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'),
150
('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'),
152
('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'),
151
('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'),
153
('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'),
(-)a/installer/data/mysql/updatedatabase.pl (+27 lines)
Lines 8751-8756 if ( CheckVersion($DBversion) ) { Link Here
8751
    SetVersion($DBversion);
8751
    SetVersion($DBversion);
8752
}
8752
}
8753
8753
8754
8755
8756
8757
8758
8759
$DBversion = "3.17.00.XXX";
8760
if ( C4::Context->preference("Version") < TransformToNum($DBversion) ) {
8761
    $dbh->do(q{
8762
        INSERT IGNORE INTO systempreferences
8763
            (variable,value,explanation,options,type)
8764
            VALUES('In-House use','0','Enable/Disable the in-house use feature','','YesNo');
8765
    });
8766
    $dbh->do(q{
8767
        INSERT IGNORE INTO systempreferences
8768
            (variable,value,explanation,options,type)
8769
            VALUES('In-House use Force','0','Enable/Disable the in-house for all cases (Even if a user is debarred, etc.)','','YesNo');
8770
    });
8771
    $dbh->do(q{
8772
        ALTER TABLE issues ADD COLUMN inhouse_use INT(1) NOT NULL DEFAULT 0 AFTER issuedate;
8773
    });
8774
    $dbh->do(q{
8775
        ALTER TABLE old_issues ADD COLUMN inhouse_use INT(1) NOT NULL DEFAULT 0 AFTER issuedate;
8776
    });
8777
    print "Upgrade to $DBversion done (Bug 10860: Add new system preference In-House use + fields [old_]issues.inhouse_use)\n";
8778
    SetVersion($DBversion);
8779
}
8780
8754
=head1 FUNCTIONS
8781
=head1 FUNCTIONS
8755
8782
8756
=head2 TableExists($table)
8783
=head2 TableExists($table)
(-)a/koha-tmpl/intranet-tmpl/prog/en/css/staff-global.css (+14 lines)
Lines 2713-2715 span.browse-button { Link Here
2713
#i18nMenu .dropdown-menu a:focus {
2713
#i18nMenu .dropdown-menu a:focus {
2714
    color : #FFF;
2714
    color : #FFF;
2715
}
2715
}
2716
2717
.inhouse_use-select {
2718
    font-size : 85%;
2719
    font-weight: normal;
2720
    padding-top : .3em;
2721
}
2722
#circ_circulation_issue .inhouse_use-select label,
2723
.inhouse_use-select label {
2724
    font-size : inherit;
2725
    font-weight: normal;
2726
}
2727
span.inhouse_use {
2728
    color: red;
2729
}
(-)a/koha-tmpl/intranet-tmpl/prog/en/includes/strings.inc (+1 lines)
Lines 24-28 Link Here
24
    var NOT_TRANSFERRED_YET = _("Item hasn't been transferred yet from %s");
24
    var NOT_TRANSFERRED_YET = _("Item hasn't been transferred yet from %s");
25
    var NO = _("No");
25
    var NO = _("No");
26
    var YES = _("Yes");
26
    var YES = _("Yes");
27
    var INHOUSE_USE = _("In-house use");
27
//]]>
28
//]]>
28
</script>
29
</script>
(-)a/koha-tmpl/intranet-tmpl/prog/en/js/checkouts.js (-5 / +28 lines)
Lines 192-197 $(document).ready(function() { Link Here
192
                        title += " - <span class='" + span_class + "'>" + oObj.itemnotes + "</span>"
192
                        title += " - <span class='" + span_class + "'>" + oObj.itemnotes + "</span>"
193
                    }
193
                    }
194
194
195
                    var inhouse_use = '';
196
                    if ( oObj.inhouse_use == 1 ) {
197
                        inhouse_use += " <span class='inhouse_use'>("+INHOUSE_USE+")</span>";
198
                    }
199
195
                    title += " "
200
                    title += " "
196
                          + "<a href='/cgi-bin/koha/catalogue/moredetail.pl?biblionumber="
201
                          + "<a href='/cgi-bin/koha/catalogue/moredetail.pl?biblionumber="
197
                          + oObj.biblionumber
202
                          + oObj.biblionumber
Lines 201-207 $(document).ready(function() { Link Here
201
                          + oObj.itemnumber
206
                          + oObj.itemnumber
202
                          + "'>"
207
                          + "'>"
203
                          + oObj.barcode
208
                          + oObj.barcode
204
                          + "</a>";
209
                          + "</a>"
210
                          + inhouse_use;
205
211
206
                    return title;
212
                    return title;
207
                }
213
                }
Lines 230-239 $(document).ready(function() { Link Here
230
                    var span_class = "";
236
                    var span_class = "";
231
237
232
                    content += "<span>";
238
                    content += "<span>";
233
                    content += "<span style='padding: 0 1em;'>" + oObj.renewals_count + "</span>";
234
239
235
                    if ( oObj.can_renew ) {
240
                    if ( inhouse_use == 0 ) {
241
                        content += "<span style='padding: 0 1em;'>" + oObj.renewals_count + "</span>";
242
                    }
243
244
                    if ( oObj.can_renew && inhouse_use == 0 ) {
236
                        // Do nothing
245
                        // Do nothing
246
                    } else if ( oObj.inhouse_use == 1 ) {
247
                        // If the issue is an in-house use, it is not renewable
248
                        content += "<span class='renewals-disabled'>"
249
                                + NOT_RENEWABLE
250
                                + "</span>";
251
252
                        span_style = "display: none";
253
                        span_class = "renewals-allowed";
237
                    } else if ( oObj.can_renew_error == "on_reserve" ) {
254
                    } else if ( oObj.can_renew_error == "on_reserve" ) {
238
                        content += "<span class='renewals-disabled'>"
255
                        content += "<span class='renewals-disabled'>"
239
                                + "<a href='/cgi-bin/koha/reserve/request.pl?biblionumber=" + oObj.biblionumber + "'>" + ON_HOLD + "</a>"
256
                                + "<a href='/cgi-bin/koha/reserve/request.pl?biblionumber=" + oObj.biblionumber + "'>" + ON_HOLD + "</a>"
Lines 268-274 $(document).ready(function() { Link Here
268
                            +  "<input type='checkbox' class='renew' id='renew_" + oObj.itemnumber + "' name='renew' value='" + oObj.itemnumber +"'/>"
285
                            +  "<input type='checkbox' class='renew' id='renew_" + oObj.itemnumber + "' name='renew' value='" + oObj.itemnumber +"'/>"
269
                            +  "</span>";
286
                            +  "</span>";
270
287
271
                    if ( oObj.renewals_remaining ) {
288
                    if ( oObj.renewals_remaining && inhouse_use == 0 ) {
272
                        content += "<span class='renewals'>("
289
                        content += "<span class='renewals'>("
273
                                + RENEWALS_REMAINING.format( oObj.renewals_remaining, oObj.renewals_allowed )
290
                                + RENEWALS_REMAINING.format( oObj.renewals_remaining, oObj.renewals_allowed )
274
                                + ")</span>";
291
                                + ")</span>";
Lines 399-404 $(document).ready(function() { Link Here
399
                                title += " - <span class='" + span_class + "'>" + oObj.itemnotes + "</span>"
416
                                title += " - <span class='" + span_class + "'>" + oObj.itemnotes + "</span>"
400
                            }
417
                            }
401
418
419
                            var inhouse_use = '';
420
                            if ( oObj.inhouse_use == 1 ) {
421
                                inhouse_use += " <span class='inhouse_use'>("+INHOUSE_USE+")</span>";
422
                            }
423
402
                            title += " "
424
                            title += " "
403
                                  + "<a href='/cgi-bin/koha/catalogue/moredetail.pl?biblionumber="
425
                                  + "<a href='/cgi-bin/koha/catalogue/moredetail.pl?biblionumber="
404
                                  + oObj.biblionumber
426
                                  + oObj.biblionumber
Lines 408-414 $(document).ready(function() { Link Here
408
                                  + oObj.itemnumber
430
                                  + oObj.itemnumber
409
                                  + "'>"
431
                                  + "'>"
410
                                  + oObj.barcode
432
                                  + oObj.barcode
411
                                  + "</a>";
433
                                  + "</a>"
434
                                  + inhouse_use;
412
435
413
                            return title;
436
                            return title;
414
                        }
437
                        }
(-)a/koha-tmpl/intranet-tmpl/prog/en/js/pages/circulation.js (+4 lines)
Lines 46-51 $(document).ready(function() { Link Here
46
        return false;
46
        return false;
47
    });
47
    });
48
48
49
    toggle_inhouse_use();
50
    $("#inhouse_use").click(function(){
51
        toggle_inhouse_use();
52
    });
49
});
53
});
50
54
51
function export_checkouts(format) {
55
function export_checkouts(format) {
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/circulation.pref (+12 lines)
Lines 383-388 Circulation: Link Here
383
            - This is a list of value pairs. When an item is checked in, if the not for loan value on the left matches the items not for loan value
383
            - This is a list of value pairs. When an item is checked in, if the not for loan value on the left matches the items not for loan value
384
            - "it will be updated to the right-hand value. E.g. '-1: 0' will cause an item that was set to 'Ordered' to now be available for loan."
384
            - "it will be updated to the right-hand value. E.g. '-1: 0' will cause an item that was set to 'Ordered' to now be available for loan."
385
            - Each pair of values should be on a separate line.
385
            - Each pair of values should be on a separate line.
386
        -
387
            - pref: In-House use
388
              choices:
389
                  yes: Enable
390
                  no: Disable
391
            - the in-house use feature.
392
        -
393
            - pref: In-House use Force
394
              choices:
395
                  yes: Enable
396
                  no: Disable
397
            - the in-house for all cases (Even if a user is debarred, etc.).
386
    Holds Policy:
398
    Holds Policy:
387
        -
399
        -
388
            - pref: AllowHoldPolicyOverride
400
            - pref: AllowHoldPolicyOverride
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt (+8 lines)
Lines 586-594 function verify_images() { Link Here
586
                    <td class="status">
586
                    <td class="status">
587
587
588
                        [% IF ( item.datedue ) %]
588
                        [% IF ( item.datedue ) %]
589
                          [% IF inhouse_use %]
590
                            <span>Currently in local use
591
                          [% ELSE %]
589
                            <span class="datedue">Checked out
592
                            <span class="datedue">Checked out
593
                          [% END %]
590
                                [% UNLESS ( item.NOTSAMEBRANCH ) %]
594
                                [% UNLESS ( item.NOTSAMEBRANCH ) %]
595
                                  [% IF inhouse_use %]
596
                                    by <a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% item.borrowernumber %]">
597
                                  [% ELSE %]
591
                                    to <a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% item.borrowernumber %]">
598
                                    to <a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% item.borrowernumber %]">
599
                                  [% END %]
592
                                        [% IF ( item.hidepatronname ) %]
600
                                        [% IF ( item.hidepatronname ) %]
593
                                            [% item.cardnumber %]
601
                                            [% item.cardnumber %]
594
                                        [% ELSE %]
602
                                        [% ELSE %]
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tt (-10 / +45 lines)
Lines 53-58 $(document).ready(function() { Link Here
53
        });
53
        });
54
    [% END %]
54
    [% END %]
55
});
55
});
56
57
// In-house use
58
function toggle_inhouse_use(){
59
    if ( $("#inhouse_use").attr('checked') ) {
60
        $("#duedatespec").val("[% todaysdate | $KohaDates with_hours => 1%]")
61
        $("#duedatespec").datetimepicker('destroy');
62
    } else {
63
        $("#duedatespec").datetimepicker({
64
            onClose: function(dateText, inst) { $("#barcode").focus(); },
65
            hour: 23,
66
            minute: 59
67
        });
68
    }
69
}
70
56
//]]>
71
//]]>
57
</script>
72
</script>
58
</head>
73
</head>
Lines 285-290 $(document).ready(function() { Link Here
285
    [% ELSE %]
300
    [% ELSE %]
286
    <input type="submit" class="approve" value="Yes, check out (Y)" accesskey="y" />
301
    <input type="submit" class="approve" value="Yes, check out (Y)" accesskey="y" />
287
    [% END %]
302
    [% END %]
303
    <input type="hidden" name="inhouse_use" value="[% inhouse_use %]" />
288
</form>
304
</form>
289
[% END %]
305
[% END %]
290
306
Lines 463-469 No patron matched <span class="ex">[% message %]</span> Link Here
463
479
464
[% IF ( borrowernumber ) %]
480
[% IF ( borrowernumber ) %]
465
<div class="yui-g">
481
<div class="yui-g">
466
[% UNLESS ( noissues ) %]
482
[% IF !noissues || inhouse_use_forced %]
467
[% IF ( flagged ) %]
483
[% IF ( flagged ) %]
468
<div class="yui-u first">
484
<div class="yui-u first">
469
[% ELSE %]
485
[% ELSE %]
Lines 501-506 No patron matched <span class="ex">[% message %]</span> Link Here
501
[% END %]
517
[% END %]
502
          <button class="btn btn-small action" id="cleardate" name="cleardate" onclick="this.checked = false; this.form.duedatespec.value = ''; this.form.stickyduedate.checked = false; this.form.barcode.focus(); return false;" >Clear</button>
518
          <button class="btn btn-small action" id="cleardate" name="cleardate" onclick="this.checked = false; this.form.duedatespec.value = ''; this.form.stickyduedate.checked = false; this.form.barcode.focus(); return false;" >Clear</button>
503
</div>[% END %]
519
</div>[% END %]
520
521
      [% IF inhouse_use_feature %]
522
        <div class="inhouse_use-select">
523
          [% IF noissues %]
524
            <input type="checkbox" id="inhouse_use" name="inhouse_use_forced" checked="checked" disabled="disabled" /> <label for="inhouse_use">In-house use</label>
525
            <input type="hidden" name="inhouse_use" checked="checked" value="1" />
526
          [% ELSE %]
527
            <input type="checkbox" id="inhouse_use" name="inhouse_use" /> <label for="inhouse_use">In-house use</label>
528
          [% END %]
529
        </div>
530
      [% END %]
531
504
          <input type="hidden" name="borrowernumber" id="borrowernumber" value="[% borrowernumber %]" />
532
          <input type="hidden" name="borrowernumber" id="borrowernumber" value="[% borrowernumber %]" />
505
          <input type="hidden" name="branch" value="[% branch %]" />
533
          <input type="hidden" name="branch" value="[% branch %]" />
506
          <input type="hidden" name="printer" value="[% printer %]" />
534
          <input type="hidden" name="printer" value="[% printer %]" />
Lines 515-531 No patron matched <span class="ex">[% message %]</span> Link Here
515
543
516
[% IF ( noissues ) %]<div>[% ELSE %]<div class="yui-u">[% END %]
544
[% IF ( noissues ) %]<div>[% ELSE %]<div class="yui-u">[% END %]
517
545
518
    [% IF ( flagged ) %]
546
    [% IF flagged %]
519
		[% IF ( noissues ) %]
547
      [% IF NOT noissues || ( noissues && inhouse_use_forced ) %]
520
		<h4>Checking out to [% INCLUDE 'patron-title.inc' %]</h4>
521
        <div id="circmessages" class="circmessage warning">
522
		[% ELSE %]
523
        <div id="circmessages" class="circmessage attention">
548
        <div id="circmessages" class="circmessage attention">
524
		[% END %]
549
      [% ELSE %]
550
        <h4>Checking out to [% INCLUDE 'patron-title.inc' %]</h4>
551
        <div id="circmessages" class="circmessage warning">
552
      [% END %]
553
      <h3>
554
        [% IF noissues %]
555
          Cannot check out!
556
          [% IF inhouse_use_forced %]
557
            <span style="color:red;">Only in-house use is allowed</span>
558
          [% END %]
559
        [% ELSE %]
560
          Attention:
561
        [% END %]
562
      </h3>
525
563
526
		<h3>[% IF ( noissues ) %]
527
		        Cannot check out!
528
		[% ELSE %]Attention:[% END %]</h3>
529
		<ul>
564
		<ul>
530
565
531
			[% IF ( warndeparture ) %]
566
			[% IF ( warndeparture ) %]
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/members/readingrec.tt (-50 / +77 lines)
Lines 8-14 Link Here
8
//<![CDATA[
8
//<![CDATA[
9
9
10
 $(document).ready(function() {
10
 $(document).ready(function() {
11
    $("#table_readingrec").dataTable($.extend(true, {}, dataTablesDefaults, {
11
    var table = $("#table_readingrec").dataTable($.extend(true, {}, dataTablesDefaults, {
12
        "sPaginationType": "four_button",
12
        "sPaginationType": "four_button",
13
        "aaSorting": [],
13
        "aaSorting": [],
14
        "aoColumnDefs": [
14
        "aoColumnDefs": [
Lines 16-21 Link Here
16
            { "sType": "title-string", "aTargets" : [ "title-string" ] }
16
            { "sType": "title-string", "aTargets" : [ "title-string" ] }
17
        ]
17
        ]
18
    }));
18
    }));
19
    var tabs = $("#tabs").tabs({
20
        select: function(e, ui) {
21
            var id = $(ui.tab).attr("id");
22
            if ( id == "tab_checkout" ) {
23
                table.fnFilter("checkout", 0);
24
            } else if ( id == "tab_inhouse_use" ) {
25
                table.fnFilter("inhouse_use", 0);
26
            } else { // all
27
                table.fnFilter('', 0);
28
            }
29
        }
30
    });
19
 });
31
 });
20
//]]>
32
//]]>
21
</script>
33
</script>
Lines 42-105 Link Here
42
<form action="/cgi-bin/koha/members/readingrec.pl" method="get"><input type="hidden" name="borrowernumber" id="borrowernumber" value="[% borrowernumber %]" /></form>
54
<form action="/cgi-bin/koha/members/readingrec.pl" method="get"><input type="hidden" name="borrowernumber" id="borrowernumber" value="[% borrowernumber %]" /></form>
43
55
44
56
45
<table id="table_readingrec">
57
<div id="tabs" class="toptabs">
46
<thead>
58
  <ul>
47
    <tr>
59
    <li><a href="#readingrec" id="tab_all">All</a></li>
48
    <th class="title-string">Date</th>
60
    <li><a href="#readingrec" id="tab_checkout">Checkouts</a></li>
49
    <th class="anti-the">Title</th>
61
    <li><a href="#readingrec" id="tab_inhouse_use">In-house use</a></li>
50
	<th>Author</th>
62
  </ul>
51
    <th>Call no.</th>
63
  <div id="readingrec" style="overflow:hidden">
52
	<th>Barcode</th>
64
    <table id="table_readingrec">
53
    <th>Number of renewals</th>
65
      <thead>
54
    <th class="title-string">Checked out on</th>
66
        <th style="display:none;">Type</th>
55
	<th>Checked out from</th>
67
        <th class="title-string">Date</th>
56
    <th class="title-string">Date due</th>
68
        <th class="anti-the">Title</th>
57
    <th class="title-string">Return date</th>
69
        <th>Author</th>
58
    </tr>
70
        <th>Call no.</th>
59
</thead>
71
        <th>Barcode</th>
60
<tbody>
72
        <th>Number of renewals</th>
61
[% FOREACH issue IN loop_reading %]
73
        <th class="title-string">Checked out on</th>
62
    [% IF  issue.returndate  %]<tr>[% ELSE %]<tr class="onissue">[% END %]
74
        <th>Checked out from</th>
63
        <td>
75
        <th class="title-string">Date due</th>
76
        <th class="title-string">Return date</th>
77
      </thead>
78
      <tbody>
79
      [% FOREACH issue IN loop_reading %]
80
        [% IF  issue.returndate  %]<tr>[% ELSE %]<tr class="onissue">[% END %]
81
          <td style="display:none;">
82
            [% IF issue.inhouse_use %]
83
              inhouse_use
84
            [% ELSE %]
85
              checkout
86
            [% END %]
87
          </td>
88
          <td>
64
            <span title="[% issue.issuestimestamp %]">[% issue.issuestimestamp | $KohaDates %]</span>
89
            <span title="[% issue.issuestimestamp %]">[% issue.issuestimestamp | $KohaDates %]</span>
65
        </td>
90
          </td>
66
        <td><a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=[% issue.biblionumber %]">[% issue.title |html %]</a></td>
91
          <td><a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=[% issue.biblionumber %]">[% issue.title |html %]</a></td>
67
92
68
        <td>[% issue.author %]</td>
93
          <td>[% issue.author %]</td>
69
94
70
        <td>
95
          <td>
71
            [% IF issue.classification %]
96
            [% IF issue.classification %]
72
                [% issue.classification %]
97
                [% issue.classification %]
73
            [% ELSE %]
98
            [% ELSE %]
74
                [% issue.itemcallnumber %]
99
                [% issue.itemcallnumber %]
75
            [% END %]
100
            [% END %]
76
       </td>
101
          </td>
77
78
        <td>[% issue.barcode %]</td>
79
102
80
            <td>
103
          <td>[% issue.barcode %]</td>
81
        [% issue.renewals %]</td>
104
          <td>[% issue.renewals %]</td>
82
            <td>
105
          <td>
83
                <span title="[% issue.issuedate %]">[% issue.issuedate | $KohaDates %]</span></td>
106
            <span title="[% issue.issuedate %]">[% issue.issuedate | $KohaDates %]</span></td>
84
            <td>
107
          </td>
85
        [% issue.issuingbranch %]</td>
108
          <td>[% issue.issuedate | $KohaDates %]</td>
86
			<td>[% IF issue.date_due %]
109
          <td>[% issue.issuingbranch %]</td>
87
                    <span title="[% issue.date_due %]">[% issue.date_due | $KohaDates %]</span>
110
          <td>
88
                [% ELSE %]
111
            [% IF issue.date_due %]
89
                    <span title="0000-00-00"></span>
112
                <span title="[% issue.date_due %]">[% issue.date_due | $KohaDates %]</span>
90
                [% END %]
113
            [% ELSE %]
91
            </td>
114
                <span title="0000-00-00"></span>
92
            <td>
115
            [% END %]
93
                [% IF  issue.returndate %]
116
          </td>
94
                    <span title="[% issue.returndate %]">[% issue.returndate | $KohaDates %]</span>
117
          <td>
95
                [% ELSE %]
118
            [% IF  issue.returndate %]
96
                    <span title="Checked Out"><small>Checked out</small></span>
119
              <span title="[% issue.returndate %]">[% issue.returndate | $KohaDates %]</span>
97
                [% END %]
120
            [% ELSE %]
98
            </td>
121
              <span title="Checked Out"><small>Checked Out</small></span>
99
</tr>
122
            [% END %]
100
[% END %]
123
          </td>
101
</tbody>
124
        </tr>
102
</table>
125
      [% END %]
126
      </tbody>
127
    </table>
128
  </div>
129
</div>
103
[% END %]
130
[% END %]
104
</div>
131
</div>
105
</div>
132
</div>
(-)a/koha-tmpl/opac-tmpl/prog/en/css/datatables.css (-100 / +94 lines)
Lines 3-25 input.search_init { Link Here
3
}
3
}
4
.sorting_asc {
4
.sorting_asc {
5
    padding-right: 19px;
5
    padding-right: 19px;
6
    background: url("../../img/asc.gif") no-repeat scroll right center #EEEEEE;
6
    background: url("../../images/asc.gif") no-repeat scroll right center #EEEEEE;
7
}
7
}
8
.sorting_desc {
8
.sorting_desc {
9
    padding-right: 19px;
9
    padding-right: 19px;
10
    background: url("../../img/desc.gif") no-repeat scroll right center #EEEEEE;
10
    background: url("../../images/desc.gif") no-repeat scroll right center #EEEEEE;
11
}
11
}
12
.sorting {
12
.sorting {
13
    padding-right: 19px;
13
    padding-right: 19px;
14
    background: url("../../img/ascdesc.gif") no-repeat scroll right center #EEEEEE;
14
    background: url("../../images/ascdesc.gif") no-repeat scroll right center #EEEEEE;
15
}
15
}
16
.sorting_asc_disabled {
16
.sorting_asc_disabled {
17
    padding-right: 19px;
17
    padding-right: 19px;
18
    background: url("../../img/datatables/sort_asc_disabled.png") no-repeat scroll right center #EEEEEE;
18
    background: url("../../images/datatables/sort_asc_disabled.png") no-repeat scroll right center #EEEEEE;
19
}
19
}
20
.sorting_desc_disabled {
20
.sorting_desc_disabled {
21
    padding-right: 19px;
21
    padding-right: 19px;
22
    background: url("../../img/datatables/sort_desc_disabled.png") no-repeat scroll right center #EEEEEE;
22
    background: url("../../images/datatables/sort_desc_disabled.png") no-repeat scroll right center #EEEEEE;
23
}
23
}
24
.sorting_disabled {
24
.sorting_disabled {
25
    padding-right: 19px;
25
    padding-right: 19px;
Lines 64-75 div.dataTables_filter { Link Here
64
}
64
}
65
div.dataTables_paginate {
65
div.dataTables_paginate {
66
    background-color : #F4F4F4;
66
    background-color : #F4F4F4;
67
    font-size: 110%;
68
    padding : 0;
67
    padding : 0;
69
}
68
}
70
69
71
.paging_full_numbers span.paginate_button,
70
.paging_full_numbers a.paginate_button,
72
.paging_full_numbers span.paginate_active {
71
.paging_full_numbers a.paginate_active {
73
    border-right : 1px solid #AAA;
72
    border-right : 1px solid #AAA;
74
    border-left : 1px solid #FFF;
73
    border-left : 1px solid #FFF;
75
    display : block;
74
    display : block;
Lines 79-126 div.dataTables_paginate { Link Here
79
    cursor: pointer;
78
    cursor: pointer;
80
}
79
}
81
80
82
.paging_full_numbers span.paginate_button {
81
.paging_full_numbers a.paginate_button {
83
    color : #0000CC;
82
    color : #0000CC;
84
}
83
}
85
.paging_full_numbers span.paginate_button.first {
84
.paging_full_numbers a.paginate_button.first {
86
    background-image : url('../../img/first.png');
85
    background-image : url('../../images/first.png');
87
    background-repeat: no-repeat;
86
    background-repeat: no-repeat;
88
    background-position : 2px center;
87
    background-position : 1% center;
89
    padding-left : 2em;
88
    padding-left : 2em;
90
}
89
}
91
.paging_full_numbers span.paginate_button.previous {
90
.paging_full_numbers a.paginate_button.previous {
92
    background-image : url('../../img/prev.png');
91
    background-image : url('../../images/prev.png');
93
    background-repeat: no-repeat;
92
    background-repeat: no-repeat;
94
    background-position : 2px center;
93
    background-position : 1% center;
95
    padding-left : 2em;
94
    padding-left : 2em;
96
}
95
}
97
.paging_full_numbers span.paginate_button.next {
96
.paging_full_numbers a.paginate_button.next {
98
    background-image : url('../../img/next.png');
97
    background-image : url('../../images/next.png');
99
    background-repeat: no-repeat;
98
    background-repeat: no-repeat;
100
    background-position : right center;
99
    background-position : 96% center;
101
    padding-right : 2em;
100
    padding-right : 2em;
102
}
101
}
103
.paging_full_numbers span.paginate_button.last {
102
.paging_full_numbers a.paginate_button.last {
104
    background-image : url('../../img/last.png');
103
    background-image : url('../../images/last.png');
105
    background-repeat: no-repeat;
104
    background-repeat: no-repeat;
106
    background-position : right center;
105
    background-position : 96% center;
107
    border-right : 1px solid #686868;
106
    border-right : 1px solid #686868;
108
    padding-right : 2em;
107
    padding-right : 2em;
109
}
108
}
110
div.bottom.pager .paging_full_numbers span.paginate_button.last {
109
div.bottom.pager .paging_full_numbers a.paginate_button.last {
111
    border-right-width : 0;
110
    border-right-width : 0;
112
}
111
}
113
.paging_full_numbers span.paginate_active {
112
.paging_full_numbers a.paginate_active {
114
    background-color : #FFFFEA;
113
    background-color : #FFFFEA;
115
    color : #000;
114
    color : #000;
116
    font-weight: bold;
115
    font-weight: bold;
117
}
116
}
118
117
119
.paging_full_numbers span.paginate_button:hover {
118
.paging_full_numbers a.paginate_button:hover {
120
    background-color: #FFC;
119
    background-color: #FFC;
121
}
120
}
122
121
123
.paging_full_numbers span.paginate_button.paginate_button_disabled {
122
.paging_full_numbers a.paginate_button.paginate_button_disabled {
124
    color : #666;
123
    color : #666;
125
}
124
}
126
125
Lines 131-137 div.dataTables_paginate.paging_four_button { Link Here
131
    background-color : transparent;
130
    background-color : transparent;
132
    border-right : 1px solid #686868;
131
    border-right : 1px solid #686868;
133
    border-left : 1px solid #FFF;
132
    border-left : 1px solid #FFF;
134
    line-height : 1.8em;
133
    line-height : 2.5em;
135
}
134
}
136
.paginate_disabled_first,
135
.paginate_disabled_first,
137
.paginate_enabled_first,
136
.paginate_enabled_first,
Lines 141-195 div.dataTables_paginate.paging_four_button { Link Here
141
.paginate_enabled_next,
140
.paginate_enabled_next,
142
.paginate_disabled_last,
141
.paginate_disabled_last,
143
.paginate_enabled_last {
142
.paginate_enabled_last {
144
    float: left;
143
    cursor: pointer;
145
    height: 16px;
144
    *cursor: hand;
146
    margin: .5em;
145
    padding: .1em 0;
147
    width: 16px;
146
}
147
148
.paginate_disabled_previous,
149
.paginate_enabled_previous,
150
.paginate_disabled_next,
151
.paginate_enabled_next {
152
    color: #111 !important;
153
}
154
155
.paginate_disabled_previous,
156
.paginate_enabled_previous {
157
    padding-left: 23px;
148
}
158
}
159
.paginate_disabled_next,
160
.paginate_enabled_next,
161
.paginate_disabled_last,
162
.paginate_enabled_last {
163
    padding-right: 23px;
164
    margin-left: 10px;
165
    margin-right : .3em;
166
}
167
168
.paging_four_button .paginate_disabled_first,
169
.paging_four_button .paginate_disabled_previous,
170
.paging_four_button .paginate_enabled_first,
171
.paging_four_button .paginate_enabled_previous  {
172
    margin-left : .3em;
173
}
174
149
.paginate_disabled_first {
175
.paginate_disabled_first {
150
    background-image: url("../../img/first-disabled.png");
176
    background: transparent url("../../images/first-disabled.png") no-repeat 3px top;
151
}
177
}
152
.paginate_enabled_first {
178
.paginate_enabled_first {
153
    background-image: url("../../img/first.png");
179
    background: transparent url("../../images/first.png") no-repeat 3px top;
154
    cursor: pointer;
180
    cursor: pointer;
155
}
181
}
156
.paginate_disabled_previous {
182
.paginate_disabled_previous {
157
    background-image: url("../../img/prev-disabled.png");
183
    background: transparent url("../../images/prev-disabled.png") no-repeat 3px top;
158
}
184
}
159
.paginate_enabled_previous {
185
.paginate_enabled_previous {
160
    background-image: url("../../img/prev.png");
186
    background: transparent url("../../images/prev.png") no-repeat 3px top;
161
    cursor: pointer;
187
    cursor: pointer;
162
}
188
}
163
.paginate_disabled_next {
189
.paginate_disabled_next {
164
    background-image: url("../../img/next-disabled.png");
190
    background: transparent url("../../images/next-disabled.png") no-repeat right top;
165
}
191
}
166
.paginate_enabled_next {
192
.paginate_enabled_next {
167
    background-image: url("../../img/next.png");
193
    background: transparent url("../../images/next.png") no-repeat right top;
168
    cursor: pointer;
194
    cursor: pointer;
169
}
195
}
170
.paginate_disabled_last {
196
.paginate_disabled_last {
171
    background-image: url("../../img/last-disabled.png");
197
    background: transparent url("../../images/last-disabled.png") no-repeat right top;
172
}
198
}
173
.paginate_enabled_last {
199
.paginate_enabled_last {
174
    background-image: url("../../img/last.png");
200
    background: transparent url("../../images/last.png") no-repeat right top;
175
    cursor: pointer;
201
    cursor: pointer;
176
}
202
}
177
203
178
179
/*
180
table.display {
181
    width: 100%;
182
}
183
table.display thead th {
184
    border-bottom: 1px solid black;
185
    cursor: pointer;
186
    font-weight: bold;
187
    padding: 3px 18px 3px 10px;
188
}
189
.dataTables_wrapper {
190
    clear: both;
191
    position: relative;
192
}
193
.dataTables_processing {
204
.dataTables_processing {
194
    background-color: white;
205
    background-color: white;
195
    border: 1px solid #DDDDDD;
206
    border: 1px solid #DDDDDD;
Lines 205-265 table.display thead th { Link Here
205
    top: 50%;
216
    top: 50%;
206
    width: 250px;
217
    width: 250px;
207
}
218
}
208
.dataTables_info {
209
    float: left;
210
    width: 60%;
211
}
212
.dataTables_paginate {
213
    float: right;
214
    text-align: right;
215
    width: 44px;
216
}
217
.paging_full_numbers {
218
    height: 22px;
219
    line-height: 22px;
220
    width: 400px;
221
}
222
.paging_full_numbers span.paginate_button,
223
     .paging_full_numbers span.paginate_active {
224
    border: 1px solid #aaa;
225
    -webkit-border-radius: 5px;
226
    -moz-border-radius: 5px;
227
    padding: 2px 5px;
228
    margin: 0 3px;
229
    cursor: pointer;
230
    *cursor: hand;
231
}
232
219
233
.paging_full_numbers span.paginate_button {
220
tr.odd.selected td {
234
    background-color: #ddd;
221
    background-color: #D3D3D3;
235
}
222
}
236
223
237
.paging_full_numbers span.paginate_button:hover {
224
tr.even.selected td {
238
    background-color: #ccc;
225
    background-color: #D3D3D3;
239
}
226
}
240
227
241
.paging_full_numbers span.paginate_active {
228
/* ColumnFilter */
242
    background-color: #99B3FF;
229
span.filter_column > input.text_filter {
243
}
230
    font-size: 80%;
244
.paginate_disabled_previous, .paginate_enabled_previous, .paginate_disabled_next, .paginate_enabled_next {
231
    width: 100%;
245
    float: left;
246
    height: 19px;
247
    margin-left: 3px;
248
    width: 19px;
249
}
232
}
250
.paginate_disabled_previous {
233
251
    background-image: url("../../img/datatables/back_disabled.jpg");
234
div.pager {
235
    background-color : #E8E8E8;
236
    border : 1px solid #BCBCBC;
237
    -moz-border-radius : 5px;
238
    border-radius : 5px;
239
    display : inline-block;
240
    font-size : 85%;
241
    padding : .3em .5em .3em .5em;
242
    margin : .4em 0;
252
}
243
}
253
.paginate_enabled_previous {
244
div.pager img {
254
    background-image: url("../../img/datatables/back_enabled.jpg");
245
    vertical-align : middle;
255
}
246
}
256
.paginate_disabled_next {
247
257
    background-image: url("../../img/datatables/forward_disabled.jpg");
248
div.pager img.last {
249
    padding-right: 5px;
258
}
250
}
259
.paginate_enabled_next {
251
div.pager input.pagedisplay {
260
    background-image: url("../../img/datatables/forward_enabled.jpg");
252
    border : 0;
253
    background-color : transparent;
254
    font-weight: bold;
255
    text-align : center;
261
}
256
}
262
.spacer {
257
div.pager p {
263
    clear: both;
258
    margin: 0;
264
    height: 20px;
265
}
259
}
(-)a/koha-tmpl/opac-tmpl/prog/en/includes/item-status.inc (+8 lines)
Lines 19-29 not use an API to fetch items that populates item.datedue. Link Here
19
        [% END %]
19
        [% END %]
20
    [% END %]
20
    [% END %]
21
[% ELSIF ( item.datedue || issue.date_due ) %]
21
[% ELSIF ( item.datedue || issue.date_due ) %]
22
  [% IF inhouse_use %]
23
    [% IF ( OPACShowCheckoutName ) %]
24
        Currently in local use by [% item.cardnumber %] [% item.firstname %] [% item.surname %]
25
    [% ELSE %]
26
        Currently in local use
27
    [% END %]
28
  [% ELSE %]
22
    [% IF ( OPACShowCheckoutName ) %]
29
    [% IF ( OPACShowCheckoutName ) %]
23
        Checked out to [% item.cardnumber %] [% item.firstname %] [% item.surname %]
30
        Checked out to [% item.cardnumber %] [% item.firstname %] [% item.surname %]
24
    [% ELSE %]
31
    [% ELSE %]
25
        Checked out
32
        Checked out
26
    [% END %]
33
    [% END %]
34
  [% END %]
27
[% ELSIF ( item.transfertwhen ) %]
35
[% ELSIF ( item.transfertwhen ) %]
28
    In transit from [% item.transfertfrom %]
36
    In transit from [% item.transfertfrom %]
29
    to [% item.transfertto %] since [% item.transfertwhen %]
37
    to [% item.transfertto %] since [% item.transfertwhen %]
(-)a/koha-tmpl/opac-tmpl/prog/en/js/datatables.js (-1 / +1 lines)
Lines 97-100 jQuery.extend( jQuery.fn.dataTableExt.oSort, { Link Here
97
        }
97
        }
98
    });
98
    });
99
99
100
}());
100
}());
(-)a/koha-tmpl/opac-tmpl/prog/en/modules/opac-readingrecord.tt (-37 / +63 lines)
Lines 3-17 Link Here
3
[% INCLUDE 'doc-head-open.inc' %]
3
[% INCLUDE 'doc-head-open.inc' %]
4
[% IF ( LibraryNameTitle ) %][% LibraryNameTitle %][% ELSE %]Koha online[% END %] catalog &rsaquo; Your checkout history
4
[% IF ( LibraryNameTitle ) %][% LibraryNameTitle %][% ELSE %]Koha online[% END %] catalog &rsaquo; Your checkout history
5
[% INCLUDE 'doc-head-close.inc' %]
5
[% INCLUDE 'doc-head-close.inc' %]
6
<style type="text/css">ul.ui-tabs-nav li a, ul.ui-tabs-nav li span.a  { padding:0.6em 1em; }</style>
6
<link rel="stylesheet" href="[% themelang %]/css/datatables.css" />
7
[% INCLUDE 'datatables.inc' %]
7
<script type="text/javascript">
8
<script type="text/javascript">
8
//<![CDATA[
9
//<![CDATA[
9
$(document).ready(function(){
10
$(document).ready(function(){
10
    [% IF ( GoogleJackets ) %]KOHA.Google.GetCoverFromIsbn();[% END %]
11
    [% IF ( GoogleJackets ) %]KOHA.Google.GetCoverFromIsbn();[% END %]
11
        $('#sortsubmit').hide();
12
    $('#sortsubmit').hide();
12
    $('#order').change(function() {
13
    $('#order').change(function() {
13
        $('#sortform').submit();
14
        $('#sortform').submit();
14
    });
15
    });
16
17
    var table = $("#readingrec").dataTable($.extend(true, {}, dataTablesDefaults, {
18
        "sPaginationType": "four_button",
19
    }));
20
    var tabs = $("#tabs").tabs({
21
        select: function(e, ui) {
22
            var id = $(ui.tab).attr("id");
23
            if ( id == "tab_checkout" ) {
24
                table.fnFilter("checkout", 0);
25
            } else if ( id == "tab_inhouse_use" ) {
26
                table.fnFilter("inhouse_use", 0);
27
            } else { // all
28
                table.fnFilter('', 0);
29
            }
30
        }
31
    });
15
});
32
});
16
//]]>
33
//]]>
17
</script>
34
</script>
Lines 31-73 $(document).ready(function(){ Link Here
31
You have never borrowed anything from this library.
48
You have never borrowed anything from this library.
32
[% ELSE %]
49
[% ELSE %]
33
<div id="opac-user-readingrec" class="statictabs">
50
<div id="opac-user-readingrec" class="statictabs">
51
  <p>
52
    [% IF showfulllink %]
53
      [% IF limit %]
54
        <a href="/cgi-bin/koha/opac-readingrecord.pl?limit=full">Show All Items</a> | Showing Last 50 Items
55
      [% ELSE %]
56
        Showing All Items | <a href="/cgi-bin/koha/opac-readingrecord.pl?limit=50">Show Last 50 Items Only</a>
57
      [% END %]
58
    [% ELSE %]
59
        Showing All Items
60
    [% END %]
61
  </p>
62
</div>
34
63
35
<div class="resultscontrol resort"> <form id="sortform" action="/cgi-bin/koha/opac-readingrecord.pl" method="get">
64
<div id="tabs" class="toptabs">
36
[% UNLESS ( limit ) %]<input type="hidden" name="limit" value="full" />[% END %]
65
  <ul>
37
<select name="order" id="order">
66
      <li><a href="#tabs-container" id="tab_all">All</a></li>
38
67
      <li><a href="#tabs-container" id="tab_checkout">Checkouts</a></li>
39
[% IF ( orderbydate ) %]<option value="" selected="selected">Order by date</option>[% ELSE %]<option value="">Order by date</option>[% END %]
68
      <li><a href="#tabs-container" id="tab_inhouse_use">In-house use</a></li>
40
69
  </ul>
41
[% IF ( orderbytitle ) %]<option value="title" selected="selected">Order by title</option>[% ELSE %]<option value="title">Order by title</option>[% END %]
70
  <div id="tabs-container" style="overflow:hidden">
42
71
    <table id="readingrec">
43
 </select> <input type="submit" value="Go" id="sortsubmit" class="submit clearfix" /></form></div>
72
      <thead>
44
73
        <tr>
45
<ul>
74
          <th style="display:none;">Type</th>
46
75
          <th></th>
47
[% IF ( showfulllink ) %]
76
          <th>Title</th>
48
[% IF ( limit ) %]
77
          <th>Item type</th>
49
<li><a href="/cgi-bin/koha/opac-readingrecord.pl?limit=full[% IF ( orderbytitle ) %]&amp;order=title[% END %]">Show all items</a></li><li class="active"><a href="#readingrec">Showing last 50 items</a></li>
78
          <th>Call no.</th>
50
[% ELSE %]
79
          <th>Date</th>
51
<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 ) %]&amp;order=title[% END %]">Show last 50 items only</a></li>
80
          [% IF ( OPACMySummaryHTML ) %]
52
[% END %]
81
            <th>Links</th>
53
[% ELSE %]
82
          [% END %]
54
<li class="active"><a href="/cgi-bin/koha/opac-readingrecord.pl#readingrec">Showing all items</a></li>
83
        </tr>
55
[% END %]
84
      </thead>
56
</ul>
85
      <tbody>
57
<div class="tabs-container"><table id="readingrec">
86
      [% FOREACH issue IN READING_RECORD %]
58
<tr>
87
        <tr>
59
<th colspan="2">Title</th>
88
          <td style="display:none;">
60
<th>Item type</th>
89
            [% IF issue.inhouse_use %]
61
<th>Call no.</th>
90
              inhouse_use
62
<th>Date</th>
91
            [% ELSE %]
63
[% IF ( OPACMySummaryHTML ) %]
92
              checkout
64
<th>Links</th>
93
            [% END %]
65
[% END %]
94
          </td>
66
</tr>
67
68
[% FOREACH issue IN READING_RECORD %]
69
95
70
[% IF  loop.even  %]<tr class="highlight">[% ELSE %]<tr>[% END %]
71
<td>
96
<td>
72
[% IF  OPACAmazonCoverImages %]
97
[% IF  OPACAmazonCoverImages %]
73
    [% IF  issue.normalized_isbn %]
98
    [% IF  issue.normalized_isbn %]
Lines 130-135 You have never borrowed anything from this library. Link Here
130
</tr>
155
</tr>
131
156
132
[% END %]
157
[% END %]
158
</tbody>
133
</table></div></div>
159
</table></div></div>
134
160
135
[% END %]
161
[% END %]
(-)a/svc/checkouts (-1 / +3 lines)
Lines 62-67 my $sql = ' Link Here
62
        date_due,
62
        date_due,
63
        date_due < now() as date_due_overdue,
63
        date_due < now() as date_due_overdue,
64
64
65
        inhouse_use,
66
65
        biblionumber,
67
        biblionumber,
66
        biblio.title,
68
        biblio.title,
67
        author,
69
        author,
Lines 150-155 while ( my $c = $sth->fetchrow_hashref() ) { Link Here
150
        issuedate           => $c->{issuedate},
152
        issuedate           => $c->{issuedate},
151
        date_due            => $c->{date_due},
153
        date_due            => $c->{date_due},
152
        date_due_overdue    => $c->{date_due_overdue} ? JSON::true : JSON::false,
154
        date_due_overdue    => $c->{date_due_overdue} ? JSON::true : JSON::false,
155
        inhouse_use         => $c->{inhouse_use},
153
        renewals_count      => $renewals_count,
156
        renewals_count      => $renewals_count,
154
        renewals_allowed    => $renewals_allowed,
157
        renewals_allowed    => $renewals_allowed,
155
        renewals_remaining  => $renewals_remaining,
158
        renewals_remaining  => $renewals_remaining,
156
- 

Return to bug 10860