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

(-)a/koha-tmpl/intranet-tmpl/prog/en/includes/checkouts-table.inc (-3 / +4 lines)
Lines 9-17 Link Here
9
            <table id="issues-table" style="width: 100% !Important;">
9
            <table id="issues-table" style="width: 100% !Important;">
10
                <thead>
10
                <thead>
11
                    <tr>
11
                    <tr>
12
                        <th scope="col">&nbsp;</th>
12
                        <th scope="col">Date sorting (hidden)</th>
13
                        <th scope="col">&nbsp;</th>
13
                        <th scope="col">Today or previous (hidden)</th>
14
                        <th scope="col">Due date</th>
14
                        <th scope="col">Due date, unformatted (hidden)</th>
15
                        <th scope="col">Initial sort order (hidden)</th>
15
                        <th scope="col">Due date</th>
16
                        <th scope="col">Due date</th>
16
                        <th scope="col">Title</th>
17
                        <th scope="col">Title</th>
17
                        <th scope="col">Item type</th>
18
                        <th scope="col">Item type</th>
(-)a/koha-tmpl/intranet-tmpl/prog/en/js/checkouts.js (-2 / +14 lines)
Lines 159-164 $(document).ready(function() { Link Here
159
            "sDom": "<'row-fluid'<'span6'><'span6'>r>t<'row-fluid'>t",
159
            "sDom": "<'row-fluid'<'span6'><'span6'>r>t<'row-fluid'>t",
160
            "aoColumns": [
160
            "aoColumns": [
161
                {
161
                {
162
                    "bVisible": false,
162
                    "mDataProp": function( oObj ) {
163
                    "mDataProp": function( oObj ) {
163
                        if ( oObj.issued_today ) {
164
                        if ( oObj.issued_today ) {
164
                            return "1" + oObj.timestamp;
165
                            return "1" + oObj.timestamp;
Lines 168-173 $(document).ready(function() { Link Here
168
                    }
169
                    }
169
                },
170
                },
170
                {
171
                {
172
                    "bVisible": false,
171
                    "mDataProp": function( oObj ) {
173
                    "mDataProp": function( oObj ) {
172
                        if ( oObj.issued_today ) {
174
                        if ( oObj.issued_today ) {
173
                            return "<strong>" + TODAYS_CHECKOUTS + "</strong>";
175
                            return "<strong>" + TODAYS_CHECKOUTS + "</strong>";
Lines 177-187 $(document).ready(function() { Link Here
177
                    }
179
                    }
178
                },
180
                },
179
                {
181
                {
182
                    "bVisible": false,
180
                    "mDataProp": "date_due",
183
                    "mDataProp": "date_due",
184
                },
185
                {
181
                    "bVisible": false,
186
                    "bVisible": false,
187
                    "mDataProp": function( oObj ) {
188
                        if ( oObj.issued_today ) {
189
                            return "1" + oObj.sort_order;
190
                        } else {
191
                            return "0" + oObj.sort_order;
192
                        }
193
                    }
182
                },
194
                },
183
                {
195
                {
184
                    "iDataSort": 1, // Sort on hidden unformatted date due column
196
                    "iDataSort": 0, // Sort on hidden unformatted date due column
185
                    "mDataProp": function( oObj ) {
197
                    "mDataProp": function( oObj ) {
186
                        if ( oObj.date_due_overdue ) {
198
                        if ( oObj.date_due_overdue ) {
187
                            return "<span class='overdue'>" + oObj.date_due_formatted + "</span>";
199
                            return "<span class='overdue'>" + oObj.date_due_formatted + "</span>";
Lines 379-385 $(document).ready(function() { Link Here
379
        }).rowGrouping(
391
        }).rowGrouping(
380
            {
392
            {
381
                iGroupingColumnIndex: 1,
393
                iGroupingColumnIndex: 1,
382
                iGroupingOrderByColumnIndex: 0,
394
                iGroupingOrderByColumnIndex: 3,
383
                sGroupingColumnSortDirection: "desc"
395
                sGroupingColumnSortDirection: "desc"
384
            }
396
            }
385
        );
397
        );
(-)a/svc/checkouts (-1 / +7 lines)
Lines 191-200 while ( my $c = $sth->fetchrow_hashref() ) { Link Here
191
    }
191
    }
192
}
192
}
193
193
194
my $i;
195
194
@checkouts_today = reverse(@checkouts_today)
196
@checkouts_today = reverse(@checkouts_today)
195
  if ( C4::Context->preference('todaysIssuesDefaultSortOrder') eq 'desc' );
197
  if ( C4::Context->preference('todaysIssuesDefaultSortOrder') eq 'desc' );
198
$i = 0;
199
map { $_->{sort_order} = $i++ } @checkouts_today;
200
196
@checkouts_previous = reverse(@checkouts_previous)
201
@checkouts_previous = reverse(@checkouts_previous)
197
  if ( C4::Context->preference('previousIssuesDefaultSortOrder') eq 'desc' );
202
  if ( C4::Context->preference('previousIssuesDefaultSortOrder') eq 'desc' );
203
$i = 0;
204
map { $_->{sort_order} = $i++ } @checkouts_previous;
198
205
199
my @checkouts = ( @checkouts_today, @checkouts_previous );
206
my @checkouts = ( @checkouts_today, @checkouts_previous );
200
207
201
- 

Return to bug 13237