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

(-)a/C4/Utils/DataTables/Members.pm (-4 / +4 lines)
Lines 27-33 sub search { Link Here
27
    }
27
    }
28
28
29
    my $dbh = C4::Context->dbh;
29
    my $dbh = C4::Context->dbh;
30
    my $select = "SELECT SQL_CALC_FOUND_ROWS
30
    my $select = "SELECT
31
        borrowers.borrowernumber, borrowers.surname, borrowers.firstname, borrowers.address,
31
        borrowers.borrowernumber, borrowers.surname, borrowers.firstname, borrowers.address,
32
        borrowers.address2, borrowers.city, borrowers.zipcode, borrowers.country,
32
        borrowers.address2, borrowers.city, borrowers.zipcode, borrowers.country,
33
        CAST(borrowers.cardnumber AS UNSIGNED) AS cardnumber, borrowers.dateexpiry,
33
        CAST(borrowers.cardnumber AS UNSIGNED) AS cardnumber, borrowers.dateexpiry,
Lines 80-86 sub search { Link Here
80
        if @where_strs_or;
80
        if @where_strs_or;
81
81
82
    my $where;
82
    my $where;
83
    $where = "WHERE " . join (" AND ", @where_strs) if @where_strs;
83
    $where = " WHERE " . join (" AND ", @where_strs) if @where_strs;
84
    my $orderby = dt_build_orderby($dt_params);
84
    my $orderby = dt_build_orderby($dt_params);
85
85
86
    my $limit;
86
    my $limit;
Lines 104-112 sub search { Link Here
104
    my $patrons = $sth->fetchall_arrayref({});
104
    my $patrons = $sth->fetchall_arrayref({});
105
105
106
    # Get the iTotalDisplayRecords DataTable variable
106
    # Get the iTotalDisplayRecords DataTable variable
107
    $query = "SELECT FOUND_ROWS()";
107
    $query = "SELECT COUNT(*) " . $from . ($where ? $where : "");
108
    $sth = $dbh->prepare($query);
108
    $sth = $dbh->prepare($query);
109
    $sth->execute;
109
    $sth->execute(@where_args);
110
    ($iTotalDisplayRecords) = $sth->fetchrow_array;
110
    ($iTotalDisplayRecords) = $sth->fetchrow_array;
111
111
112
    # Get the iTotalRecords DataTable variable
112
    # Get the iTotalRecords DataTable variable
(-)a/koha-tmpl/intranet-tmpl/prog/en/includes/patron-search.inc (-2 / +2 lines)
Lines 91-98 Link Here
91
        <option value="[% categorie.categorycode %]" selected="selected">[% categorie.description %]</option>[% ELSE %]
91
        <option value="[% categorie.categorycode %]" selected="selected">[% categorie.description %]</option>[% ELSE %]
92
        <option value="[% categorie.categorycode %]">[% categorie.description %]</option>[% END %]
92
        <option value="[% categorie.categorycode %]">[% categorie.description %]</option>[% END %]
93
      [% END %]</select>
93
      [% END %]</select>
94
	</p>
94
    </p>
95
	[% END %]
95
    [% END %]
96
</form>
96
</form>
97
	</div>
97
	</div>
98
98
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/members/member.tt (-5 / +5 lines)
Lines 2-7 Link Here
2
<title>Koha &rsaquo; Patrons [% IF ( searching ) %]&rsaquo; Search results[% END %]</title>
2
<title>Koha &rsaquo; Patrons [% IF ( searching ) %]&rsaquo; Search results[% END %]</title>
3
[% INCLUDE 'doc-head-close.inc' %]
3
[% INCLUDE 'doc-head-close.inc' %]
4
<script type="text/javascript" src="[% themelang %]/lib/jquery/plugins/jquery.dataTables.min.js"></script>
4
<script type="text/javascript" src="[% themelang %]/lib/jquery/plugins/jquery.dataTables.min.js"></script>
5
[% INCLUDE 'datatables-strings.inc' %]
5
<script type="text/javascript" src="[% themelang %]/js/datatables.js"></script>
6
<script type="text/javascript" src="[% themelang %]/js/datatables.js"></script>
6
<link rel="stylesheet" type="text/css" href="[% themelang %]/css/datatables.css" />
7
<link rel="stylesheet" type="text/css" href="[% themelang %]/css/datatables.css" />
7
<script type="text/javascript">
8
<script type="text/javascript">
Lines 92-98 Link Here
92
                { 'mDataProp': 'dt_dateexpiry' },
93
                { 'mDataProp': 'dt_dateexpiry' },
93
                { 'mDataProp': 'dt_od_checkouts', 'bSortable': false },
94
                { 'mDataProp': 'dt_od_checkouts', 'bSortable': false },
94
                { 'mDataProp': 'dt_fines', 'bSortable': false },
95
                { 'mDataProp': 'dt_fines', 'bSortable': false },
95
                { 'mDataProp': 'dt_borrowernotes', 'bSortable': false },
96
                { 'mDataProp': 'dt_borrowernotes' },
96
                { 'mDataProp': 'dt_action', 'bSortable': false }
97
                { 'mDataProp': 'dt_action', 'bSortable': false }
97
            ],
98
            ],
98
            'fnRowCallback': function(nRow, aData, iDisplayIndex, iDisplayIndexFull) {
99
            'fnRowCallback': function(nRow, aData, iDisplayIndex, iDisplayIndexFull) {
Lines 212-218 Link Here
212
                  <tr>
213
                  <tr>
213
                    <th>Card</th>
214
                    <th>Card</th>
214
                    <th>Name</th>
215
                    <th>Name</th>
215
                    <th>Cat</th>
216
                    <th>Category</th>
216
                    <th>Library</th>
217
                    <th>Library</th>
217
                    <th>Expires on</th>
218
                    <th>Expires on</th>
218
                    <th>OD/Checkouts</th>
219
                    <th>OD/Checkouts</th>
Lines 261-269 Link Here
261
                  <option value='phone'>Phone number</option>
262
                  <option value='phone'>Phone number</option>
262
                [% END %]
263
                [% END %]
263
                [% IF searchfieldstype == "address" %]
264
                [% IF searchfieldstype == "address" %]
264
                  <option selected="selected" value='address'>Street Address</option>
265
                  <option selected="selected" value='address'>Street address</option>
265
                [% ELSE %]
266
                [% ELSE %]
266
                  <option value='address'>Street Address</option>
267
                  <option value='address'>Street address</option>
267
                [% END %]
268
                [% END %]
268
                [% IF searchfieldstype == "dateofbirth" %]
269
                [% IF searchfieldstype == "dateofbirth" %]
269
                  <option selected="selected" value='dateofbirth'>Date of birth</option>
270
                  <option selected="selected" value='dateofbirth'>Date of birth</option>
270
- 

Return to bug 9811