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

(-)a/circ/overdue.pl (-26 lines)
Lines 105-124 for my $attrcode (grep { /^patron_attr_filter_/ } $input->multi_param) { Link Here
105
my $have_pattr_filter_data = keys(%cgi_attrcode_to_attrvalues) > 0;
105
my $have_pattr_filter_data = keys(%cgi_attrcode_to_attrvalues) > 0;
106
106
107
my @patron_attr_filter_loop;   # array of [ domid cgivalue ismany isclone ordinal code description repeatable authorised_value_category ]
107
my @patron_attr_filter_loop;   # array of [ domid cgivalue ismany isclone ordinal code description repeatable authorised_value_category ]
108
my @patron_attr_order_loop;    # array of { label => $patron_attr_label, value => $patron_attr_order }
109
110
my @sort_roots = qw(borrower title barcode date_due);
111
push @sort_roots, map {$_ . " desc"} @sort_roots;
112
my @order_loop = ({selected => $order ? 0 : 1});   # initial blank row
113
foreach (@sort_roots) {
114
    my $tmpl_name = $_;
115
    $tmpl_name =~ s/\s/_/g;
116
    push @order_loop, {
117
        selected => $order eq $_ ? 1 : 0,
118
        ordervalue => $_,
119
        'order_' . $tmpl_name => 1,
120
    };
121
}
122
108
123
my $sth = $dbh->prepare('SELECT code,description,repeatable,authorised_value_category
109
my $sth = $dbh->prepare('SELECT code,description,repeatable,authorised_value_category
124
    FROM borrower_attribute_types
110
    FROM borrower_attribute_types
Lines 139-157 while (my $row = $sth->fetchrow_hashref) { Link Here
139
        $row->{isclone} = $isclone;
125
        $row->{isclone} = $isclone;
140
        push @patron_attr_filter_loop, { %$row };  # careful: must store a *deep copy* of the modified row
126
        push @patron_attr_filter_loop, { %$row };  # careful: must store a *deep copy* of the modified row
141
    } continue { $isclone = 1, ++$serial }
127
    } continue { $isclone = 1, ++$serial }
142
    foreach my $sortorder ('asc', 'desc') {
143
        my $ordervalue = "patron_attr_${sortorder}_${code}";
144
        push @order_loop, {
145
            selected => $order eq $ordervalue ? 1 : 0,
146
            ordervalue => $ordervalue,
147
            label => $row->{description},
148
            $sortorder => 1,
149
        };
150
    }
151
} continue { ++$ordinal }
128
} continue { ++$ordinal }
152
for (@patron_attr_order_loop) { $_->{selected} = 1 if $order eq $_->{value} }
153
154
$template->param(ORDER_LOOP => \@order_loop);
155
129
156
my %borrowernumber_to_attributes;    # hash of { borrowernumber => { attrcode => [ [val,display], [val,display], ... ] } }
130
my %borrowernumber_to_attributes;    # hash of { borrowernumber => { attrcode => [ [val,display], [val,display], ... ] } }
157
                                     #   i.e. val differs from display when attr is an authorised value
131
                                     #   i.e. val differs from display when attr is an authorised value
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/overdue.tt (-27 / +8 lines)
Lines 3-8 Link Here
3
<title>Koha &rsaquo; Circulation &rsaquo; Items overdue as of [% todaysdate %]</title>
3
<title>Koha &rsaquo; Circulation &rsaquo; Items overdue as of [% todaysdate %]</title>
4
[% INCLUDE 'doc-head-close.inc' %]
4
[% INCLUDE 'doc-head-close.inc' %]
5
[% INCLUDE 'calendar.inc' %]
5
[% INCLUDE 'calendar.inc' %]
6
[% INCLUDE 'datatables.inc' %]
7
<link rel="stylesheet" type="text/css" href="[% interface %]/[% theme %]/css/datatables.css" />
6
[%- USE Branches -%]
8
[%- USE Branches -%]
7
<script type="text/javascript">
9
<script type="text/javascript">
8
 //<![CDATA[
10
 //<![CDATA[
Lines 59-64 Link Here
59
            };
61
            };
60
        });
62
        });
61
    }
63
    }
64
65
    $(document).ready(function(){
66
        $("#overduest").dataTable($.extend(true, {}, dataTablesDefaults, {
67
            "sPaginationType": "four_button"
68
        }));
69
    });
62
//]]>
70
//]]>
63
</script>
71
</script>
64
<style type="text/css">
72
<style type="text/css">
Lines 233-264 Link Here
233
        </select>
241
        </select>
234
    </li>
242
    </li>
235
243
236
    <li><label for="order">Sort by:</label> <select name="order" id="order">
237
[% FOREACH ORDER_LOO IN ORDER_LOOP %]
238
    [% IF ( ORDER_LOO.selected ) %]
239
    <option value="[% ORDER_LOO.ordervalue %]" selected="selected">
240
    [% ELSE %]
241
    <option value="[% ORDER_LOO.ordervalue %]">
242
    [% END %]
243
    [% IF ( ORDER_LOO.order_date_due ) %]Due date
244
    [% ELSIF ( ORDER_LOO.order_borrower ) %]Patron
245
    [% ELSIF ( ORDER_LOO.order_barcode ) %]Barcode
246
    [% ELSIF ( ORDER_LOO.order_title ) %]Title
247
    [% ELSIF ( ORDER_LOO.order_date_due_desc ) %]Due date desc
248
    [% ELSIF ( ORDER_LOO.order_borrower_desc ) %]Patron desc
249
    [% ELSIF ( ORDER_LOO.order_barcode_desc ) %]Barcode desc
250
    [% ELSIF ( ORDER_LOO.order_title_desc ) %]Title desc
251
    [% ELSE %][% ORDER_LOO.label %]
252
        [% IF ( ORDER_LOO.desc ) %]desc[% END %]
253
    [% END %]
254
    </option>
255
[% END %]
256
	[% FOREACH patron_attr_order_loo IN patron_attr_order_loop %]
257
        [% IF ( patron_attr_order_loo.selected ) %]<option value="[% patron_attr_order_loo.value |html %]" selected="selected">[% patron_attr_order_loo.label %]</option>
258
        [% ELSE %]<option value="[% patron_attr_order_loo.value |html %]">[% patron_attr_order_loo.label %]</option>[% END %]
259
	[% END %]
260
</select></li>
261
262
<li class="radio"><label for="showall">Show any items currently checked out:</label>
244
<li class="radio"><label for="showall">Show any items currently checked out:</label>
263
	[% IF ( showall ) %]
245
	[% IF ( showall ) %]
264
            <input type="checkbox" id="showall" name="showall" value="show" checked="checked" />
246
            <input type="checkbox" id="showall" name="showall" value="show" checked="checked" />
265
- 

Return to bug 8548