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 1227-1232 sub GetItemsInfo { Link Here
1227
           holding.branchurl,
1227
           holding.branchurl,
1228
           holding.branchname,
1228
           holding.branchname,
1229
           holding.opac_info as branch_opac_info
1229
           holding.opac_info as branch_opac_info
1230
    ";
1231
    $query .= ", issues.inhouse_use"
1232
        if C4::Context->preference("In-House Use");
1233
    $query .= "
1230
     FROM items
1234
     FROM items
1231
     LEFT JOIN branches AS holding ON items.holdingbranch = holding.branchcode
1235
     LEFT JOIN branches AS holding ON items.holdingbranch = holding.branchcode
1232
     LEFT JOIN branches AS home ON items.homebranch=home.branchcode
1236
     LEFT JOIN branches AS home ON items.homebranch=home.branchcode
Lines 1234-1239 sub GetItemsInfo { Link Here
1234
     LEFT JOIN biblioitems ON biblioitems.biblioitemnumber = items.biblioitemnumber
1238
     LEFT JOIN biblioitems ON biblioitems.biblioitemnumber = items.biblioitemnumber
1235
     LEFT JOIN itemtypes   ON   itemtypes.itemtype         = "
1239
     LEFT JOIN itemtypes   ON   itemtypes.itemtype         = "
1236
     . (C4::Context->preference('item-level_itypes') ? 'items.itype' : 'biblioitems.itemtype');
1240
     . (C4::Context->preference('item-level_itypes') ? 'items.itype' : 'biblioitems.itemtype');
1241
    $query .= " LEFT JOIN issues ON issues.itemnumber = items.itemnumber"
1242
        if C4::Context->preference("In-House Use");
1237
    $query .= " WHERE items.biblionumber = ? ORDER BY home.branchname, items.enumchron, LPAD( items.copynumber, 8, '0' ), items.dateaccessioned DESC" ;
1243
    $query .= " WHERE items.biblionumber = ? ORDER BY home.branchname, items.enumchron, LPAD( items.copynumber, 8, '0' ), items.dateaccessioned DESC" ;
1238
    my $sth = $dbh->prepare($query);
1244
    my $sth = $dbh->prepare($query);
1239
    $sth->execute($biblionumber);
1245
    $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 1095-1100 CREATE TABLE `issues` ( -- information related to check outs or issues Link Here
1095
  `renewals` tinyint(4) default NULL, -- lists the number of times the item was renewed
1095
  `renewals` tinyint(4) default NULL, -- lists the number of times the item was renewed
1096
  `timestamp` timestamp NOT NULL default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP, -- the date and time this record was last touched
1096
  `timestamp` timestamp NOT NULL default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP, -- the date and time this record was last touched
1097
  `issuedate` datetime default NULL, -- date the item was checked out or issued
1097
  `issuedate` datetime default NULL, -- date the item was checked out or issued
1098
  `inhouse_use` int(1) NOT NULL default 0, -- in house use flag
1098
  KEY `issuesborridx` (`borrowernumber`),
1099
  KEY `issuesborridx` (`borrowernumber`),
1099
  KEY `itemnumber_idx` (`itemnumber`),
1100
  KEY `itemnumber_idx` (`itemnumber`),
1100
  KEY `branchcode_idx` (`branchcode`),
1101
  KEY `branchcode_idx` (`branchcode`),
Lines 1557-1562 CREATE TABLE `old_issues` ( -- lists items that were checked out and have been r Link Here
1557
  `renewals` tinyint(4) default NULL, -- lists the number of times the item was renewed
1558
  `renewals` tinyint(4) default NULL, -- lists the number of times the item was renewed
1558
  `timestamp` timestamp NOT NULL default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP, -- the date and time this record was last touched
1559
  `timestamp` timestamp NOT NULL default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP, -- the date and time this record was last touched
1559
  `issuedate` datetime default NULL, -- date the item was checked out or issued
1560
  `issuedate` datetime default NULL, -- date the item was checked out or issued
1561
  `inhouse_use` int(1) NOT NULL default 0, -- in house use flag
1560
  KEY `old_issuesborridx` (`borrowernumber`),
1562
  KEY `old_issuesborridx` (`borrowernumber`),
1561
  KEY `old_issuesitemidx` (`itemnumber`),
1563
  KEY `old_issuesitemidx` (`itemnumber`),
1562
  KEY `branchcode_idx` (`branchcode`),
1564
  KEY `branchcode_idx` (`branchcode`),
(-)a/installer/data/mysql/sysprefs.sql (+2 lines)
Lines 132-137 INSERT INTO systempreferences ( `variable`, `value`, `options`, `explanation`, ` Link Here
132
('ImageLimit','5','','Limit images stored in the database by the Patron Card image manager to this number.','Integer'),
132
('ImageLimit','5','','Limit images stored in the database by the Patron Card image manager to this number.','Integer'),
133
('IncludeSeeFromInSearches','0','','Include see-from references in searches.','YesNo'),
133
('IncludeSeeFromInSearches','0','','Include see-from references in searches.','YesNo'),
134
('IndependentBranches','0',NULL,'If ON, increases security between libraries','YesNo'),
134
('IndependentBranches','0',NULL,'If ON, increases security between libraries','YesNo'),
135
('In-House use','0','','Enable/Disable the in-house use feature','YesNo'),
136
('In-House use Force','0','','Enable/Disable the in-house for all cases (Even if a user is debarred, etc.)','YesNo'),
135
('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'),
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'),
136
('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'),
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'),
137
('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'),
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'),
(-)a/installer/data/mysql/updatedatabase.pl (+32 lines)
Lines 7139-7144 if ( CheckVersion($DBversion) ) { Link Here
7139
    SetVersion ($DBversion);
7139
    SetVersion ($DBversion);
7140
}
7140
}
7141
7141
7142
7143
7144
7145
7146
7147
7148
7149
7150
7151
7152
$DBversion = "3.13.00.XXX";
7153
if ( C4::Context->preference("Version") < TransformToNum($DBversion) ) {
7154
    $dbh->do(q{
7155
        INSERT IGNORE INTO systempreferences
7156
            (variable,value,explanation,options,type)
7157
            VALUES('In-House use','0','Enable/Disable the in-house use feature','','YesNo');
7158
    });
7159
    $dbh->do(q{
7160
        INSERT IGNORE INTO systempreferences
7161
            (variable,value,explanation,options,type)
7162
            VALUES('In-House use Force','0','Enable/Disable the in-house for all cases (Even if a user is debarred, etc.)','','YesNo');
7163
    });
7164
    $dbh->do(q{
7165
        ALTER TABLE issues ADD COLUMN inhouse_use INT(1) NOT NULL DEFAULT 0 AFTER issuedate;
7166
    });
7167
    $dbh->do(q{
7168
        ALTER TABLE old_issues ADD COLUMN inhouse_use INT(1) NOT NULL DEFAULT 0 AFTER issuedate;
7169
    });
7170
    print "Upgrade to $DBversion done (Bug 10860: Add new system preference In-House use + fields [old_]issues.inhouse_use)\n";
7171
    SetVersion($DBversion);
7172
}
7173
7142
=head1 FUNCTIONS
7174
=head1 FUNCTIONS
7143
7175
7144
=head2 TableExists($table)
7176
=head2 TableExists($table)
(-)a/koha-tmpl/intranet-tmpl/prog/en/css/staff-global.css (+15 lines)
Lines 974-979 tr.highlight th[scope=row] { Link Here
974
    padding : 1px;
974
    padding : 1px;
975
}
975
}
976
976
977
.inhouse_use-select {
978
    font-size : 85%;
979
    font-weight: normal;
980
    padding-top : .3em;
981
}
982
#circ_circulation_issue .inhouse_use-select label,
983
.inhouse_use-select label {
984
    font-size : inherit;
985
    font-weight: normal;
986
}
987
977
tr.expired td {
988
tr.expired td {
978
	color : #999999;
989
	color : #999999;
979
}
990
}
Lines 2655-2657 span.browse-button { Link Here
2655
    float: right;
2666
    float: right;
2656
    padding-right: 1em;
2667
    padding-right: 1em;
2657
}
2668
}
2669
2670
span.inhouse_use {
2671
    color: red;
2672
}
(-)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/modules/admin/preferences/circulation.pref (+12 lines)
Lines 338-343 Circulation: Link Here
338
                  no: "Don't"
338
                  no: "Don't"
339
            - calculate and update overdue charges when an item is returned.
339
            - calculate and update overdue charges when an item is returned.
340
            - <br /><b>NOTE If you are doing hourly loans then you should have this on.</b>
340
            - <br /><b>NOTE If you are doing hourly loans then you should have this on.</b>
341
        -
342
            - pref: In-House use
343
              choices:
344
                  yes: Enable
345
                  no: Disable
346
            - the in-house use feature.
347
        -
348
            - pref: In-House use Force
349
              choices:
350
                  yes: Enable
351
                  no: Disable
352
            - the in-house for all cases (Even if a user is debarred, etc.).
341
    Holds Policy:
353
    Holds Policy:
342
        -
354
        -
343
            - pref: AllowHoldPolicyOverride
355
            - pref: AllowHoldPolicyOverride
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt (+8 lines)
Lines 416-424 function verify_images() { Link Here
416
                    <td class="status">
416
                    <td class="status">
417
417
418
                        [% IF ( item.datedue ) %]
418
                        [% IF ( item.datedue ) %]
419
                          [% IF inhouse_use %]
420
                            <span>Currently in local use
421
                          [% ELSE %]
419
                            <span class="datedue">Checked out
422
                            <span class="datedue">Checked out
423
                          [% END %]
420
                                [% UNLESS ( item.NOTSAMEBRANCH ) %]
424
                                [% UNLESS ( item.NOTSAMEBRANCH ) %]
425
                                  [% IF inhouse_use %]
426
                                    by <a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% item.borrowernumber %]">
427
                                  [% ELSE %]
421
                                    to <a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% item.borrowernumber %]">
428
                                    to <a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% item.borrowernumber %]">
429
                                  [% END %]
422
                                        [% IF ( item.hidepatronname ) %]
430
                                        [% IF ( item.hidepatronname ) %]
423
                                            [% item.cardnumber %]
431
                                            [% item.cardnumber %]
424
                                        [% ELSE %]
432
                                        [% ELSE %]
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tt (-15 / +69 lines)
Lines 176-186 var allcheckboxes = $(".checkboxed"); Link Here
176
        radioCheckBox($(this));
176
        radioCheckBox($(this));
177
    });
177
    });
178
178
179
    $("#newduedate").datetimepicker({
179
    $("#newduedate").datepicker({
180
        minDate: 1, // require that renewal date is after today
180
        minDate: 1, // require that renewal date is after today
181
        hour: 23,
181
        hour: 23,
182
        minute: 59
182
        minute: 59
183
    });
183
    });
184
    //function init_dtp_duedatespec
184
    $("#duedatespec").datetimepicker({
185
    $("#duedatespec").datetimepicker({
185
        onClose: function(dateText, inst) { $("#barcode").focus(); },
186
        onClose: function(dateText, inst) { $("#barcode").focus(); },
186
        hour: 23,
187
        hour: 23,
Lines 191-196 var allcheckboxes = $(".checkboxed"); Link Here
191
        export_checkouts(export_format);
192
        export_checkouts(export_format);
192
        return false;
193
        return false;
193
    })
194
    })
195
196
    function toggle_inhouse_use(){
197
        if ( $("#inhouse_use").attr('checked') ) {
198
            $("#duedatespec").val("[% todaysdate | $KohaDates with_hours => 1%]")
199
            $("#duedatespec").datetimepicker('destroy');
200
        } else {
201
            $("#duedatespec").datetimepicker({
202
                onClose: function(dateText, inst) { $("#barcode").focus(); },
203
                hour: 23,
204
                minute: 59
205
            });
206
        }
207
    }
208
    toggle_inhouse_use();
209
    $("#inhouse_use").click(function(){
210
        toggle_inhouse_use();
211
    });
194
 });
212
 });
195
213
196
function export_checkouts(format) {
214
function export_checkouts(format) {
Lines 435-440 function validate1(date) { Link Here
435
    [% ELSE %]
453
    [% ELSE %]
436
    <input type="submit" class="approve" value="Yes, Check Out (Y)" accesskey="y" />
454
    <input type="submit" class="approve" value="Yes, Check Out (Y)" accesskey="y" />
437
    [% END %]
455
    [% END %]
456
    <input type="hidden" name="inhouse_use" value="[% inhouse_use %]" />
438
</form>
457
</form>
439
458
440
<form method="get" action="/cgi-bin/koha/circ/circulation.pl">
459
<form method="get" action="/cgi-bin/koha/circ/circulation.pl">
Lines 604-610 No patron matched <span class="ex">[% message %]</span> Link Here
604
623
605
[% IF ( borrowernumber ) %]
624
[% IF ( borrowernumber ) %]
606
<div class="yui-g">
625
<div class="yui-g">
607
[% UNLESS ( noissues ) %]
626
[% IF !noissues || inhouse_use_forced %]
608
[% IF ( flagged ) %]
627
[% IF ( flagged ) %]
609
<div class="yui-u first">
628
<div class="yui-u first">
610
[% ELSE %]
629
[% ELSE %]
Lines 641-647 No patron matched <span class="ex">[% message %]</span> Link Here
641
<input type="checkbox" id="stickyduedate" onclick="this.form.barcode.focus();" name="stickyduedate" />
660
<input type="checkbox" id="stickyduedate" onclick="this.form.barcode.focus();" name="stickyduedate" />
642
[% END %]
661
[% END %]
643
          <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;" />
662
          <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;" />
644
</div>[% END %]
663
</div>
664
[% END %]
665
666
      [% IF inhouse_use_feature %]
667
        <div class="inhouse_use-select">
668
          [% IF noissues %]
669
            <input type="checkbox" id="inhouse_use" name="inhouse_use_forced" checked="checked" disabled="disabled" /> <label for="inhouse_use">In-house use</label>
670
            <input type="hidden" name="inhouse_use" checked="checked" value="1" />
671
          [% ELSE %]
672
            <input type="checkbox" id="inhouse_use" name="inhouse_use" /> <label for="inhouse_use">In-house use</label>
673
          [% END %]
674
        </div>
675
      [% END %]
676
645
          <input type="hidden" name="borrowernumber" id="borrowernumber" value="[% borrowernumber %]" />
677
          <input type="hidden" name="borrowernumber" id="borrowernumber" value="[% borrowernumber %]" />
646
          <input type="hidden" name="branch" value="[% branch %]" />
678
          <input type="hidden" name="branch" value="[% branch %]" />
647
          <input type="hidden" name="printer" value="[% printer %]" />
679
          <input type="hidden" name="printer" value="[% printer %]" />
Lines 656-672 No patron matched <span class="ex">[% message %]</span> Link Here
656
688
657
[% IF ( noissues ) %]<div>[% ELSE %]<div class="yui-u">[% END %]
689
[% IF ( noissues ) %]<div>[% ELSE %]<div class="yui-u">[% END %]
658
690
659
    [% IF ( flagged ) %]
691
    [% IF flagged %]
660
		[% IF ( noissues ) %]
692
      [% IF NOT noissues || ( noissues && inhouse_use_forced ) %]
661
		<h4>Checking out to [% INCLUDE 'patron-title.inc' %]</h4>
662
        <div id="circmessages" class="circmessage warning">
663
		[% ELSE %]
664
        <div id="circmessages" class="circmessage attention">
693
        <div id="circmessages" class="circmessage attention">
665
		[% END %]
694
      [% ELSE %]
695
        <h4>Checking out to [% INCLUDE 'patron-title.inc' %]</h4>
696
        <div id="circmessages" class="circmessage warning">
697
      [% END %]
698
      <h3>
699
        [% IF noissues %]
700
          Cannot check out!
701
          [% IF inhouse_use_forced %]
702
            <span style="color:red;">Only in-house use is allowed</span>
703
          [% END %]
704
        [% ELSE %]
705
          Attention:
706
        [% END %]
707
      </h3>
666
708
667
		<h3>[% IF ( noissues ) %]
668
		        Cannot check out!
669
		[% ELSE %]Attention:[% END %]</h3>
670
		<ul>
709
		<ul>
671
710
672
			[% IF ( warndeparture ) %]
711
			[% IF ( warndeparture ) %]
Lines 853-859 No patron matched <span class="ex">[% message %]</span> Link Here
853
                <span class="dmg">[% KohaAuthorisedValues.GetByCode( 'DAMAGED', todayissue.damaged ) %]</span>
892
                <span class="dmg">[% KohaAuthorisedValues.GetByCode( 'DAMAGED', todayissue.damaged ) %]</span>
854
            [% END %]
893
            [% END %]
855
        </td>
894
        </td>
856
        <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>
895
        <td>
896
          <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>
897
          [% IF todayissue.inhouse_use %]
898
            <span class="inhouse_use">(In-house use)</span>
899
          [% END %]
900
        </td>
857
        <td>[% UNLESS ( noItemTypeImages ) %] [% IF ( todayissue.itemtype_image ) %]<img src="[% todayissue.itemtype_image %]" alt="" />[% END %][% END %][% todayissue.itemtype %]</td>
901
        <td>[% UNLESS ( noItemTypeImages ) %] [% IF ( todayissue.itemtype_image ) %]<img src="[% todayissue.itemtype_image %]" alt="" />[% END %][% END %][% todayissue.itemtype %]</td>
858
        <td><span title="[% todayissue.displaydate_sort %]">[% todayissue.checkoutdate %]</span></td>
902
        <td><span title="[% todayissue.displaydate_sort %]">[% todayissue.checkoutdate %]</span></td>
859
        [% IF ( todayissue.multiple_borrowers ) %]<td>[% todayissue.firstname %] [% todayissue.surname %]</td>[% END %]
903
        [% IF ( todayissue.multiple_borrowers ) %]<td>[% todayissue.firstname %] [% todayissue.surname %]</td>[% END %]
Lines 940-946 No patron matched <span class="ex">[% message %]</span> Link Here
940
                <span class="dmg">[% KohaAuthorisedValues.GetByCode( 'DAMAGED', previssue.damaged ) %]</span>
984
                <span class="dmg">[% KohaAuthorisedValues.GetByCode( 'DAMAGED', previssue.damaged ) %]</span>
941
            [% END %]
985
            [% END %]
942
        </td>
986
        </td>
943
        <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>
987
        <td>
988
          <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>
989
          [% IF previssue.inhouse_use %]
990
            <span class="inhouse_use">(In-house use)</span>
991
          [% END %]
992
        </td>
944
        <td>
993
        <td>
945
            [% previssue.itemtype %]
994
            [% previssue.itemtype %]
946
        </td>
995
        </td>
Lines 1078-1084 No patron matched <span class="ex">[% message %]</span> Link Here
1078
                <span class="dmg">[% KohaAuthorisedValues.GetByCode( 'DAMAGED', relissue.damaged ) %]</span>
1127
                <span class="dmg">[% KohaAuthorisedValues.GetByCode( 'DAMAGED', relissue.damaged ) %]</span>
1079
            [% END %]
1128
            [% END %]
1080
        </td>
1129
        </td>
1081
        <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>
1130
        <td>
1131
          <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>
1132
          [% IF relissue.inhouse_use %]
1133
            <span class="inhouse_use">(In-house use)</span>
1134
          [% END %]
1135
        </td>
1082
        <td>[% UNLESS ( noItemTypeImages ) %] [% IF ( relissue.itemtype_image ) %]<img src="[% relissue.itemtype_image %]" alt="" />[% END %][% END %][% relissue.itemtype %]</td>
1136
        <td>[% UNLESS ( noItemTypeImages ) %] [% IF ( relissue.itemtype_image ) %]<img src="[% relissue.itemtype_image %]" alt="" />[% END %][% END %][% relissue.itemtype %]</td>
1083
        <td><span title="[% relissue.displaydate_sort %]">[% relissue.displaydate %]</span></td>
1137
        <td><span title="[% relissue.displaydate_sort %]">[% relissue.displaydate %]</span></td>
1084
        <td>[% relissue.issuingbranchname %]</td>
1138
        <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 1-11 Link Here
1
[% USE KohaAuthorisedValues %]
1
[% USE KohaAuthorisedValues %]
2
2
3
[% IF ( item.datedue ) %]
3
[% IF ( item.datedue ) %]
4
  [% IF inhouse_use %]
5
    [% IF ( OPACShowCheckoutName ) %]
6
        Currently in local use by [% item.cardnumber %] [% item.firstname %] [% item.surname %]
7
    [% ELSE %]
8
        Currently in local use
9
    [% END %]
10
  [% ELSE %]
4
    [% IF ( OPACShowCheckoutName ) %]
11
    [% IF ( OPACShowCheckoutName ) %]
5
        Checked out to [% item.cardnumber %] [% item.firstname %] [% item.surname %]
12
        Checked out to [% item.cardnumber %] [% item.firstname %] [% item.surname %]
6
    [% ELSE %]
13
    [% ELSE %]
7
        Checked out
14
        Checked out
8
    [% END %]
15
    [% END %]
16
  [% END %]
9
[% ELSIF ( item.transfertwhen ) %]
17
[% ELSIF ( item.transfertwhen ) %]
10
    In transit from [% item.transfertfrom %]
18
    In transit from [% item.transfertfrom %]
11
    to [% item.transfertto %] since [% item.transfertwhen %]
19
    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