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

(-)a/C4/Circulation.pm (-6 / +12 lines)
Lines 1178-1186 AddIssue does the following things : Link Here
1178
=cut
1178
=cut
1179
1179
1180
sub AddIssue {
1180
sub AddIssue {
1181
    my ( $borrower, $barcode, $datedue, $cancelreserve, $issuedate, $sipmode) = @_;
1181
    my ( $borrower, $barcode, $datedue, $cancelreserve, $issuedate, $sipmode, $params ) = @_;
1182
    my $inhouse_use = $params->{inhouse_use};
1182
    my $dbh = C4::Context->dbh;
1183
    my $dbh = C4::Context->dbh;
1183
	my $barcodecheck=CheckValidBarcode($barcode);
1184
    my $barcodecheck=CheckValidBarcode($barcode);
1185
    $inhouse_use = ( $inhouse_use ? 1 : 0 );
1186
1184
    if ($datedue && ref $datedue ne 'DateTime') {
1187
    if ($datedue && ref $datedue ne 'DateTime') {
1185
        $datedue = dt_from_string($datedue);
1188
        $datedue = dt_from_string($datedue);
1186
    }
1189
    }
Lines 1248-1255 sub AddIssue { Link Here
1248
        my $sth =
1251
        my $sth =
1249
          $dbh->prepare(
1252
          $dbh->prepare(
1250
                "INSERT INTO issues
1253
                "INSERT INTO issues
1251
                    (borrowernumber, itemnumber,issuedate, date_due, branchcode)
1254
                    (borrowernumber, itemnumber,issuedate, date_due, branchcode, inhouse_use)
1252
                VALUES (?,?,?,?,?)"
1255
                VALUES (?,?,?,?,?,?)"
1253
          );
1256
          );
1254
        unless ($datedue) {
1257
        unless ($datedue) {
1255
            my $itype = ( C4::Context->preference('item-level_itypes') ) ? $biblio->{'itype'} : $biblio->{'itemtype'};
1258
            my $itype = ( C4::Context->preference('item-level_itypes') ) ? $biblio->{'itype'} : $biblio->{'itemtype'};
Lines 1257-1268 sub AddIssue { Link Here
1257
1260
1258
        }
1261
        }
1259
        $datedue->truncate( to => 'minute');
1262
        $datedue->truncate( to => 'minute');
1263
1260
        $sth->execute(
1264
        $sth->execute(
1261
            $borrower->{'borrowernumber'},      # borrowernumber
1265
            $borrower->{'borrowernumber'},      # borrowernumber
1262
            $item->{'itemnumber'},              # itemnumber
1266
            $item->{'itemnumber'},              # itemnumber
1263
            $issuedate->strftime('%Y-%m-%d %H:%M:00'), # issuedate
1267
            $issuedate->strftime('%Y-%m-%d %H:%M:00'), # issuedate
1264
            $datedue->strftime('%Y-%m-%d %H:%M:00'),   # date_due
1268
            $datedue->strftime('%Y-%m-%d %H:%M:00'),   # date_due
1265
            C4::Context->userenv->{'branch'}    # branchcode
1269
            C4::Context->userenv->{'branch'},   # branchcode
1270
            $inhouse_use,
1266
        );
1271
        );
1267
        if ( C4::Context->preference('ReturnToShelvingCart') ) { ## ReturnToShelvingCart is on, anything issued should be taken off the cart.
1272
        if ( C4::Context->preference('ReturnToShelvingCart') ) { ## ReturnToShelvingCart is on, anything issued should be taken off the cart.
1268
          CartToShelf( $item->{'itemnumber'} );
1273
          CartToShelf( $item->{'itemnumber'} );
Lines 1303-1309 sub AddIssue { Link Here
1303
        # Record the fact that this book was issued.
1308
        # Record the fact that this book was issued.
1304
        &UpdateStats(
1309
        &UpdateStats(
1305
            C4::Context->userenv->{'branch'},
1310
            C4::Context->userenv->{'branch'},
1306
            'issue', $charge,
1311
            ( $inhouse_use ? 'inhouse_use' : 'issue' ),
1312
            $charge,
1307
            ($sipmode ? "SIP-$sipmode" : ''), $item->{'itemnumber'},
1313
            ($sipmode ? "SIP-$sipmode" : ''), $item->{'itemnumber'},
1308
            $item->{'itype'}, $borrower->{'borrowernumber'}, undef, $item->{'ccode'}
1314
            $item->{'itype'}, $borrower->{'borrowernumber'}, undef, $item->{'ccode'}
1309
        );
1315
        );
(-)a/C4/Items.pm (+6 lines)
Lines 1271-1276 sub GetItemsInfo { Link Here
1271
           holding.branchurl,
1271
           holding.branchurl,
1272
           holding.branchname,
1272
           holding.branchname,
1273
           holding.opac_info as branch_opac_info
1273
           holding.opac_info as branch_opac_info
1274
    ";
1275
    $query .= ", issues.inhouse_use"
1276
        if C4::Context->preference("In-House Use");
1277
    $query .= "
1274
     FROM items
1278
     FROM items
1275
     LEFT JOIN branches AS holding ON items.holdingbranch = holding.branchcode
1279
     LEFT JOIN branches AS holding ON items.holdingbranch = holding.branchcode
1276
     LEFT JOIN branches AS home ON items.homebranch=home.branchcode
1280
     LEFT JOIN branches AS home ON items.homebranch=home.branchcode
Lines 1278-1283 sub GetItemsInfo { Link Here
1278
     LEFT JOIN biblioitems ON biblioitems.biblioitemnumber = items.biblioitemnumber
1282
     LEFT JOIN biblioitems ON biblioitems.biblioitemnumber = items.biblioitemnumber
1279
     LEFT JOIN itemtypes   ON   itemtypes.itemtype         = "
1283
     LEFT JOIN itemtypes   ON   itemtypes.itemtype         = "
1280
     . (C4::Context->preference('item-level_itypes') ? 'items.itype' : 'biblioitems.itemtype');
1284
     . (C4::Context->preference('item-level_itypes') ? 'items.itype' : 'biblioitems.itemtype');
1285
    $query .= " LEFT JOIN issues ON issues.itemnumber = items.itemnumber"
1286
        if C4::Context->preference("In-House Use");
1281
    $query .= " WHERE items.biblionumber = ? ORDER BY home.branchname, items.enumchron, LPAD( items.copynumber, 8, '0' ), items.dateaccessioned DESC" ;
1287
    $query .= " WHERE items.biblionumber = ? ORDER BY home.branchname, items.enumchron, LPAD( items.copynumber, 8, '0' ), items.dateaccessioned DESC" ;
1282
    my $sth = $dbh->prepare($query);
1288
    my $sth = $dbh->prepare($query);
1283
    $sth->execute($biblionumber);
1289
    $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 322-334 if ($barcode) { Link Here
322
        }
324
        }
323
    }
325
    }
324
326
325
    delete $question->{'DEBT'} if ($debt_confirmed);
327
    unless( $query->param('inhouse_use') and C4::Context->preference("In-House Use Force") ) {
326
    foreach my $impossible ( keys %$error ) {
328
        delete $question->{'DEBT'} if ($debt_confirmed);
327
        $template->param(
329
        foreach my $impossible ( keys %$error ) {
328
            $impossible => $$error{$impossible},
330
            $template->param(
329
            IMPOSSIBLE  => 1
331
                $impossible => $$error{$impossible},
330
        );
332
                IMPOSSIBLE  => 1
331
        $blocker = 1;
333
            );
334
            $blocker = 1;
335
        }
332
    }
336
    }
333
    if( !$blocker ){
337
    if( !$blocker ){
334
        my $confirm_required = 0;
338
        my $confirm_required = 0;
Lines 344-356 if ($barcode) { Link Here
344
                    $needsconfirmation => $$question{$needsconfirmation},
348
                    $needsconfirmation => $$question{$needsconfirmation},
345
                    getTitleMessageIteminfo => $getmessageiteminfo->{'title'},
349
                    getTitleMessageIteminfo => $getmessageiteminfo->{'title'},
346
                    getBarcodeMessageIteminfo => $getmessageiteminfo->{'barcode'},
350
                    getBarcodeMessageIteminfo => $getmessageiteminfo->{'barcode'},
347
                    NEEDSCONFIRMATION  => 1
351
                    NEEDSCONFIRMATION  => 1,
352
                    inhouse_use => $query->param('inhouse_use'),
348
                );
353
                );
349
                $confirm_required = 1;
354
                $confirm_required = 1;
350
            }
355
            }
351
        }
356
        }
352
        unless($confirm_required) {
357
        unless($confirm_required) {
353
            AddIssue( $borrower, $barcode, $datedue, $cancelreserve );
358
            my $inhouse_use = $query->param('inhouse_use');
359
            AddIssue( $borrower, $barcode, $datedue, $cancelreserve, undef, undef, { inhouse_use => $inhouse_use } );
354
            $inprocess = 1;
360
            $inprocess = 1;
355
        }
361
        }
356
    }
362
    }
Lines 781-786 $template->param( Link Here
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,
783
    debarments                => GetDebarments({ borrowernumber => $borrowernumber }),
789
    debarments                => GetDebarments({ borrowernumber => $borrowernumber }),
790
    todaysdate                => dt_from_string()->set(hour => 23)->set(minute => 59),
791
    inhouse_use_feature       => C4::Context->preference("In-House Use"),
792
    inhouse_use_forced        => C4::Context->preference("In-House Use Force"),
784
);
793
);
785
794
786
output_html_with_http_headers $query, $cookie, $template->output;
795
output_html_with_http_headers $query, $cookie, $template->output;
(-)a/installer/data/mysql/kohastructure.sql (+2 lines)
Lines 1122-1127 CREATE TABLE `issues` ( -- information related to check outs or issues Link Here
1122
  `renewals` tinyint(4) default NULL, -- lists the number of times the item was renewed
1122
  `renewals` tinyint(4) default NULL, -- lists the number of times the item was renewed
1123
  `timestamp` timestamp NOT NULL default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP, -- the date and time this record was last touched
1123
  `timestamp` timestamp NOT NULL default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP, -- the date and time this record was last touched
1124
  `issuedate` datetime default NULL, -- date the item was checked out or issued
1124
  `issuedate` datetime default NULL, -- date the item was checked out or issued
1125
  `inhouse_use` int(1) NOT NULL default 0, -- in house use flag
1125
  KEY `issuesborridx` (`borrowernumber`),
1126
  KEY `issuesborridx` (`borrowernumber`),
1126
  KEY `itemnumber_idx` (`itemnumber`),
1127
  KEY `itemnumber_idx` (`itemnumber`),
1127
  KEY `branchcode_idx` (`branchcode`),
1128
  KEY `branchcode_idx` (`branchcode`),
Lines 1587-1592 CREATE TABLE `old_issues` ( -- lists items that were checked out and have been r Link Here
1587
  `renewals` tinyint(4) default NULL, -- lists the number of times the item was renewed
1588
  `renewals` tinyint(4) default NULL, -- lists the number of times the item was renewed
1588
  `timestamp` timestamp NOT NULL default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP, -- the date and time this record was last touched
1589
  `timestamp` timestamp NOT NULL default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP, -- the date and time this record was last touched
1589
  `issuedate` datetime default NULL, -- date the item was checked out or issued
1590
  `issuedate` datetime default NULL, -- date the item was checked out or issued
1591
  `inhouse_use` int(1) NOT NULL default 0, -- in house use flag
1590
  KEY `old_issuesborridx` (`borrowernumber`),
1592
  KEY `old_issuesborridx` (`borrowernumber`),
1591
  KEY `old_issuesitemidx` (`itemnumber`),
1593
  KEY `old_issuesitemidx` (`itemnumber`),
1592
  KEY `branchcode_idx` (`branchcode`),
1594
  KEY `branchcode_idx` (`branchcode`),
(-)a/installer/data/mysql/sysprefs.sql (+2 lines)
Lines 137-142 INSERT INTO systempreferences ( `variable`, `value`, `options`, `explanation`, ` Link Here
137
('ImageLimit','5','','Limit images stored in the database by the Patron Card image manager to this number.','Integer'),
137
('ImageLimit','5','','Limit images stored in the database by the Patron Card image manager to this number.','Integer'),
138
('IncludeSeeFromInSearches','0','','Include see-from references in searches.','YesNo'),
138
('IncludeSeeFromInSearches','0','','Include see-from references in searches.','YesNo'),
139
('IndependentBranches','0',NULL,'If ON, increases security between libraries','YesNo'),
139
('IndependentBranches','0',NULL,'If ON, increases security between libraries','YesNo'),
140
('In-House use','0','','Enable/Disable the in-house use feature','YesNo'),
141
('In-House use Force','0','','Enable/Disable the in-house for all cases (Even if a user is debarred, etc.)','YesNo'),
140
('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'),
142
('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'),
141
('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'),
143
('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'),
142
('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'),
144
('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 (+28 lines)
Lines 8037-8042 if(CheckVersion($DBversion)) { Link Here
8037
    SetVersion($DBversion);
8037
    SetVersion($DBversion);
8038
}
8038
}
8039
8039
8040
8041
8042
8043
8044
8045
8046
$DBversion = "3.15.00.XXX";
8047
if ( C4::Context->preference("Version") < TransformToNum($DBversion) ) {
8048
    $dbh->do(q{
8049
        INSERT IGNORE INTO systempreferences
8050
            (variable,value,explanation,options,type)
8051
            VALUES('In-House use','0','Enable/Disable the in-house use feature','','YesNo');
8052
    });
8053
    $dbh->do(q{
8054
        INSERT IGNORE INTO systempreferences
8055
            (variable,value,explanation,options,type)
8056
            VALUES('In-House use Force','0','Enable/Disable the in-house for all cases (Even if a user is debarred, etc.)','','YesNo');
8057
    });
8058
    $dbh->do(q{
8059
        ALTER TABLE issues ADD COLUMN inhouse_use INT(1) NOT NULL DEFAULT 0 AFTER issuedate;
8060
    });
8061
    $dbh->do(q{
8062
        ALTER TABLE old_issues ADD COLUMN inhouse_use INT(1) NOT NULL DEFAULT 0 AFTER issuedate;
8063
    });
8064
    print "Upgrade to $DBversion done (Bug 10860: Add new system preference In-House use + fields [old_]issues.inhouse_use)\n";
8065
    SetVersion($DBversion);
8066
}
8067
8040
=head1 FUNCTIONS
8068
=head1 FUNCTIONS
8041
8069
8042
=head2 TableExists($table)
8070
=head2 TableExists($table)
(-)a/koha-tmpl/intranet-tmpl/prog/en/css/staff-global.css (+15 lines)
Lines 972-977 tr.highlight th[scope=row] { Link Here
972
    padding : 1px;
972
    padding : 1px;
973
}
973
}
974
974
975
.inhouse_use-select {
976
    font-size : 85%;
977
    font-weight: normal;
978
    padding-top : .3em;
979
}
980
#circ_circulation_issue .inhouse_use-select label,
981
.inhouse_use-select label {
982
    font-size : inherit;
983
    font-weight: normal;
984
}
985
975
tr.expired td {
986
tr.expired td {
976
	color : #999999;
987
	color : #999999;
977
}
988
}
Lines 2725-2727 span.browse-button { Link Here
2725
    font-size:0.8em;
2736
    font-size:0.8em;
2726
    padding:0.5em;
2737
    padding:0.5em;
2727
}
2738
}
2739
2740
span.inhouse_use {
2741
    color: red;
2742
}
(-)a/koha-tmpl/intranet-tmpl/prog/en/js/datatables.js (-4 / +12 lines)
Lines 175-183 function dt_add_type_uk_date() { Link Here
175
175
176
  jQuery.fn.dataTableExt.oSort['uk_date-asc']  = function(a,b) {
176
  jQuery.fn.dataTableExt.oSort['uk_date-asc']  = function(a,b) {
177
    var re = /(\d{2}\/\d{2}\/\d{4})/;
177
    var re = /(\d{2}\/\d{2}\/\d{4})/;
178
    a.match(re);
178
    if ( !a.match(re) ) {
179
        return 1;
180
    }
179
    var ukDatea = RegExp.$1.split("/");
181
    var ukDatea = RegExp.$1.split("/");
180
    b.match(re);
182
    if ( !b.match(re) ) {
183
        return -1;
184
    }
181
    var ukDateb = RegExp.$1.split("/");
185
    var ukDateb = RegExp.$1.split("/");
182
186
183
    var x = (ukDatea[2] + ukDatea[1] + ukDatea[0]) * 1;
187
    var x = (ukDatea[2] + ukDatea[1] + ukDatea[0]) * 1;
Lines 188-196 function dt_add_type_uk_date() { Link Here
188
192
189
  jQuery.fn.dataTableExt.oSort['uk_date-desc'] = function(a,b) {
193
  jQuery.fn.dataTableExt.oSort['uk_date-desc'] = function(a,b) {
190
    var re = /(\d{2}\/\d{2}\/\d{4})/;
194
    var re = /(\d{2}\/\d{2}\/\d{4})/;
191
    a.match(re);
195
    if ( !a.match(re) ) {
196
        return -1;
197
    }
192
    var ukDatea = RegExp.$1.split("/");
198
    var ukDatea = RegExp.$1.split("/");
193
    b.match(re);
199
    if ( !b.match(re) ) {
200
        return 1
201
    }
194
    var ukDateb = RegExp.$1.split("/");
202
    var ukDateb = RegExp.$1.split("/");
195
203
196
    var x = (ukDatea[2] + ukDatea[1] + ukDatea[0]) * 1;
204
    var x = (ukDatea[2] + ukDatea[1] + ukDatea[0]) * 1;
(-)a/koha-tmpl/intranet-tmpl/prog/en/js/pages/circulation.js (-1 / +5 lines)
Lines 84-89 $(document).ready(function() { Link Here
84
          });
84
          });
85
        }
85
        }
86
    });
86
    });
87
88
    toggle_inhouse_use();
89
    $("#inhouse_use").click(function(){
90
        toggle_inhouse_use();
91
    });
87
});
92
});
88
93
89
function export_checkouts(format) {
94
function export_checkouts(format) {
Lines 113-119 function export_checkouts(format) { Link Here
113
118
114
    /* Reset form action to its initial value */
119
    /* Reset form action to its initial value */
115
    document.issues.action="/cgi-bin/koha/reserve/renewscript.pl";
120
    document.issues.action="/cgi-bin/koha/reserve/renewscript.pl";
116
117
}
121
}
118
122
119
function validate1(date) {
123
function validate1(date) {
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/circulation.pref (+12 lines)
Lines 351-356 Circulation: Link Here
351
                  no: "Don't"
351
                  no: "Don't"
352
            - calculate and update overdue charges when an item is returned.
352
            - calculate and update overdue charges when an item is returned.
353
            - <br /><b>NOTE If you are doing hourly loans then you should have this on.</b>
353
            - <br /><b>NOTE If you are doing hourly loans then you should have this on.</b>
354
        -
355
            - pref: In-House use
356
              choices:
357
                  yes: Enable
358
                  no: Disable
359
            - the in-house use feature.
360
        -
361
            - pref: In-House use Force
362
              choices:
363
                  yes: Enable
364
                  no: Disable
365
            - the in-house for all cases (Even if a user is debarred, etc.).
354
    Holds Policy:
366
    Holds Policy:
355
        -
367
        -
356
            - pref: AllowHoldPolicyOverride
368
            - pref: AllowHoldPolicyOverride
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt (+8 lines)
Lines 566-574 function verify_images() { Link Here
566
                    <td class="status">
566
                    <td class="status">
567
567
568
                        [% IF ( item.datedue ) %]
568
                        [% IF ( item.datedue ) %]
569
                          [% IF inhouse_use %]
570
                            <span>Currently in local use
571
                          [% ELSE %]
569
                            <span class="datedue">Checked out
572
                            <span class="datedue">Checked out
573
                          [% END %]
570
                                [% UNLESS ( item.NOTSAMEBRANCH ) %]
574
                                [% UNLESS ( item.NOTSAMEBRANCH ) %]
575
                                  [% IF inhouse_use %]
576
                                    by <a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% item.borrowernumber %]">
577
                                  [% ELSE %]
571
                                    to <a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% item.borrowernumber %]">
578
                                    to <a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% item.borrowernumber %]">
579
                                  [% END %]
572
                                        [% IF ( item.hidepatronname ) %]
580
                                        [% IF ( item.hidepatronname ) %]
573
                                            [% item.cardnumber %]
581
                                            [% item.cardnumber %]
574
                                        [% ELSE %]
582
                                        [% ELSE %]
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tt (-14 / +66 lines)
Lines 94-100 var MSG_EXPORT_SELECT_CHECKOUTS = _("You must select checkout(s) to export"); Link Here
94
    } ).attr( 'checked', false );
94
    } ).attr( 'checked', false );
95
    [% END %]
95
    [% END %]
96
    [% END %]
96
    [% END %]
97
97
 });
98
 });
99
100
// In-house use
101
function toggle_inhouse_use(){
102
    if ( $("#inhouse_use").attr('checked') ) {
103
        $("#duedatespec").val("[% todaysdate | $KohaDates with_hours => 1%]")
104
        $("#duedatespec").datetimepicker('destroy');
105
    } else {
106
        $("#duedatespec").datetimepicker({
107
            onClose: function(dateText, inst) { $("#barcode").focus(); },
108
            hour: 23,
109
            minute: 59
110
        });
111
    }
112
}
113
98
//]]>
114
//]]>
99
</script>
115
</script>
100
</head>
116
</head>
Lines 318-323 var MSG_EXPORT_SELECT_CHECKOUTS = _("You must select checkout(s) to export"); Link Here
318
    [% ELSE %]
334
    [% ELSE %]
319
    <input type="submit" class="approve" value="Yes, Check Out (Y)" accesskey="y" />
335
    <input type="submit" class="approve" value="Yes, Check Out (Y)" accesskey="y" />
320
    [% END %]
336
    [% END %]
337
    <input type="hidden" name="inhouse_use" value="[% inhouse_use %]" />
321
</form>
338
</form>
322
[% END %]
339
[% END %]
323
340
Lines 492-498 No patron matched <span class="ex">[% message %]</span> Link Here
492
509
493
[% IF ( borrowernumber ) %]
510
[% IF ( borrowernumber ) %]
494
<div class="yui-g">
511
<div class="yui-g">
495
[% UNLESS ( noissues ) %]
512
[% IF !noissues || inhouse_use_forced %]
496
[% IF ( flagged ) %]
513
[% IF ( flagged ) %]
497
<div class="yui-u first">
514
<div class="yui-u first">
498
[% ELSE %]
515
[% ELSE %]
Lines 529-535 No patron matched <span class="ex">[% message %]</span> Link Here
529
<input type="checkbox" id="stickyduedate" onclick="this.form.barcode.focus();" name="stickyduedate" />
546
<input type="checkbox" id="stickyduedate" onclick="this.form.barcode.focus();" name="stickyduedate" />
530
[% END %]
547
[% END %]
531
          <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;" />
548
          <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;" />
532
</div>[% END %]
549
</div>
550
[% END %]
551
552
      [% IF inhouse_use_feature %]
553
        <div class="inhouse_use-select">
554
          [% IF noissues %]
555
            <input type="checkbox" id="inhouse_use" name="inhouse_use_forced" checked="checked" disabled="disabled" /> <label for="inhouse_use">In-house use</label>
556
            <input type="hidden" name="inhouse_use" checked="checked" value="1" />
557
          [% ELSE %]
558
            <input type="checkbox" id="inhouse_use" name="inhouse_use" /> <label for="inhouse_use">In-house use</label>
559
          [% END %]
560
        </div>
561
      [% END %]
562
533
          <input type="hidden" name="borrowernumber" id="borrowernumber" value="[% borrowernumber %]" />
563
          <input type="hidden" name="borrowernumber" id="borrowernumber" value="[% borrowernumber %]" />
534
          <input type="hidden" name="branch" value="[% branch %]" />
564
          <input type="hidden" name="branch" value="[% branch %]" />
535
          <input type="hidden" name="printer" value="[% printer %]" />
565
          <input type="hidden" name="printer" value="[% printer %]" />
Lines 544-560 No patron matched <span class="ex">[% message %]</span> Link Here
544
574
545
[% IF ( noissues ) %]<div>[% ELSE %]<div class="yui-u">[% END %]
575
[% IF ( noissues ) %]<div>[% ELSE %]<div class="yui-u">[% END %]
546
576
547
    [% IF ( flagged ) %]
577
    [% IF flagged %]
548
		[% IF ( noissues ) %]
578
      [% IF NOT noissues || ( noissues && inhouse_use_forced ) %]
549
		<h4>Checking out to [% INCLUDE 'patron-title.inc' %]</h4>
550
        <div id="circmessages" class="circmessage warning">
551
		[% ELSE %]
552
        <div id="circmessages" class="circmessage attention">
579
        <div id="circmessages" class="circmessage attention">
553
		[% END %]
580
      [% ELSE %]
581
        <h4>Checking out to [% INCLUDE 'patron-title.inc' %]</h4>
582
        <div id="circmessages" class="circmessage warning">
583
      [% END %]
584
      <h3>
585
        [% IF noissues %]
586
          Cannot check out!
587
          [% IF inhouse_use_forced %]
588
            <span style="color:red;">Only in-house use is allowed</span>
589
          [% END %]
590
        [% ELSE %]
591
          Attention:
592
        [% END %]
593
      </h3>
554
594
555
		<h3>[% IF ( noissues ) %]
556
		        Cannot check out!
557
		[% ELSE %]Attention:[% END %]</h3>
558
		<ul>
595
		<ul>
559
596
560
			[% IF ( warndeparture ) %]
597
			[% IF ( warndeparture ) %]
Lines 748-754 No patron matched <span class="ex">[% message %]</span> Link Here
748
                <span class="dmg">[% AuthorisedValues.GetByCode( 'DAMAGED', todayissue.damaged ) %]</span>
785
                <span class="dmg">[% AuthorisedValues.GetByCode( 'DAMAGED', todayissue.damaged ) %]</span>
749
            [% END %]
786
            [% END %]
750
        </td>
787
        </td>
751
        <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>
788
        <td>
789
          <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>
790
          [% IF todayissue.inhouse_use %]
791
            <span class="inhouse_use">(In-house use)</span>
792
          [% END %]
793
        </td>
752
        <td>[% UNLESS ( noItemTypeImages ) %] [% IF ( todayissue.itemtype_image ) %]<img src="[% todayissue.itemtype_image %]" alt="" />[% END %][% END %][% todayissue.itemtype %]</td>
794
        <td>[% UNLESS ( noItemTypeImages ) %] [% IF ( todayissue.itemtype_image ) %]<img src="[% todayissue.itemtype_image %]" alt="" />[% END %][% END %][% todayissue.itemtype %]</td>
753
        <td><span title="[% todayissue.displaydate_sort %]">[% todayissue.checkoutdate %]</span></td>
795
        <td><span title="[% todayissue.displaydate_sort %]">[% todayissue.checkoutdate %]</span></td>
754
        [% IF ( todayissue.multiple_borrowers ) %]<td>[% todayissue.firstname %] [% todayissue.surname %]</td>[% END %]
796
        [% IF ( todayissue.multiple_borrowers ) %]<td>[% todayissue.firstname %] [% todayissue.surname %]</td>[% END %]
Lines 841-847 No patron matched <span class="ex">[% message %]</span> Link Here
841
                <span class="dmg">[% AuthorisedValues.GetByCode( 'DAMAGED', previssue.damaged ) %]</span>
883
                <span class="dmg">[% AuthorisedValues.GetByCode( 'DAMAGED', previssue.damaged ) %]</span>
842
            [% END %]
884
            [% END %]
843
        </td>
885
        </td>
844
        <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>
886
        <td>
887
          <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>
888
          [% IF previssue.inhouse_use %]
889
            <span class="inhouse_use">(In-house use)</span>
890
          [% END %]
891
        </td>
845
        <td>
892
        <td>
846
            [% previssue.itemtype %]
893
            [% previssue.itemtype %]
847
        </td>
894
        </td>
Lines 988-994 No patron matched <span class="ex">[% message %]</span> Link Here
988
                <span class="dmg">[% AuthorisedValues.GetByCode( 'DAMAGED', relissue.damaged ) %]</span>
1035
                <span class="dmg">[% AuthorisedValues.GetByCode( 'DAMAGED', relissue.damaged ) %]</span>
989
            [% END %]
1036
            [% END %]
990
        </td>
1037
        </td>
991
        <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>
1038
        <td>
1039
          <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>
1040
          [% IF relissue.inhouse_use %]
1041
            <span class="inhouse_use">(In-house use)</span>
1042
          [% END %]
1043
        </td>
992
        <td>[% UNLESS ( noItemTypeImages ) %] [% IF ( relissue.itemtype_image ) %]<img src="[% relissue.itemtype_image %]" alt="" />[% END %][% END %][% relissue.itemtype %]</td>
1044
        <td>[% UNLESS ( noItemTypeImages ) %] [% IF ( relissue.itemtype_image ) %]<img src="[% relissue.itemtype_image %]" alt="" />[% END %][% END %][% relissue.itemtype %]</td>
993
        <td><span title="[% relissue.displaydate_sort %]">[% relissue.displaydate %]</span></td>
1045
        <td><span title="[% relissue.displaydate_sort %]">[% relissue.displaydate %]</span></td>
994
        <td>[% relissue.issuingbranchname %]</td>
1046
        <td>[% relissue.issuingbranchname %]</td>
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/members/readingrec.tt (-45 / +77 lines)
Lines 8-21 Link Here
8
//<![CDATA[
8
//<![CDATA[
9
9
10
 $(document).ready(function() {
10
 $(document).ready(function() {
11
    [% IF (dateformat == 'metric') %]
11
    [% IF dateformat == 'metric' %]
12
        dt_add_type_uk_date();
12
        dt_add_type_uk_date();
13
    [% END %]
13
    [% END %]
14
    $("#table_readingrec").dataTable($.extend(true, {}, dataTablesDefaults, {
14
    var table = $("#table_readingrec").dataTable($.extend(true, {}, dataTablesDefaults, {
15
        "sPaginationType": "four_button",
15
        "sPaginationType": "four_button",
16
        "aaSorting": [],
16
        "aaSorting": [],
17
        "aoColumns": [
17
        "aoColumns": [
18
            null,
18
            null,
19
            null,
19
            { "sType": "anti-the" },
20
            { "sType": "anti-the" },
20
            null,
21
            null,
21
            null,
22
            null,
Lines 27-32 Link Here
27
            { "sType": "title-string" }
28
            { "sType": "title-string" }
28
        ]
29
        ]
29
    }));
30
    }));
31
    var tabs = $("#tabs").tabs({
32
        select: function(e, ui) {
33
            var id = $(ui.tab).attr("id");
34
            if ( id == "tab_checkout" ) {
35
                table.fnFilter("checkout", 0);
36
            } else if ( id == "tab_inhouse_use" ) {
37
                table.fnFilter("inhouse_use", 0);
38
            } else { // all
39
                table.fnFilter('', 0);
40
            }
41
        }
42
    });
30
 });
43
 });
31
//]]>
44
//]]>
32
</script>
45
</script>
Lines 53-109 Link Here
53
<form action="/cgi-bin/koha/members/readingrec.pl" method="get"><input type="hidden" name="borrowernumber" id="borrowernumber" value="[% borrowernumber %]" /></form>
66
<form action="/cgi-bin/koha/members/readingrec.pl" method="get"><input type="hidden" name="borrowernumber" id="borrowernumber" value="[% borrowernumber %]" /></form>
54
67
55
68
56
<table id="table_readingrec">
69
<div id="tabs" class="toptabs">
57
<thead>
70
  <ul>
58
    <th>Date</th>
71
    <li><a href="#readingrec" id="tab_all">All</a></li>
59
	<th>Title</th>
72
    <li><a href="#readingrec" id="tab_checkout">Checkouts</a></li>
60
	<th>Author</th>
73
    <li><a href="#readingrec" id="tab_inhouse_use">In-house use</a></li>
61
    <th>Call no.</th>
74
  </ul>
62
	<th>Barcode</th>
75
  <div id="readingrec" style="overflow:hidden">
63
    <th>Number of renewals</th>
76
    <table id="table_readingrec">
64
	<th>Checked out on</th>
77
      <thead>
65
	<th>Checked out from</th>
78
        <th style="display:none;">Type</th>
66
    <th>Date due</th>
79
        <th>Date</th>
67
    <th>Return date</th>
80
        <th>Title</th>
68
</thead>
81
        <th>Author</th>
69
[% FOREACH issue IN loop_reading %]
82
        <th>Call no.</th>
70
    [% IF  issue.returndate  %]<tr>[% ELSE %]<tr class="onissue">[% END %]
83
        <th>Barcode</th>
71
        <td>
84
        <th>Number of renewals</th>
72
            [% issue.issuestimestamp | $KohaDates %]
85
        <th>Checked out on</th>
73
        </td>
86
        <th>Checked out from</th>
74
        <td><a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=[% issue.biblionumber %]">[% issue.title |html %]</a></td>
87
        <th>Date due</th>
88
        <th>Return date</th>
89
      </thead>
90
      <tbody>
91
      [% FOREACH issue IN loop_reading %]
92
        [% IF  issue.returndate  %]<tr>[% ELSE %]<tr class="onissue">[% END %]
93
          <td style="display:none;">
94
            [% IF issue.inhouse_use %]
95
              inhouse_use
96
            [% ELSE %]
97
              checkout
98
            [% END %]
99
          </td>
100
          <td>
101
            <span title="[% issue.issuestimestamp %]">[% issue.issuestimestamp | $KohaDates %]</span>
102
          </td>
103
          <td><a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=[% issue.biblionumber %]">[% issue.title |html %]</a></td>
75
104
76
        <td>[% issue.author %]</td>
105
          <td>[% issue.author %]</td>
77
106
78
        <td>
107
          <td>
79
            [% IF issue.classification %]
108
            [% IF issue.classification %]
80
                [% issue.classification %]
109
                [% issue.classification %]
81
            [% ELSE %]
110
            [% ELSE %]
82
                [% issue.itemcallnumber %]
111
                [% issue.itemcallnumber %]
83
            [% END %]
112
            [% END %]
84
       </td>
113
          </td>
85
114
86
        <td>[% issue.barcode %]</td>
115
          <td>[% issue.barcode %]</td>
87
116
          <td>[% issue.renewals %]</td>
88
            <td>
117
          <td>[% issue.issuedate | $KohaDates %]</td>
89
        [% issue.renewals %]</td>
118
          <td>[% issue.issuingbranch %]</td>
90
            <td>
119
          <td>
91
        [% issue.issuedate | $KohaDates %]</td>
120
            [% IF issue.date_due %]
92
            <td>
121
              [% issue.date_due | $KohaDates %]
93
        [% issue.issuingbranch %]</td>
122
            [% ELSE %]&nbsp;[% END %]
94
			<td>[% IF issue.date_due %]
123
          </td>
95
                    [% issue.date_due | $KohaDates %]
124
          <td>
96
                [% ELSE %]&nbsp;[% END %]</td>
125
            [% IF  issue.returndate %]
97
            <td>
126
              <span title="[% issue.returndate %]">[% issue.returndate | $KohaDates %]</span>
98
                [% IF  issue.returndate %]
127
            [% ELSE %]
99
                    <span title="[% issue.returndate %]">[% issue.returndate | $KohaDates %]</span>
128
              <span title="Checked Out"><small>Checked Out</small></span>
100
                [% ELSE %]
129
            [% END %]
101
                    <span title="Checked Out"><small>Checked Out</small></span>
130
          </td>
102
                [% END %]
131
        </tr>
103
            </td>
132
      [% END %]
104
</tr>
133
      </tbody>
105
[% END %]
134
    </table>
106
</table>
135
  </div>
136
</div>
137
[% ELSE %]
138
<div class="dialog message">This patron has no circulation history.</div>
107
[% END %]
139
[% END %]
108
</div>
140
</div>
109
</div>
141
</div>
(-)a/koha-tmpl/opac-tmpl/prog/en/css/datatables.css (-100 / +94 lines)
Lines 3-25 input.search_init { Link Here
3
}
3
}
4
.sorting_asc {
4
.sorting_asc {
5
    padding-right: 19px;
5
    padding-right: 19px;
6
    background: url("../../img/asc.gif") no-repeat scroll right center #EEEEEE;
6
    background: url("../../images/asc.gif") no-repeat scroll right center #EEEEEE;
7
}
7
}
8
.sorting_desc {
8
.sorting_desc {
9
    padding-right: 19px;
9
    padding-right: 19px;
10
    background: url("../../img/desc.gif") no-repeat scroll right center #EEEEEE;
10
    background: url("../../images/desc.gif") no-repeat scroll right center #EEEEEE;
11
}
11
}
12
.sorting {
12
.sorting {
13
    padding-right: 19px;
13
    padding-right: 19px;
14
    background: url("../../img/ascdesc.gif") no-repeat scroll right center #EEEEEE;
14
    background: url("../../images/ascdesc.gif") no-repeat scroll right center #EEEEEE;
15
}
15
}
16
.sorting_asc_disabled {
16
.sorting_asc_disabled {
17
    padding-right: 19px;
17
    padding-right: 19px;
18
    background: url("../../img/datatables/sort_asc_disabled.png") no-repeat scroll right center #EEEEEE;
18
    background: url("../../images/datatables/sort_asc_disabled.png") no-repeat scroll right center #EEEEEE;
19
}
19
}
20
.sorting_desc_disabled {
20
.sorting_desc_disabled {
21
    padding-right: 19px;
21
    padding-right: 19px;
22
    background: url("../../img/datatables/sort_desc_disabled.png") no-repeat scroll right center #EEEEEE;
22
    background: url("../../images/datatables/sort_desc_disabled.png") no-repeat scroll right center #EEEEEE;
23
}
23
}
24
.sorting_disabled {
24
.sorting_disabled {
25
    padding-right: 19px;
25
    padding-right: 19px;
Lines 64-75 div.dataTables_filter { Link Here
64
}
64
}
65
div.dataTables_paginate {
65
div.dataTables_paginate {
66
    background-color : #F4F4F4;
66
    background-color : #F4F4F4;
67
    font-size: 110%;
68
    padding : 0;
67
    padding : 0;
69
}
68
}
70
69
71
.paging_full_numbers span.paginate_button,
70
.paging_full_numbers a.paginate_button,
72
.paging_full_numbers span.paginate_active {
71
.paging_full_numbers a.paginate_active {
73
    border-right : 1px solid #AAA;
72
    border-right : 1px solid #AAA;
74
    border-left : 1px solid #FFF;
73
    border-left : 1px solid #FFF;
75
    display : block;
74
    display : block;
Lines 79-126 div.dataTables_paginate { Link Here
79
    cursor: pointer;
78
    cursor: pointer;
80
}
79
}
81
80
82
.paging_full_numbers span.paginate_button {
81
.paging_full_numbers a.paginate_button {
83
    color : #0000CC;
82
    color : #0000CC;
84
}
83
}
85
.paging_full_numbers span.paginate_button.first {
84
.paging_full_numbers a.paginate_button.first {
86
    background-image : url('../../img/first.png');
85
    background-image : url('../../images/first.png');
87
    background-repeat: no-repeat;
86
    background-repeat: no-repeat;
88
    background-position : 2px center;
87
    background-position : 1% center;
89
    padding-left : 2em;
88
    padding-left : 2em;
90
}
89
}
91
.paging_full_numbers span.paginate_button.previous {
90
.paging_full_numbers a.paginate_button.previous {
92
    background-image : url('../../img/prev.png');
91
    background-image : url('../../images/prev.png');
93
    background-repeat: no-repeat;
92
    background-repeat: no-repeat;
94
    background-position : 2px center;
93
    background-position : 1% center;
95
    padding-left : 2em;
94
    padding-left : 2em;
96
}
95
}
97
.paging_full_numbers span.paginate_button.next {
96
.paging_full_numbers a.paginate_button.next {
98
    background-image : url('../../img/next.png');
97
    background-image : url('../../images/next.png');
99
    background-repeat: no-repeat;
98
    background-repeat: no-repeat;
100
    background-position : right center;
99
    background-position : 96% center;
101
    padding-right : 2em;
100
    padding-right : 2em;
102
}
101
}
103
.paging_full_numbers span.paginate_button.last {
102
.paging_full_numbers a.paginate_button.last {
104
    background-image : url('../../img/last.png');
103
    background-image : url('../../images/last.png');
105
    background-repeat: no-repeat;
104
    background-repeat: no-repeat;
106
    background-position : right center;
105
    background-position : 96% center;
107
    border-right : 1px solid #686868;
106
    border-right : 1px solid #686868;
108
    padding-right : 2em;
107
    padding-right : 2em;
109
}
108
}
110
div.bottom.pager .paging_full_numbers span.paginate_button.last {
109
div.bottom.pager .paging_full_numbers a.paginate_button.last {
111
    border-right-width : 0;
110
    border-right-width : 0;
112
}
111
}
113
.paging_full_numbers span.paginate_active {
112
.paging_full_numbers a.paginate_active {
114
    background-color : #FFFFEA;
113
    background-color : #FFFFEA;
115
    color : #000;
114
    color : #000;
116
    font-weight: bold;
115
    font-weight: bold;
117
}
116
}
118
117
119
.paging_full_numbers span.paginate_button:hover {
118
.paging_full_numbers a.paginate_button:hover {
120
    background-color: #FFC;
119
    background-color: #FFC;
121
}
120
}
122
121
123
.paging_full_numbers span.paginate_button.paginate_button_disabled {
122
.paging_full_numbers a.paginate_button.paginate_button_disabled {
124
    color : #666;
123
    color : #666;
125
}
124
}
126
125
Lines 131-137 div.dataTables_paginate.paging_four_button { Link Here
131
    background-color : transparent;
130
    background-color : transparent;
132
    border-right : 1px solid #686868;
131
    border-right : 1px solid #686868;
133
    border-left : 1px solid #FFF;
132
    border-left : 1px solid #FFF;
134
    line-height : 1.8em;
133
    line-height : 2.5em;
135
}
134
}
136
.paginate_disabled_first,
135
.paginate_disabled_first,
137
.paginate_enabled_first,
136
.paginate_enabled_first,
Lines 141-195 div.dataTables_paginate.paging_four_button { Link Here
141
.paginate_enabled_next,
140
.paginate_enabled_next,
142
.paginate_disabled_last,
141
.paginate_disabled_last,
143
.paginate_enabled_last {
142
.paginate_enabled_last {
144
    float: left;
143
    cursor: pointer;
145
    height: 16px;
144
    *cursor: hand;
146
    margin: .5em;
145
    padding: .1em 0;
147
    width: 16px;
146
}
147
148
.paginate_disabled_previous,
149
.paginate_enabled_previous,
150
.paginate_disabled_next,
151
.paginate_enabled_next {
152
    color: #111 !important;
153
}
154
155
.paginate_disabled_previous,
156
.paginate_enabled_previous {
157
    padding-left: 23px;
148
}
158
}
159
.paginate_disabled_next,
160
.paginate_enabled_next,
161
.paginate_disabled_last,
162
.paginate_enabled_last {
163
    padding-right: 23px;
164
    margin-left: 10px;
165
    margin-right : .3em;
166
}
167
168
.paging_four_button .paginate_disabled_first,
169
.paging_four_button .paginate_disabled_previous,
170
.paging_four_button .paginate_enabled_first,
171
.paging_four_button .paginate_enabled_previous  {
172
    margin-left : .3em;
173
}
174
149
.paginate_disabled_first {
175
.paginate_disabled_first {
150
    background-image: url("../../img/first-disabled.png");
176
    background: transparent url("../../images/first-disabled.png") no-repeat 3px top;
151
}
177
}
152
.paginate_enabled_first {
178
.paginate_enabled_first {
153
    background-image: url("../../img/first.png");
179
    background: transparent url("../../images/first.png") no-repeat 3px top;
154
    cursor: pointer;
180
    cursor: pointer;
155
}
181
}
156
.paginate_disabled_previous {
182
.paginate_disabled_previous {
157
    background-image: url("../../img/prev-disabled.png");
183
    background: transparent url("../../images/prev-disabled.png") no-repeat 3px top;
158
}
184
}
159
.paginate_enabled_previous {
185
.paginate_enabled_previous {
160
    background-image: url("../../img/prev.png");
186
    background: transparent url("../../images/prev.png") no-repeat 3px top;
161
    cursor: pointer;
187
    cursor: pointer;
162
}
188
}
163
.paginate_disabled_next {
189
.paginate_disabled_next {
164
    background-image: url("../../img/next-disabled.png");
190
    background: transparent url("../../images/next-disabled.png") no-repeat right top;
165
}
191
}
166
.paginate_enabled_next {
192
.paginate_enabled_next {
167
    background-image: url("../../img/next.png");
193
    background: transparent url("../../images/next.png") no-repeat right top;
168
    cursor: pointer;
194
    cursor: pointer;
169
}
195
}
170
.paginate_disabled_last {
196
.paginate_disabled_last {
171
    background-image: url("../../img/last-disabled.png");
197
    background: transparent url("../../images/last-disabled.png") no-repeat right top;
172
}
198
}
173
.paginate_enabled_last {
199
.paginate_enabled_last {
174
    background-image: url("../../img/last.png");
200
    background: transparent url("../../images/last.png") no-repeat right top;
175
    cursor: pointer;
201
    cursor: pointer;
176
}
202
}
177
203
178
179
/*
180
table.display {
181
    width: 100%;
182
}
183
table.display thead th {
184
    border-bottom: 1px solid black;
185
    cursor: pointer;
186
    font-weight: bold;
187
    padding: 3px 18px 3px 10px;
188
}
189
.dataTables_wrapper {
190
    clear: both;
191
    position: relative;
192
}
193
.dataTables_processing {
204
.dataTables_processing {
194
    background-color: white;
205
    background-color: white;
195
    border: 1px solid #DDDDDD;
206
    border: 1px solid #DDDDDD;
Lines 205-265 table.display thead th { Link Here
205
    top: 50%;
216
    top: 50%;
206
    width: 250px;
217
    width: 250px;
207
}
218
}
208
.dataTables_info {
209
    float: left;
210
    width: 60%;
211
}
212
.dataTables_paginate {
213
    float: right;
214
    text-align: right;
215
    width: 44px;
216
}
217
.paging_full_numbers {
218
    height: 22px;
219
    line-height: 22px;
220
    width: 400px;
221
}
222
.paging_full_numbers span.paginate_button,
223
     .paging_full_numbers span.paginate_active {
224
    border: 1px solid #aaa;
225
    -webkit-border-radius: 5px;
226
    -moz-border-radius: 5px;
227
    padding: 2px 5px;
228
    margin: 0 3px;
229
    cursor: pointer;
230
    *cursor: hand;
231
}
232
219
233
.paging_full_numbers span.paginate_button {
220
tr.odd.selected td {
234
    background-color: #ddd;
221
    background-color: #D3D3D3;
235
}
222
}
236
223
237
.paging_full_numbers span.paginate_button:hover {
224
tr.even.selected td {
238
    background-color: #ccc;
225
    background-color: #D3D3D3;
239
}
226
}
240
227
241
.paging_full_numbers span.paginate_active {
228
/* ColumnFilter */
242
    background-color: #99B3FF;
229
span.filter_column > input.text_filter {
243
}
230
    font-size: 80%;
244
.paginate_disabled_previous, .paginate_enabled_previous, .paginate_disabled_next, .paginate_enabled_next {
231
    width: 100%;
245
    float: left;
246
    height: 19px;
247
    margin-left: 3px;
248
    width: 19px;
249
}
232
}
250
.paginate_disabled_previous {
233
251
    background-image: url("../../img/datatables/back_disabled.jpg");
234
div.pager {
235
    background-color : #E8E8E8;
236
    border : 1px solid #BCBCBC;
237
    -moz-border-radius : 5px;
238
    border-radius : 5px;
239
    display : inline-block;
240
    font-size : 85%;
241
    padding : .3em .5em .3em .5em;
242
    margin : .4em 0;
252
}
243
}
253
.paginate_enabled_previous {
244
div.pager img {
254
    background-image: url("../../img/datatables/back_enabled.jpg");
245
    vertical-align : middle;
255
}
246
}
256
.paginate_disabled_next {
247
257
    background-image: url("../../img/datatables/forward_disabled.jpg");
248
div.pager img.last {
249
    padding-right: 5px;
258
}
250
}
259
.paginate_enabled_next {
251
div.pager input.pagedisplay {
260
    background-image: url("../../img/datatables/forward_enabled.jpg");
252
    border : 0;
253
    background-color : transparent;
254
    font-weight: bold;
255
    text-align : center;
261
}
256
}
262
.spacer {
257
div.pager p {
263
    clear: both;
258
    margin: 0;
264
    height: 20px;
265
}
259
}
(-)a/koha-tmpl/opac-tmpl/prog/en/includes/item-status.inc (+8 lines)
Lines 19-29 not use an API to fetch items that populates item.datedue. Link Here
19
        [% END %]
19
        [% END %]
20
    [% END %]
20
    [% END %]
21
[% ELSIF ( item.datedue || issue.date_due ) %]
21
[% ELSIF ( item.datedue || issue.date_due ) %]
22
  [% IF inhouse_use %]
23
    [% IF ( OPACShowCheckoutName ) %]
24
        Currently in local use by [% item.cardnumber %] [% item.firstname %] [% item.surname %]
25
    [% ELSE %]
26
        Currently in local use
27
    [% END %]
28
  [% ELSE %]
22
    [% IF ( OPACShowCheckoutName ) %]
29
    [% IF ( OPACShowCheckoutName ) %]
23
        Checked out to [% item.cardnumber %] [% item.firstname %] [% item.surname %]
30
        Checked out to [% item.cardnumber %] [% item.firstname %] [% item.surname %]
24
    [% ELSE %]
31
    [% ELSE %]
25
        Checked out
32
        Checked out
26
    [% END %]
33
    [% END %]
34
  [% END %]
27
[% ELSIF ( item.transfertwhen ) %]
35
[% ELSIF ( item.transfertwhen ) %]
28
    In transit from [% item.transfertfrom %]
36
    In transit from [% item.transfertfrom %]
29
    to [% item.transfertto %] since [% item.transfertwhen %]
37
    to [% item.transfertto %] since [% item.transfertwhen %]
(-)a/koha-tmpl/opac-tmpl/prog/en/js/datatables.js (-1 / +1 lines)
Lines 97-100 jQuery.extend( jQuery.fn.dataTableExt.oSort, { Link Here
97
        }
97
        }
98
    });
98
    });
99
99
100
}());
100
}());
(-)a/koha-tmpl/opac-tmpl/prog/en/modules/opac-readingrecord.tt (-37 / +63 lines)
Lines 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