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

(-)a/C4/Circulation.pm (-6 / +12 lines)
Lines 1177-1185 AddIssue does the following things : Link Here
1177
=cut
1177
=cut
1178
1178
1179
sub AddIssue {
1179
sub AddIssue {
1180
    my ( $borrower, $barcode, $datedue, $cancelreserve, $issuedate, $sipmode) = @_;
1180
    my ( $borrower, $barcode, $datedue, $cancelreserve, $issuedate, $sipmode, $params ) = @_;
1181
    my $inhouse_use = $params->{inhouse_use};
1181
    my $dbh = C4::Context->dbh;
1182
    my $dbh = C4::Context->dbh;
1182
	my $barcodecheck=CheckValidBarcode($barcode);
1183
    my $barcodecheck=CheckValidBarcode($barcode);
1184
    $inhouse_use = ( $inhouse_use ? 1 : 0 );
1185
1183
    if ($datedue && ref $datedue ne 'DateTime') {
1186
    if ($datedue && ref $datedue ne 'DateTime') {
1184
        $datedue = dt_from_string($datedue);
1187
        $datedue = dt_from_string($datedue);
1185
    }
1188
    }
Lines 1247-1254 sub AddIssue { Link Here
1247
        my $sth =
1250
        my $sth =
1248
          $dbh->prepare(
1251
          $dbh->prepare(
1249
                "INSERT INTO issues
1252
                "INSERT INTO issues
1250
                    (borrowernumber, itemnumber,issuedate, date_due, branchcode)
1253
                    (borrowernumber, itemnumber,issuedate, date_due, branchcode, inhouse_use)
1251
                VALUES (?,?,?,?,?)"
1254
                VALUES (?,?,?,?,?,?)"
1252
          );
1255
          );
1253
        unless ($datedue) {
1256
        unless ($datedue) {
1254
            my $itype = ( C4::Context->preference('item-level_itypes') ) ? $biblio->{'itype'} : $biblio->{'itemtype'};
1257
            my $itype = ( C4::Context->preference('item-level_itypes') ) ? $biblio->{'itype'} : $biblio->{'itemtype'};
Lines 1256-1267 sub AddIssue { Link Here
1256
1259
1257
        }
1260
        }
1258
        $datedue->truncate( to => 'minute');
1261
        $datedue->truncate( to => 'minute');
1262
1259
        $sth->execute(
1263
        $sth->execute(
1260
            $borrower->{'borrowernumber'},      # borrowernumber
1264
            $borrower->{'borrowernumber'},      # borrowernumber
1261
            $item->{'itemnumber'},              # itemnumber
1265
            $item->{'itemnumber'},              # itemnumber
1262
            $issuedate->strftime('%Y-%m-%d %H:%M:00'), # issuedate
1266
            $issuedate->strftime('%Y-%m-%d %H:%M:00'), # issuedate
1263
            $datedue->strftime('%Y-%m-%d %H:%M:00'),   # date_due
1267
            $datedue->strftime('%Y-%m-%d %H:%M:00'),   # date_due
1264
            C4::Context->userenv->{'branch'}    # branchcode
1268
            C4::Context->userenv->{'branch'},   # branchcode
1269
            $inhouse_use,
1265
        );
1270
        );
1266
        if ( C4::Context->preference('ReturnToShelvingCart') ) { ## ReturnToShelvingCart is on, anything issued should be taken off the cart.
1271
        if ( C4::Context->preference('ReturnToShelvingCart') ) { ## ReturnToShelvingCart is on, anything issued should be taken off the cart.
1267
          CartToShelf( $item->{'itemnumber'} );
1272
          CartToShelf( $item->{'itemnumber'} );
Lines 1302-1308 sub AddIssue { Link Here
1302
        # Record the fact that this book was issued.
1307
        # Record the fact that this book was issued.
1303
        &UpdateStats(
1308
        &UpdateStats(
1304
            C4::Context->userenv->{'branch'},
1309
            C4::Context->userenv->{'branch'},
1305
            'issue', $charge,
1310
            ( $inhouse_use ? 'inhouse_use' : 'issue' ),
1311
            $charge,
1306
            ($sipmode ? "SIP-$sipmode" : ''), $item->{'itemnumber'},
1312
            ($sipmode ? "SIP-$sipmode" : ''), $item->{'itemnumber'},
1307
            $item->{'itype'}, $borrower->{'borrowernumber'}, undef, $item->{'ccode'}
1313
            $item->{'itype'}, $borrower->{'borrowernumber'}, undef, $item->{'ccode'}
1308
        );
1314
        );
(-)a/C4/Items.pm (+6 lines)
Lines 1232-1237 sub GetItemsInfo { Link Here
1232
           holding.branchurl,
1232
           holding.branchurl,
1233
           holding.branchname,
1233
           holding.branchname,
1234
           holding.opac_info as branch_opac_info
1234
           holding.opac_info as branch_opac_info
1235
    ";
1236
    $query .= ", issues.inhouse_use"
1237
        if C4::Context->preference("In-House Use");
1238
    $query .= "
1235
     FROM items
1239
     FROM items
1236
     LEFT JOIN branches AS holding ON items.holdingbranch = holding.branchcode
1240
     LEFT JOIN branches AS holding ON items.holdingbranch = holding.branchcode
1237
     LEFT JOIN branches AS home ON items.homebranch=home.branchcode
1241
     LEFT JOIN branches AS home ON items.homebranch=home.branchcode
Lines 1239-1244 sub GetItemsInfo { Link Here
1239
     LEFT JOIN biblioitems ON biblioitems.biblioitemnumber = items.biblioitemnumber
1243
     LEFT JOIN biblioitems ON biblioitems.biblioitemnumber = items.biblioitemnumber
1240
     LEFT JOIN itemtypes   ON   itemtypes.itemtype         = "
1244
     LEFT JOIN itemtypes   ON   itemtypes.itemtype         = "
1241
     . (C4::Context->preference('item-level_itypes') ? 'items.itype' : 'biblioitems.itemtype');
1245
     . (C4::Context->preference('item-level_itypes') ? 'items.itype' : 'biblioitems.itemtype');
1246
    $query .= " LEFT JOIN issues ON issues.itemnumber = items.itemnumber"
1247
        if C4::Context->preference("In-House Use");
1242
    $query .= " WHERE items.biblionumber = ? ORDER BY home.branchname, items.enumchron, LPAD( items.copynumber, 8, '0' ), items.dateaccessioned DESC" ;
1248
    $query .= " WHERE items.biblionumber = ? ORDER BY home.branchname, items.enumchron, LPAD( items.copynumber, 8, '0' ), items.dateaccessioned DESC" ;
1243
    my $sth = $dbh->prepare($query);
1249
    my $sth = $dbh->prepare($query);
1244
    $sth->execute($biblionumber);
1250
    $sth->execute($biblionumber);
(-)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 323-335 if ($barcode) { Link Here
323
        }
325
        }
324
    }
326
    }
325
327
326
    delete $question->{'DEBT'} if ($debt_confirmed);
328
    unless( $query->param('inhouse_use') and C4::Context->preference("In-House Use Force") ) {
327
    foreach my $impossible ( keys %$error ) {
329
        delete $question->{'DEBT'} if ($debt_confirmed);
328
        $template->param(
330
        foreach my $impossible ( keys %$error ) {
329
            $impossible => $$error{$impossible},
331
            $template->param(
330
            IMPOSSIBLE  => 1
332
                $impossible => $$error{$impossible},
331
        );
333
                IMPOSSIBLE  => 1
332
        $blocker = 1;
334
            );
335
            $blocker = 1;
336
        }
333
    }
337
    }
334
    if( !$blocker ){
338
    if( !$blocker ){
335
        my $confirm_required = 0;
339
        my $confirm_required = 0;
Lines 345-357 if ($barcode) { Link Here
345
                    $needsconfirmation => $$question{$needsconfirmation},
349
                    $needsconfirmation => $$question{$needsconfirmation},
346
                    getTitleMessageIteminfo => $getmessageiteminfo->{'title'},
350
                    getTitleMessageIteminfo => $getmessageiteminfo->{'title'},
347
                    getBarcodeMessageIteminfo => $getmessageiteminfo->{'barcode'},
351
                    getBarcodeMessageIteminfo => $getmessageiteminfo->{'barcode'},
348
                    NEEDSCONFIRMATION  => 1
352
                    NEEDSCONFIRMATION  => 1,
353
                    inhouse_use => $query->param('inhouse_use'),
349
                );
354
                );
350
                $confirm_required = 1;
355
                $confirm_required = 1;
351
            }
356
            }
352
        }
357
        }
353
        unless($confirm_required) {
358
        unless($confirm_required) {
354
            AddIssue( $borrower, $barcode, $datedue, $cancelreserve );
359
            my $inhouse_use = $query->param('inhouse_use');
360
            AddIssue( $borrower, $barcode, $datedue, $cancelreserve, undef, undef, { inhouse_use => $inhouse_use } );
355
            $inprocess = 1;
361
            $inprocess = 1;
356
        }
362
        }
357
    }
363
    }
Lines 780-785 $template->param( Link Here
780
    export_remove_fields      => C4::Context->preference("ExportRemoveFields"),
786
    export_remove_fields      => C4::Context->preference("ExportRemoveFields"),
781
    export_with_csv_profile   => C4::Context->preference("ExportWithCsvProfile"),
787
    export_with_csv_profile   => C4::Context->preference("ExportWithCsvProfile"),
782
    canned_bor_notes_loop     => $canned_notes,
788
    canned_bor_notes_loop     => $canned_notes,
789
    todaysdate                => dt_from_string()->set(hour => 23)->set(minute => 59),
790
    inhouse_use_feature       => C4::Context->preference("In-House Use"),
791
    inhouse_use_forced        => C4::Context->preference("In-House Use Force"),
783
);
792
);
784
793
785
output_html_with_http_headers $query, $cookie, $template->output;
794
output_html_with_http_headers $query, $cookie, $template->output;
(-)a/installer/data/mysql/kohastructure.sql (+2 lines)
Lines 1097-1102 CREATE TABLE `issues` ( -- information related to check outs or issues Link Here
1097
  `renewals` tinyint(4) default NULL, -- lists the number of times the item was renewed
1097
  `renewals` tinyint(4) default NULL, -- lists the number of times the item was renewed
1098
  `timestamp` timestamp NOT NULL default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP, -- the date and time this record was last touched
1098
  `timestamp` timestamp NOT NULL default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP, -- the date and time this record was last touched
1099
  `issuedate` datetime default NULL, -- date the item was checked out or issued
1099
  `issuedate` datetime default NULL, -- date the item was checked out or issued
1100
  `inhouse_use` int(1) NOT NULL default 0, -- in house use flag
1100
  KEY `issuesborridx` (`borrowernumber`),
1101
  KEY `issuesborridx` (`borrowernumber`),
1101
  KEY `itemnumber_idx` (`itemnumber`),
1102
  KEY `itemnumber_idx` (`itemnumber`),
1102
  KEY `branchcode_idx` (`branchcode`),
1103
  KEY `branchcode_idx` (`branchcode`),
Lines 1560-1565 CREATE TABLE `old_issues` ( -- lists items that were checked out and have been r Link Here
1560
  `renewals` tinyint(4) default NULL, -- lists the number of times the item was renewed
1561
  `renewals` tinyint(4) default NULL, -- lists the number of times the item was renewed
1561
  `timestamp` timestamp NOT NULL default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP, -- the date and time this record was last touched
1562
  `timestamp` timestamp NOT NULL default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP, -- the date and time this record was last touched
1562
  `issuedate` datetime default NULL, -- date the item was checked out or issued
1563
  `issuedate` datetime default NULL, -- date the item was checked out or issued
1564
  `inhouse_use` int(1) NOT NULL default 0, -- in house use flag
1563
  KEY `old_issuesborridx` (`borrowernumber`),
1565
  KEY `old_issuesborridx` (`borrowernumber`),
1564
  KEY `old_issuesitemidx` (`itemnumber`),
1566
  KEY `old_issuesitemidx` (`itemnumber`),
1565
  KEY `branchcode_idx` (`branchcode`),
1567
  KEY `branchcode_idx` (`branchcode`),
(-)a/installer/data/mysql/sysprefs.sql (+2 lines)
Lines 134-139 INSERT INTO systempreferences ( `variable`, `value`, `options`, `explanation`, ` Link Here
134
('ImageLimit','5','','Limit images stored in the database by the Patron Card image manager to this number.','Integer'),
134
('ImageLimit','5','','Limit images stored in the database by the Patron Card image manager to this number.','Integer'),
135
('IncludeSeeFromInSearches','0','','Include see-from references in searches.','YesNo'),
135
('IncludeSeeFromInSearches','0','','Include see-from references in searches.','YesNo'),
136
('IndependentBranches','0',NULL,'If ON, increases security between libraries','YesNo'),
136
('IndependentBranches','0',NULL,'If ON, increases security between libraries','YesNo'),
137
('In-House use','0','','Enable/Disable the in-house use feature','YesNo'),
138
('In-House use Force','0','','Enable/Disable the in-house for all cases (Even if a user is debarred, etc.)','YesNo'),
137
('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'),
139
('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'),
138
('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'),
140
('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'),
139
('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'),
141
('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 (+30 lines)
Lines 7330-7335 if ( CheckVersion($DBversion) ) { Link Here
7330
    SetVersion($DBversion);
7330
    SetVersion($DBversion);
7331
}
7331
}
7332
7332
7333
7334
7335
7336
7337
7338
7339
7340
7341
$DBversion = "3.13.00.XXX";
7342
if ( C4::Context->preference("Version") < TransformToNum($DBversion) ) {
7343
    $dbh->do(q{
7344
        INSERT IGNORE INTO systempreferences
7345
            (variable,value,explanation,options,type)
7346
            VALUES('In-House use','0','Enable/Disable the in-house use feature','','YesNo');
7347
    });
7348
    $dbh->do(q{
7349
        INSERT IGNORE INTO systempreferences
7350
            (variable,value,explanation,options,type)
7351
            VALUES('In-House use Force','0','Enable/Disable the in-house for all cases (Even if a user is debarred, etc.)','','YesNo');
7352
    });
7353
    $dbh->do(q{
7354
        ALTER TABLE issues ADD COLUMN inhouse_use INT(1) NOT NULL DEFAULT 0 AFTER issuedate;
7355
    });
7356
    $dbh->do(q{
7357
        ALTER TABLE old_issues ADD COLUMN inhouse_use INT(1) NOT NULL DEFAULT 0 AFTER issuedate;
7358
    });
7359
    print "Upgrade to $DBversion done (Bug 10860: Add new system preference In-House use + fields [old_]issues.inhouse_use)\n";
7360
    SetVersion($DBversion);
7361
}
7362
7333
=head1 FUNCTIONS
7363
=head1 FUNCTIONS
7334
7364
7335
=head2 TableExists($table)
7365
=head2 TableExists($table)
(-)a/koha-tmpl/intranet-tmpl/prog/en/css/staff-global.css (+15 lines)
Lines 978-983 tr.highlight th[scope=row] { Link Here
978
    padding : 1px;
978
    padding : 1px;
979
}
979
}
980
980
981
.inhouse_use-select {
982
    font-size : 85%;
983
    font-weight: normal;
984
    padding-top : .3em;
985
}
986
#circ_circulation_issue .inhouse_use-select label,
987
.inhouse_use-select label {
988
    font-size : inherit;
989
    font-weight: normal;
990
}
991
981
tr.expired td {
992
tr.expired td {
982
	color : #999999;
993
	color : #999999;
983
}
994
}
Lines 2705-2707 span.browse-button { Link Here
2705
#merge_table tr.active td {
2716
#merge_table tr.active td {
2706
    background-color: #FFFFCC;
2717
    background-color: #FFFFCC;
2707
}
2718
}
2719
2720
span.inhouse_use {
2721
    color: red;
2722
}
(-)a/koha-tmpl/intranet-tmpl/prog/en/js/datatables.js (-4 / +12 lines)
Lines 173-181 function dt_add_type_uk_date() { Link Here
173
173
174
  jQuery.fn.dataTableExt.oSort['uk_date-asc']  = function(a,b) {
174
  jQuery.fn.dataTableExt.oSort['uk_date-asc']  = function(a,b) {
175
    var re = /(\d{2}\/\d{2}\/\d{4})/;
175
    var re = /(\d{2}\/\d{2}\/\d{4})/;
176
    a.match(re);
176
    if ( !a.match(re) ) {
177
        return 1;
178
    }
177
    var ukDatea = RegExp.$1.split("/");
179
    var ukDatea = RegExp.$1.split("/");
178
    b.match(re);
180
    if ( !b.match(re) ) {
181
        return -1;
182
    }
179
    var ukDateb = RegExp.$1.split("/");
183
    var ukDateb = RegExp.$1.split("/");
180
184
181
    var x = (ukDatea[2] + ukDatea[1] + ukDatea[0]) * 1;
185
    var x = (ukDatea[2] + ukDatea[1] + ukDatea[0]) * 1;
Lines 186-194 function dt_add_type_uk_date() { Link Here
186
190
187
  jQuery.fn.dataTableExt.oSort['uk_date-desc'] = function(a,b) {
191
  jQuery.fn.dataTableExt.oSort['uk_date-desc'] = function(a,b) {
188
    var re = /(\d{2}\/\d{2}\/\d{4})/;
192
    var re = /(\d{2}\/\d{2}\/\d{4})/;
189
    a.match(re);
193
    if ( !a.match(re) ) {
194
        return -1;
195
    }
190
    var ukDatea = RegExp.$1.split("/");
196
    var ukDatea = RegExp.$1.split("/");
191
    b.match(re);
197
    if ( !b.match(re) ) {
198
        return 1
199
    }
192
    var ukDateb = RegExp.$1.split("/");
200
    var ukDateb = RegExp.$1.split("/");
193
201
194
    var x = (ukDatea[2] + ukDatea[1] + ukDatea[0]) * 1;
202
    var x = (ukDatea[2] + ukDatea[1] + ukDatea[0]) * 1;
(-)a/koha-tmpl/intranet-tmpl/prog/en/js/pages/circulation.js (-1 / +5 lines)
Lines 85-90 $(document).ready(function() { Link Here
85
          });
85
          });
86
        }
86
        }
87
    });
87
    });
88
89
    toggle_inhouse_use();
90
    $("#inhouse_use").click(function(){
91
        toggle_inhouse_use();
92
    });
88
});
93
});
89
94
90
function export_checkouts(format) {
95
function export_checkouts(format) {
Lines 114-120 function export_checkouts(format) { Link Here
114
119
115
    /* Reset form action to its initial value */
120
    /* Reset form action to its initial value */
116
    document.issues.action="/cgi-bin/koha/reserve/renewscript.pl";
121
    document.issues.action="/cgi-bin/koha/reserve/renewscript.pl";
117
118
}
122
}
119
123
120
function validate1(date) {
124
function validate1(date) {
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/circulation.pref (+12 lines)
Lines 344-349 Circulation: Link Here
344
                  no: "Don't"
344
                  no: "Don't"
345
            - calculate and update overdue charges when an item is returned.
345
            - calculate and update overdue charges when an item is returned.
346
            - <br /><b>NOTE If you are doing hourly loans then you should have this on.</b>
346
            - <br /><b>NOTE If you are doing hourly loans then you should have this on.</b>
347
        -
348
            - pref: In-House use
349
              choices:
350
                  yes: Enable
351
                  no: Disable
352
            - the in-house use feature.
353
        -
354
            - pref: In-House use Force
355
              choices:
356
                  yes: Enable
357
                  no: Disable
358
            - the in-house for all cases (Even if a user is debarred, etc.).
347
    Holds Policy:
359
    Holds Policy:
348
        -
360
        -
349
            - pref: AllowHoldPolicyOverride
361
            - pref: AllowHoldPolicyOverride
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt (+8 lines)
Lines 442-450 function verify_images() { Link Here
442
                    <td class="status">
442
                    <td class="status">
443
443
444
                        [% IF ( item.datedue ) %]
444
                        [% IF ( item.datedue ) %]
445
                          [% IF inhouse_use %]
446
                            <span>Currently in local use
447
                          [% ELSE %]
445
                            <span class="datedue">Checked out
448
                            <span class="datedue">Checked out
449
                          [% END %]
446
                                [% UNLESS ( item.NOTSAMEBRANCH ) %]
450
                                [% UNLESS ( item.NOTSAMEBRANCH ) %]
451
                                  [% IF inhouse_use %]
452
                                    by <a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% item.borrowernumber %]">
453
                                  [% ELSE %]
447
                                    to <a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% item.borrowernumber %]">
454
                                    to <a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% item.borrowernumber %]">
455
                                  [% END %]
448
                                        [% IF ( item.hidepatronname ) %]
456
                                        [% IF ( item.hidepatronname ) %]
449
                                            [% item.cardnumber %]
457
                                            [% item.cardnumber %]
450
                                        [% ELSE %]
458
                                        [% ELSE %]
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tt (-14 / +66 lines)
Lines 93-99 var MSG_EXPORT_SELECT_CHECKOUTS = _("You must select checkout(s) to export"); Link Here
93
    } ).attr( 'checked', false );
93
    } ).attr( 'checked', false );
94
    [% END %]
94
    [% END %]
95
    [% END %]
95
    [% END %]
96
96
 });
97
 });
98
99
// In-house use
100
function toggle_inhouse_use(){
101
    if ( $("#inhouse_use").attr('checked') ) {
102
        $("#duedatespec").val("[% todaysdate | $KohaDates with_hours => 1%]")
103
        $("#duedatespec").datetimepicker('destroy');
104
    } else {
105
        $("#duedatespec").datetimepicker({
106
            onClose: function(dateText, inst) { $("#barcode").focus(); },
107
            hour: 23,
108
            minute: 59
109
        });
110
    }
111
}
112
97
//]]>
113
//]]>
98
</script>
114
</script>
99
</head>
115
</head>
Lines 293-298 var MSG_EXPORT_SELECT_CHECKOUTS = _("You must select checkout(s) to export"); Link Here
293
    [% ELSE %]
309
    [% ELSE %]
294
    <input type="submit" class="approve" value="Yes, Check Out (Y)" accesskey="y" />
310
    <input type="submit" class="approve" value="Yes, Check Out (Y)" accesskey="y" />
295
    [% END %]
311
    [% END %]
312
    <input type="hidden" name="inhouse_use" value="[% inhouse_use %]" />
296
</form>
313
</form>
297
314
298
<form method="get" action="/cgi-bin/koha/circ/circulation.pl">
315
<form method="get" action="/cgi-bin/koha/circ/circulation.pl">
Lines 462-468 No patron matched <span class="ex">[% message %]</span> Link Here
462
479
463
[% IF ( borrowernumber ) %]
480
[% IF ( borrowernumber ) %]
464
<div class="yui-g">
481
<div class="yui-g">
465
[% UNLESS ( noissues ) %]
482
[% IF !noissues || inhouse_use_forced %]
466
[% IF ( flagged ) %]
483
[% IF ( flagged ) %]
467
<div class="yui-u first">
484
<div class="yui-u first">
468
[% ELSE %]
485
[% ELSE %]
Lines 499-505 No patron matched <span class="ex">[% message %]</span> Link Here
499
<input type="checkbox" id="stickyduedate" onclick="this.form.barcode.focus();" name="stickyduedate" />
516
<input type="checkbox" id="stickyduedate" onclick="this.form.barcode.focus();" name="stickyduedate" />
500
[% END %]
517
[% END %]
501
          <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;" />
518
          <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;" />
502
</div>[% END %]
519
</div>
520
[% END %]
521
522
      [% IF inhouse_use_feature %]
523
        <div class="inhouse_use-select">
524
          [% IF noissues %]
525
            <input type="checkbox" id="inhouse_use" name="inhouse_use_forced" checked="checked" disabled="disabled" /> <label for="inhouse_use">In-house use</label>
526
            <input type="hidden" name="inhouse_use" checked="checked" value="1" />
527
          [% ELSE %]
528
            <input type="checkbox" id="inhouse_use" name="inhouse_use" /> <label for="inhouse_use">In-house use</label>
529
          [% END %]
530
        </div>
531
      [% END %]
532
503
          <input type="hidden" name="borrowernumber" id="borrowernumber" value="[% borrowernumber %]" />
533
          <input type="hidden" name="borrowernumber" id="borrowernumber" value="[% borrowernumber %]" />
504
          <input type="hidden" name="branch" value="[% branch %]" />
534
          <input type="hidden" name="branch" value="[% branch %]" />
505
          <input type="hidden" name="printer" value="[% printer %]" />
535
          <input type="hidden" name="printer" value="[% printer %]" />
Lines 514-530 No patron matched <span class="ex">[% message %]</span> Link Here
514
544
515
[% IF ( noissues ) %]<div>[% ELSE %]<div class="yui-u">[% END %]
545
[% IF ( noissues ) %]<div>[% ELSE %]<div class="yui-u">[% END %]
516
546
517
    [% IF ( flagged ) %]
547
    [% IF flagged %]
518
		[% IF ( noissues ) %]
548
      [% IF NOT noissues || ( noissues && inhouse_use_forced ) %]
519
		<h4>Checking out to [% INCLUDE 'patron-title.inc' %]</h4>
520
        <div id="circmessages" class="circmessage warning">
521
		[% ELSE %]
522
        <div id="circmessages" class="circmessage attention">
549
        <div id="circmessages" class="circmessage attention">
523
		[% END %]
550
      [% ELSE %]
551
        <h4>Checking out to [% INCLUDE 'patron-title.inc' %]</h4>
552
        <div id="circmessages" class="circmessage warning">
553
      [% END %]
554
      <h3>
555
        [% IF noissues %]
556
          Cannot check out!
557
          [% IF inhouse_use_forced %]
558
            <span style="color:red;">Only in-house use is allowed</span>
559
          [% END %]
560
        [% ELSE %]
561
          Attention:
562
        [% END %]
563
      </h3>
524
564
525
		<h3>[% IF ( noissues ) %]
526
		        Cannot check out!
527
		[% ELSE %]Attention:[% END %]</h3>
528
		<ul>
565
		<ul>
529
566
530
			[% IF ( warndeparture ) %]
567
			[% IF ( warndeparture ) %]
Lines 711-717 No patron matched <span class="ex">[% message %]</span> Link Here
711
                <span class="dmg">[% KohaAuthorisedValues.GetByCode( 'DAMAGED', todayissue.damaged ) %]</span>
748
                <span class="dmg">[% KohaAuthorisedValues.GetByCode( 'DAMAGED', todayissue.damaged ) %]</span>
712
            [% END %]
749
            [% END %]
713
        </td>
750
        </td>
714
        <td><a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=[% todayissue.biblionumber %]&amp;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 %]&amp;itemnumber=[% todayissue.itemnumber %]#item[% todayissue.itemnumber %]">[% todayissue.barcode %]</a></td>
751
        <td>
752
          <a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=[% todayissue.biblionumber %]&amp;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 %]&amp;itemnumber=[% todayissue.itemnumber %]#item[% todayissue.itemnumber %]">[% todayissue.barcode %]</a>
753
          [% IF todayissue.inhouse_use %]
754
            <span class="inhouse_use">(In-house use)</span>
755
          [% END %]
756
        </td>
715
        <td>[% UNLESS ( noItemTypeImages ) %] [% IF ( todayissue.itemtype_image ) %]<img src="[% todayissue.itemtype_image %]" alt="" />[% END %][% END %][% todayissue.itemtype %]</td>
757
        <td>[% UNLESS ( noItemTypeImages ) %] [% IF ( todayissue.itemtype_image ) %]<img src="[% todayissue.itemtype_image %]" alt="" />[% END %][% END %][% todayissue.itemtype %]</td>
716
        <td><span title="[% todayissue.displaydate_sort %]">[% todayissue.checkoutdate %]</span></td>
758
        <td><span title="[% todayissue.displaydate_sort %]">[% todayissue.checkoutdate %]</span></td>
717
        [% IF ( todayissue.multiple_borrowers ) %]<td>[% todayissue.firstname %] [% todayissue.surname %]</td>[% END %]
759
        [% IF ( todayissue.multiple_borrowers ) %]<td>[% todayissue.firstname %] [% todayissue.surname %]</td>[% END %]
Lines 798-804 No patron matched <span class="ex">[% message %]</span> Link Here
798
                <span class="dmg">[% KohaAuthorisedValues.GetByCode( 'DAMAGED', previssue.damaged ) %]</span>
840
                <span class="dmg">[% KohaAuthorisedValues.GetByCode( 'DAMAGED', previssue.damaged ) %]</span>
799
            [% END %]
841
            [% END %]
800
        </td>
842
        </td>
801
        <td><a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=[% previssue.biblionumber %]&amp;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 %]&amp;itemnumber=[% previssue.itemnumber %]#item[% previssue.itemnumber %]">[% previssue.barcode %]</a></td>
843
        <td>
844
          <a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=[% previssue.biblionumber %]&amp;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 %]&amp;itemnumber=[% previssue.itemnumber %]#item[% previssue.itemnumber %]">[% previssue.barcode %]</a></td>
845
          [% IF previssue.inhouse_use %]
846
            <span class="inhouse_use">(In-house use)</span>
847
          [% END %]
848
        </td>
802
        <td>
849
        <td>
803
            [% previssue.itemtype %]
850
            [% previssue.itemtype %]
804
        </td>
851
        </td>
Lines 939-945 No patron matched <span class="ex">[% message %]</span> Link Here
939
                <span class="dmg">[% KohaAuthorisedValues.GetByCode( 'DAMAGED', relissue.damaged ) %]</span>
986
                <span class="dmg">[% KohaAuthorisedValues.GetByCode( 'DAMAGED', relissue.damaged ) %]</span>
940
            [% END %]
987
            [% END %]
941
        </td>
988
        </td>
942
        <td><a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=[% relissue.biblionumber %]&amp;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 %]&amp;itemnumber=[% relissue.itemnumber %]#item[% relissue.itemnumber %]">[% relissue.barcode %]</a></td>
989
        <td>
990
          <a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=[% relissue.biblionumber %]&amp;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 %]&amp;itemnumber=[% relissue.itemnumber %]#item[% relissue.itemnumber %]">[% relissue.barcode %]</a></td>
991
          [% IF relissue.inhouse_use %]
992
            <span class="inhouse_use">(In-house use)</span>
993
          [% END %]
994
        </td>
943
        <td>[% UNLESS ( noItemTypeImages ) %] [% IF ( relissue.itemtype_image ) %]<img src="[% relissue.itemtype_image %]" alt="" />[% END %][% END %][% relissue.itemtype %]</td>
995
        <td>[% UNLESS ( noItemTypeImages ) %] [% IF ( relissue.itemtype_image ) %]<img src="[% relissue.itemtype_image %]" alt="" />[% END %][% END %][% relissue.itemtype %]</td>
944
        <td><span title="[% relissue.displaydate_sort %]">[% relissue.displaydate %]</span></td>
996
        <td><span title="[% relissue.displaydate_sort %]">[% relissue.displaydate %]</span></td>
945
        <td>[% relissue.issuingbranchname %]</td>
997
        <td>[% relissue.issuingbranchname %]</td>
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/members/readingrec.tt (-47 / +77 lines)
Lines 3-23 Link Here
3
<title>Circulation History for [% INCLUDE 'patron-title.inc' %]</title>
3
<title>Circulation History for [% INCLUDE 'patron-title.inc' %]</title>
4
[% INCLUDE 'doc-head-close.inc' %]
4
[% INCLUDE 'doc-head-close.inc' %]
5
<link rel="stylesheet" type="text/css" href="[% interface %]/[% theme %]/en/css/datatables.css" />
5
<link rel="stylesheet" type="text/css" href="[% interface %]/[% theme %]/en/css/datatables.css" />
6
<script type="text/javascript" src="[% interface %]/[% theme %]/en/lib/jquery/plugins/jquery.dataTables.min.js"></script>
6
<script type="text/javascript" src="[% themelang %]/lib/jquery/plugins/jquery.dataTables.min.js"></script>
7
[% INCLUDE 'datatables-strings.inc' %]
7
[% INCLUDE 'datatables-strings.inc' %]
8
<script type="text/javascript" src="[% interface %]/[% theme %]/en/js/datatables.js"></script>
8
<script type="text/javascript" src="[% themelang %]/js/datatables.js"></script>
9
<script type="text/javascript" id="js">
9
<script type="text/javascript" id="js">
10
//<![CDATA[
10
//<![CDATA[
11
11
12
 $(document).ready(function() {
12
 $(document).ready(function() {
13
    [% IF (dateformat == 'metric') %]
13
    [% IF dateformat == 'metric' %]
14
        dt_add_type_uk_date();
14
        dt_add_type_uk_date();
15
    [% END %]
15
    [% END %]
16
    $("#table_readingrec").dataTable($.extend(true, {}, dataTablesDefaults, {
16
    var table = $("#table_readingrec").dataTable($.extend(true, {}, dataTablesDefaults, {
17
        "sPaginationType": "four_button",
17
        "sPaginationType": "four_button",
18
        "aaSorting": [],
18
        "aaSorting": [],
19
        "aoColumns": [
19
        "aoColumns": [
20
            null,
20
            null,
21
            null,
21
            { "sType": "anti-the" },
22
            { "sType": "anti-the" },
22
            null,
23
            null,
23
            null,
24
            null,
Lines 29-34 Link Here
29
            { "sType": "title-string" }
30
            { "sType": "title-string" }
30
        ]
31
        ]
31
    }));
32
    }));
33
    var tabs = $("#tabs").tabs({
34
        select: function(e, ui) {
35
            var id = $(ui.tab).attr("id");
36
            if ( id == "tab_checkout" ) {
37
                table.fnFilter("checkout", 0);
38
            } else if ( id == "tab_inhouse_use" ) {
39
                table.fnFilter("inhouse_use", 0);
40
            } else { // all
41
                table.fnFilter('', 0);
42
            }
43
        }
44
    });
32
 });
45
 });
33
//]]>
46
//]]>
34
</script>
47
</script>
Lines 50-106 Link Here
50
<form action="/cgi-bin/koha/members/readingrec.pl" method="get"><input type="hidden" name="borrowernumber" id="borrowernumber" value="[% borrowernumber %]" /></form>
63
<form action="/cgi-bin/koha/members/readingrec.pl" method="get"><input type="hidden" name="borrowernumber" id="borrowernumber" value="[% borrowernumber %]" /></form>
51
64
52
65
53
<table id="table_readingrec">
66
<div id="tabs" class="toptabs">
54
<thead>
67
  <ul>
55
    <th>Date</th>
68
    <li><a href="#readingrec" id="tab_all">All</a></li>
56
	<th>Title</th>
69
    <li><a href="#readingrec" id="tab_checkout">Checkouts</a></li>
57
	<th>Author</th>
70
    <li><a href="#readingrec" id="tab_inhouse_use">In-house use</a></li>
58
    <th>Call no.</th>
71
  </ul>
59
	<th>Barcode</th>
72
  <div id="readingrec" style="overflow:hidden">
60
    <th>Number of renewals</th>
73
    <table id="table_readingrec">
61
	<th>Checked out on</th>
74
      <thead>
62
	<th>Checked out from</th>
75
        <th style="display:none;">Type</th>
63
    <th>Date due</th>
76
        <th>Date</th>
64
    <th>Return date</th>
77
        <th>Title</th>
65
</thead>
78
        <th>Author</th>
66
[% FOREACH issue IN loop_reading %]
79
        <th>Call no.</th>
67
    [% IF  issue.returndate  %]<tr>[% ELSE %]<tr class="onissue">[% END %]
80
        <th>Barcode</th>
68
        <td>
81
        <th>Number of renewals</th>
69
            [% issue.issuestimestamp | $KohaDates %]
82
        <th>Checked out on</th>
70
        </td>
83
        <th>Checked out from</th>
71
        <td><a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=[% issue.biblionumber %]">[% issue.title |html %]</a></td>
84
        <th>Date due</th>
85
        <th>Return date</th>
86
      </thead>
87
      <tbody>
88
      [% FOREACH issue IN loop_reading %]
89
        [% IF  issue.returndate  %]<tr>[% ELSE %]<tr class="onissue">[% END %]
90
          <td style="display:none;">
91
            [% IF issue.inhouse_use %]
92
              inhouse_use
93
            [% ELSE %]
94
              checkout
95
            [% END %]
96
          </td>
97
          <td>
98
            <span title="[% issue.issuestimestamp %]">[% issue.issuestimestamp | $KohaDates %]</span>
99
          </td>
100
          <td><a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=[% issue.biblionumber %]">[% issue.title |html %]</a></td>
72
101
73
        <td>[% issue.author %]</td>
102
          <td>[% issue.author %]</td>
74
103
75
        <td>
104
          <td>
76
            [% IF issue.classification %]
105
            [% IF issue.classification %]
77
                [% issue.classification %]
106
                [% issue.classification %]
78
            [% ELSE %]
107
            [% ELSE %]
79
                [% issue.itemcallnumber %]
108
                [% issue.itemcallnumber %]
80
            [% END %]
109
            [% END %]
81
       </td>
110
          </td>
82
83
        <td>[% issue.barcode %]</td>
84
111
85
            <td>
112
          <td>[% issue.barcode %]</td>
86
        [% issue.renewals %]</td>
113
          <td>[% issue.renewals %]</td>
87
            <td>
114
          <td>[% issue.issuedate | $KohaDates %]</td>
88
        [% issue.issuedate | $KohaDates %]</td>
115
          <td>[% issue.issuingbranch %]</td>
89
            <td>
116
          <td>
90
        [% issue.issuingbranch %]</td>
117
            [% IF issue.date_due %]
91
			<td>[% IF issue.date_due %]
118
              [% issue.date_due | $KohaDates %]
92
                    [% issue.date_due | $KohaDates %]
119
            [% ELSE %]&nbsp;[% END %]
93
                [% ELSE %]&nbsp;[% END %]</td>
120
          </td>
94
            <td>
121
          <td>
95
                [% IF  issue.returndate %]
122
            [% IF  issue.returndate %]
96
                    <span title="[% issue.returndate %]">[% issue.returndate | $KohaDates %]</span>
123
              <span title="[% issue.returndate %]">[% issue.returndate | $KohaDates %]</span>
97
                [% ELSE %]
124
            [% ELSE %]
98
                    <span title="Checked Out"><small>Checked Out</small></span>
125
              <span title="Checked Out"><small>Checked Out</small></span>
99
                [% END %]
126
            [% END %]
100
            </td>
127
          </td>
101
</tr>
128
        </tr>
102
[% END %]
129
      [% END %]
103
</table>
130
      </tbody>
131
    </table>
132
  </div>
133
</div>
104
[% ELSE %]
134
[% ELSE %]
105
<div class="dialog message">This patron has no circulation history.</div>
135
<div class="dialog message">This patron has no circulation history.</div>
106
[% END %]
136
[% END %]
(-)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 12-22 Link Here
12
        [% END %]
12
        [% END %]
13
    [% END %]
13
    [% END %]
14
[% ELSIF ( item.datedue ) %]
14
[% ELSIF ( item.datedue ) %]
15
  [% IF inhouse_use %]
16
    [% IF ( OPACShowCheckoutName ) %]
17
        Currently in local use by [% item.cardnumber %] [% item.firstname %] [% item.surname %]
18
    [% ELSE %]
19
        Currently in local use
20
    [% END %]
21
  [% ELSE %]
15
    [% IF ( OPACShowCheckoutName ) %]
22
    [% IF ( OPACShowCheckoutName ) %]
16
        Checked out to [% item.cardnumber %] [% item.firstname %] [% item.surname %]
23
        Checked out to [% item.cardnumber %] [% item.firstname %] [% item.surname %]
17
    [% ELSE %]
24
    [% ELSE %]
18
        Checked out
25
        Checked out
19
    [% END %]
26
    [% END %]
27
  [% END %]
20
[% ELSIF ( item.transfertwhen ) %]
28
[% ELSIF ( item.transfertwhen ) %]
21
    In transit from [% item.transfertfrom %]
29
    In transit from [% item.transfertfrom %]
22
    to [% item.transfertto %] since [% item.transfertwhen %]
30
    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 2-16 Link Here
2
[% USE KohaDates %]
2
[% USE KohaDates %]
3
[% INCLUDE 'doc-head-open.inc' %][% LibraryNameTitle or "Koha online" %] catalog &rsaquo; Your checkout history
3
[% INCLUDE 'doc-head-open.inc' %][% LibraryNameTitle or "Koha online" %] catalog &rsaquo; Your checkout history
4
[% INCLUDE 'doc-head-close.inc' %]
4
[% INCLUDE 'doc-head-close.inc' %]
5
<style type="text/css">ul.ui-tabs-nav li a, ul.ui-tabs-nav li span.a  { padding:0.6em 1em; }</style>
5
<link rel="stylesheet" href="[% themelang %]/css/datatables.css" />
6
[% INCLUDE 'datatables.inc' %]
6
<script type="text/javascript">
7
<script type="text/javascript">
7
//<![CDATA[
8
//<![CDATA[
8
$(document).ready(function(){
9
$(document).ready(function(){
9
    [% IF ( GoogleJackets ) %]KOHA.Google.GetCoverFromIsbn();[% END %]
10
    [% IF ( GoogleJackets ) %]KOHA.Google.GetCoverFromIsbn();[% END %]
10
        $('#sortsubmit').hide();
11
    $('#sortsubmit').hide();
11
    $('#order').change(function() {
12
    $('#order').change(function() {
12
        $('#sortform').submit();
13
        $('#sortform').submit();
13
    });
14
    });
15
16
    var table = $("#readingrec").dataTable($.extend(true, {}, dataTablesDefaults, {
17
        "sPaginationType": "four_button",
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
    });
14
});
31
});
15
//]]>
32
//]]>
16
</script>
33
</script>
Lines 30-72 $(document).ready(function(){ Link Here
30
You have never borrowed anything from this library.
47
You have never borrowed anything from this library.
31
[% ELSE %]
48
[% ELSE %]
32
<div id="opac-user-readingrec" class="statictabs">
49
<div id="opac-user-readingrec" class="statictabs">
50
  <p>
51
    [% IF showfulllink %]
52
      [% IF limit %]
53
        <a href="/cgi-bin/koha/opac-readingrecord.pl?limit=full">Show All Items</a> | Showing Last 50 Items
54
      [% ELSE %]
55
        Showing All Items | <a href="/cgi-bin/koha/opac-readingrecord.pl?limit=50">Show Last 50 Items Only</a>
56
      [% END %]
57
    [% ELSE %]
58
        Showing All Items
59
    [% END %]
60
  </p>
61
</div>
33
62
34
<div class="resultscontrol resort"> <form id="sortform" action="/cgi-bin/koha/opac-readingrecord.pl" method="get">
63
<div id="tabs" class="toptabs">
35
[% UNLESS ( limit ) %]<input type="hidden" name="limit" value="full" />[% END %]
64
  <ul>
36
<select name="order" id="order">
65
      <li><a href="#tabs-container" id="tab_all">All</a></li>
37
66
      <li><a href="#tabs-container" id="tab_checkout">Checkouts</a></li>
38
[% IF ( orderbydate ) %]<option value="" selected="selected">Order by date</option>[% ELSE %]<option value="">Order by date</option>[% END %]
67
      <li><a href="#tabs-container" id="tab_inhouse_use">In-house use</a></li>
39
68
  </ul>
40
[% IF ( orderbytitle ) %]<option value="title" selected="selected">Order by title</option>[% ELSE %]<option value="title">Order by title</option>[% END %]
69
  <div id="tabs-container" style="overflow:hidden">
41
70
    <table id="readingrec">
42
 </select> <input type="submit" value="Go" id="sortsubmit" class="submit clearfix" /></form></div>
71
      <thead>
43
72
        <tr>
44
<ul>
73
          <th style="display:none;">Type</th>
45
74
          <th></th>
46
[% IF ( showfulllink ) %]
75
          <th>Title</th>
47
[% IF ( limit ) %]
76
          <th>Item type</th>
48
<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>
77
          <th>Call no.</th>
49
[% ELSE %]
78
          <th>Date</th>
50
<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>
79
          [% IF ( OPACMySummaryHTML ) %]
51
[% END %]
80
            <th>Links</th>
52
[% ELSE %]
81
          [% END %]
53
<li class="active"><a href="/cgi-bin/koha/opac-readingrecord.pl#readingrec">Showing all items</a></li>
82
        </tr>
54
[% END %]
83
      </thead>
55
</ul>
84
      <tbody>
56
<div class="tabs-container"><table id="readingrec">
85
      [% FOREACH issue IN READING_RECORD %]
57
<tr>
86
        <tr>
58
<th colspan="2">Title</th>
87
          <td style="display:none;">
59
<th>Item type</th>
88
            [% IF issue.inhouse_use %]
60
<th>Call no.</th>
89
              inhouse_use
61
<th>Date</th>
90
            [% ELSE %]
62
[% IF ( OPACMySummaryHTML ) %]
91
              checkout
63
<th>Links</th>
92
            [% END %]
64
[% END %]
93
          </td>
65
</tr>
66
67
[% FOREACH issue IN READING_RECORD %]
68
94
69
[% IF  loop.even  %]<tr class="highlight">[% ELSE %]<tr>[% END %]
70
<td>
95
<td>
71
[% IF  OPACAmazonCoverImages %]
96
[% IF  OPACAmazonCoverImages %]
72
    [% IF  issue.normalized_isbn %]
97
    [% IF  issue.normalized_isbn %]
Lines 129-134 You have never borrowed anything from this library. Link Here
129
</tr>
154
</tr>
130
155
131
[% END %]
156
[% END %]
157
</tbody>
132
</table></div></div>
158
</table></div></div>
133
159
134
[% END %]
160
[% END %]
(-)a/misc/cronjobs/bulk_transferts.pl (-1 / +105 lines)
Line 0 Link Here
0
- 
1
#!/usr/bin/perl
2
3
# Copyright 2013 BibLibre
4
#
5
# This file is part of Koha.
6
#
7
# Koha is free software; you can redistribute it and/or modify it under the
8
# terms of the GNU General Public License as published by the Free Software
9
# Foundation; either version 2 of the License, or (at your option) any later
10
# version.
11
#
12
# Koha is distributed in the hope that it will be useful, but WITHOUT ANY
13
# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
14
# A PARTICULAR PURPOSE.  See the GNU General Public License for more details.
15
#
16
# You should have received a copy of the GNU General Public License along
17
# with Koha; if not, write to the Free Software Foundation, Inc.,
18
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
19
20
use Modern::Perl;
21
22
use Pod::Usage;
23
use Getopt::Long;
24
25
use C4::Context;
26
use C4::Circulation;
27
28
my ( $help, $verbose, $locations, $branch);
29
GetOptions(
30
    'h|help'        => \$help,
31
    'v|verbose'     => \$verbose,
32
    'locations:s'   => \$locations,
33
    'branch:s'      => \$branch,
34
);
35
36
if ( $help or not $branch ) {
37
    usage();
38
    exit;
39
}
40
41
my $dbh = C4::Context->dbh;
42
43
my @locations;
44
@locations = split /, /, $locations
45
    if $locations =~ /, /;
46
@locations = split /[, ]/, $locations
47
    unless @locations;
48
49
my $query = q{
50
    SELECT barcode
51
    FROM branchtransfers
52
    LEFT JOIN items ON branchtransfers.itemnumber = items.itemnumber
53
    WHERE tobranch = ?
54
    AND branchtransfers.datearrived IS NULL
55
};
56
$query .= q{AND items.location IN (} . ( "?, " x (scalar(@locations) - 1 )) . q{?)}
57
    if @locations;
58
59
my $sth = $dbh->prepare( $query );
60
61
$sth->execute( $branch, @locations );
62
63
while ( my $barcode = $sth->fetchrow ) {
64
    # We force the return
65
    say "Returning barcode $barcode" if $verbose;
66
    C4::Circulation::AddReturn( $barcode, $branch, undef, undef, 1 );
67
}
68
69
sub usage {
70
    pod2usage( -verbose => 2 );
71
    exit;
72
}
73
74
=head1 NAME
75
76
bulk_transfers.pl - Make a transfer for items of a specified branch.
77
78
=head1 USAGE
79
80
bulk_transfers.pl --branch [--locations -v -h]
81
82
=head1 PARAMETERS
83
84
=over
85
86
=item B<-h>
87
88
Print a brief help message
89
90
=item B<--branch>
91
92
The transfer is made for items going to this branch.
93
94
=item B<--locations>
95
96
List of item's locations. Filter to add to the branch parameter.
97
98
=item B<-v>
99
100
Verbose mode.
101
102
=back
103
104
=cut
105

Return to bug 10860