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

(-)a/ill/ill-requests.pl (-3 / +2 lines)
Lines 223-235 if ( $backends_available ) { Link Here
223
        my $active_filters = [];
223
        my $active_filters = [];
224
        foreach my $filter(@{$possible_filters}) {
224
        foreach my $filter(@{$possible_filters}) {
225
            if ($params->{$filter}) {
225
            if ($params->{$filter}) {
226
                push @{$active_filters},
226
                push @{$active_filters}, "$filter=$params->{$filter}";
227
                    { name => $filter, value => $params->{$filter}};
228
            }
227
            }
229
        }
228
        }
230
        if (scalar @{$active_filters} > 0) {
229
        if (scalar @{$active_filters} > 0) {
231
            $template->param(
230
            $template->param(
232
                prefilters => $active_filters
231
                prefilters => join(",", @{$active_filters})
233
            );
232
            );
234
        }
233
        }
235
    } else {
234
    } else {
(-)a/koha-tmpl/intranet-tmpl/prog/en/includes/circ-menu.inc (-1 / +1 lines)
Lines 119-125 Link Here
119
        [% IF houseboundview %]<li class="active">[% ELSE %]<li>[% END %]<a href="/cgi-bin/koha/members/housebound.pl?borrowernumber=[% patron.borrowernumber %]">Housebound</a></li>
119
        [% IF houseboundview %]<li class="active">[% ELSE %]<li>[% END %]<a href="/cgi-bin/koha/members/housebound.pl?borrowernumber=[% patron.borrowernumber %]">Housebound</a></li>
120
    [% END %]
120
    [% END %]
121
    [% IF Koha.Preference('ILLModule') && CAN_user_ill %]
121
    [% IF Koha.Preference('ILLModule') && CAN_user_ill %]
122
        <li><a href="/cgi-bin/koha/ill/ill-requests.pl?borrowernumber=[% patron.borrowernumber %]">Interlibrary loans</a></li>
122
        [% IF illview %]<li class="active">[% ELSE %]<li>[% END %]<a href="/cgi-bin/koha/members/ill-requests.pl?borrowernumber=[% patron.borrowernumber %]">Interlibrary loans</a></li>
123
    [% END %]
123
    [% END %]
124
</ul></div>
124
</ul></div>
125
[% END %]
125
[% END %]
(-)a/koha-tmpl/intranet-tmpl/prog/en/includes/ill-list-table.inc (+17 lines)
Line 0 Link Here
1
<table id="ill-requests"[% IF prefilters.length > 0 %] data-prefilters="[% prefilters %]"[% END %]>
2
    <thead>
3
        <tr id="illview-header">
4
            <th>Author</th>
5
            <th>Title</th>
6
            <th>Patron</th>
7
            <th>Biblio ID</th>
8
            <th>Library</th>
9
            <th>Status</th>
10
            <th>Updated on</th>
11
            <th>Request number</th>
12
            <th class="actions"></th>
13
        </tr>
14
    </thead>
15
    <tbody id="illview-body">
16
    </tbody>
17
</table>
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/ill/ill-requests.tt (-289 / +3 lines)
Lines 9-285 Link Here
9
[% Asset.js("lib/jquery/plugins/jquery.checkboxes.min.js") %]
9
[% Asset.js("lib/jquery/plugins/jquery.checkboxes.min.js") %]
10
[% Asset.css("css/datatables.css") %]
10
[% Asset.css("css/datatables.css") %]
11
[% INCLUDE 'datatables.inc' %]
11
[% INCLUDE 'datatables.inc' %]
12
<script type="text/javascript">
12
[% Asset.js("js/ill-list-table.js") %]
13
    //<![CDATA[
14
    $(document).ready(function() {
15
16
        // Illview Datatable setup
17
18
        // Fields we don't want to display
19
        var ignore = [
20
            'accessurl',
21
            'backend',
22
            'branchcode',
23
            'completed',
24
            'capabilities',
25
            'cost',
26
            'medium',
27
            'notesopac',
28
            'notesstaff',
29
            'placed',
30
            'replied'
31
        ];
32
33
        // Fields we need to expand (flatten)
34
        var expand = [
35
            'metadata',
36
            'patron'
37
        ];
38
39
        // Expanded fields
40
        // This is auto populated
41
        var expanded = {};
42
43
        // The core fields that should be displayed first
44
        var core = [
45
            'metadata_Author',
46
            'metadata_Title',
47
            'borrowername',
48
            'biblio_id',
49
            'library',
50
            'status',
51
            'updated',
52
            'illrequest_id',
53
            'action'
54
        ];
55
56
        // Remove any fields we're ignoring
57
        var removeIgnore = function(dataObj) {
58
            dataObj.forEach(function(thisRow) {
59
                ignore.forEach(function(thisIgnore) {
60
                    if (thisRow.hasOwnProperty(thisIgnore)) {
61
                        delete thisRow[thisIgnore];
62
                    }
63
                });
64
            });
65
        };
66
67
        // Expand any fields we're expanding
68
        var expandExpand = function(row) {
69
            expand.forEach(function(thisExpand) {
70
                if (row.hasOwnProperty(thisExpand)) {
71
                    if (!expanded.hasOwnProperty(thisExpand)) {
72
                        expanded[thisExpand] = [];
73
                    }
74
                    var expandObj = row[thisExpand];
75
                    Object.keys(expandObj).forEach(
76
                        function(thisExpandCol) {
77
                            var expColName = thisExpand + '_' + thisExpandCol;
78
                            // Keep a list of fields that have been expanded
79
                            // so we can create toggle links for them
80
                            if (expanded[thisExpand].indexOf(expColName) == -1) {
81
                                expanded[thisExpand].push(expColName);
82
                            }
83
                            expandObj[expColName] =
84
                                expandObj[thisExpandCol];
85
                            delete expandObj[thisExpandCol];
86
                        }
87
                    );
88
                    $.extend(true, row, expandObj);
89
                    delete row[thisExpand];
90
                }
91
            });
92
        };
93
94
        // Build a de-duped list of all column names
95
        var allCols = {};
96
        core.map(function(thisCore) {
97
            allCols[thisCore] = 1;
98
        });
99
100
        // Strip the expand prefix if it exists, we do this for display
101
        var stripPrefix = function(value) {
102
            expand.forEach(function(thisExpand) {
103
                var regex = new RegExp(thisExpand + '_', 'g');
104
                value = value.replace(regex, '');
105
            });
106
            return value;
107
        };
108
109
        // Our 'render' function for borrowerlink
110
        var createPatronLink = function(data, type, row) {
111
            return '<a title="' + _("View borrower details") + '" ' +
112
                'href="/cgi-bin/koha/members/moremember.pl?' +
113
                'borrowernumber='+row.borrowernumber+'">' +
114
                row.patron_firstname + ' ' + row.patron_surname +
115
                '</a>';
116
        };
117
118
        // Our 'render' function for the library name
119
        var createLibrary = function(data, type, row) {
120
            return row.library.branchname;
121
        };
122
123
        // Render function for request ID
124
        var createRequestId = function(data, type, row) {
125
            return row.id_prefix + row.illrequest_id;
126
        };
127
128
        // Render function for request status
129
        var createStatus = function(data, type, row, meta) {
130
            var origData = meta.settings.oInit.originalData;
131
            if (origData.length > 0) {
132
                var status_name = meta.settings.oInit.originalData[0].capabilities[
133
                    row.status
134
                ].name;
135
                switch( status_name ) {
136
                    case "New request":
137
                        return _("New request");
138
                    case "Requested":
139
                        return _("Requested");
140
                    case "Requested from partners":
141
                        return _("Requested from partners");
142
                    case "Request reverted":
143
                        return _("Request reverted");
144
                    case "Queued request":
145
                        return _("Queued request");
146
                    case "Cancellation requested":
147
                        return _("Cancellation requested");
148
                    case "Completed":
149
                        return _("Completed");
150
                    case "Delete request":
151
                        return _("Delete request");
152
                    default:
153
                        return status_name;
154
                }
155
            } else {
156
                return '';
157
            }
158
        };
159
160
        // Render function for creating a row's action link
161
        var createActionLink = function(data, type, row) {
162
            return '<a class="btn btn-default btn-sm" ' +
163
                'href="/cgi-bin/koha/ill/ill-requests.pl?' +
164
                'method=illview&amp;illrequest_id=' +
165
                row.illrequest_id +
166
                '">' + _("Manage request") + '</a>';
167
        };
168
169
        // Columns that require special treatment
170
        var specialCols = {
171
            action: {
172
                name: '',
173
                func: createActionLink
174
            },
175
            borrowername: {
176
                name: _("Patron"),
177
                func: createPatronLink
178
            },
179
            illrequest_id: {
180
                name: _("Request number"),
181
                func: createRequestId
182
            },
183
            status: {
184
                name: _("Status"),
185
                func: createStatus
186
            },
187
            biblio_id: {
188
                name: _("Biblio ID")
189
            },
190
            library: {
191
                name: _("Library"),
192
                func: createLibrary
193
            }
194
        };
195
196
        // Toggle request attributes in Illview
197
        $('#toggle_requestattributes').on('click', function(e) {
198
            e.preventDefault();
199
            $('#requestattributes').toggleClass('content_hidden');
200
        });
201
202
        // Filter partner list
203
        $('#partner_filter').keyup(function() {
204
            var needle = $('#partner_filter').val();
205
            $('#partners > option').each(function() {
206
                var regex = new RegExp(needle, 'i');
207
                if (
208
                    needle.length == 0 ||
209
                    $(this).is(':selected') ||
210
                    $(this).text().match(regex)
211
                ) {
212
                    $(this).show();
213
                } else {
214
                    $(this).hide();
215
                }
216
            });
217
        });
218
219
        // Get our data from the API and process it prior to passing
220
        // it to datatables
221
        var ajax = $.ajax(
222
            '/api/v1/illrequests?embed=metadata,patron,capabilities,library'
223
            ).done(function() {
224
                var data = JSON.parse(ajax.responseText);
225
                // Make a copy, we'll be removing columns next and need
226
                // to be able to refer to data that has been removed
227
                var dataCopy = $.extend(true, [], data);
228
                // Remove all columns we're not interested in
229
                removeIgnore(dataCopy);
230
                // Expand columns that need it and create an array
231
                // of all column names
232
                $.each(dataCopy, function(k, row) {
233
                    expandExpand(row);
234
                });
235
236
                // Assemble an array of column definitions for passing
237
                // to datatables
238
                var colData = [];
239
                Object.keys(allCols).forEach(function(thisCol) {
240
                    // Create the base column object
241
                    var colObj = {
242
                        name: thisCol,
243
                        className: thisCol
244
                    };
245
                    // We may need to process the data going in this
246
                    // column, so do it if necessary
247
                    if (
248
                        specialCols.hasOwnProperty(thisCol) &&
249
                        specialCols[thisCol].hasOwnProperty('func')
250
                    ) {
251
                        colObj.render = specialCols[thisCol].func;
252
                    } else {
253
                        colObj.data = thisCol;
254
                    }
255
                    colData.push(colObj);
256
                });
257
258
                // Initialise the datatable
259
                $('#ill-requests').DataTable($.extend(true, {}, dataTablesDefaults, {
260
                    'aoColumnDefs': [  // Last column shouldn't be sortable or searchable
261
                        {
262
                            'aTargets': [ 'actions' ],
263
                            'bSortable': false,
264
                            'bSearchable': false
265
                        },
266
                    ],
267
                    'aaSorting': [[ 6, 'desc' ]], // Default sort, updated descending
268
                    'processing': true, // Display a message when manipulating
269
                    'iDisplayLength': 10, // 10 results per page
270
                    'sPaginationType': "full_numbers", // Pagination display
271
                    'deferRender': true, // Improve performance on big datasets
272
                    'data': dataCopy,
273
                    'columns': colData,
274
                    'originalData': data // Enable render functions to access
275
                                       // our original data
276
                }));
277
            }
278
        );
279
280
    });
281
    //]]>
282
</script>
283
</head>
13
</head>
284
14
285
<body id="illrequests" class="ill">
15
<body id="illrequests" class="ill">
Lines 580-605 Link Here
580
                [% ELSIF query_type == 'illlist' %]
310
                [% ELSIF query_type == 'illlist' %]
581
                    <!-- illlist -->
311
                    <!-- illlist -->
582
                    <h1>View ILL requests</h1>
312
                    <h1>View ILL requests</h1>
313
                    [% prefilter_arr =  %]
583
                    <div id="results">
314
                    <div id="results">
584
                        <h3>Details for all requests</h3>
315
                        <h3>Details for all requests</h3>
585
316
						[% INCLUDE 'ill-list-table.inc' %]
586
                        <table id="ill-requests">
587
                            <thead>
588
                                <tr id="illview-header">
589
                                    <th>Author</th>
590
                                    <th>Title</th>
591
                                    <th>Patron</th>
592
                                    <th>Biblio ID</th>
593
                                    <th>Library</th>
594
                                    <th>Status</th>
595
                                    <th>Updated on</th>
596
                                    <th>Request number</th>
597
                                    <th class="actions"></th>
598
                                </tr>
599
                            </thead>
600
                            <tbody id="illview-body">
601
                            </tbody>
602
                        </table>
603
                    </div>
317
                    </div>
604
                [% ELSE %]
318
                [% ELSE %]
605
                <!-- Custom Backend Action -->
319
                <!-- Custom Backend Action -->
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/members/ill-requests.tt (+41 lines)
Line 0 Link Here
1
[% USE Asset %]
2
[% USE Branches %]
3
[% USE Koha %]
4
[% USE KohaDates %]
5
6
[% INCLUDE 'doc-head-open.inc' %]
7
<title>Koha &rsaquo; Patrons &rsaquo; ILL requests for [% INCLUDE 'patron-title.inc' no_html = 1 %]</title>
8
[% INCLUDE 'doc-head-close.inc' %]
9
[% Asset.js("lib/jquery/plugins/jquery.checkboxes.min.js") %]
10
[% Asset.css("css/datatables.css") %]
11
[% INCLUDE 'datatables.inc' %]
12
[% Asset.js("js/ill-list-table.js") %]
13
</head>
14
15
<body id="pat_ill_requests">
16
    [% INCLUDE 'header.inc' %]
17
    [% INCLUDE 'patron-search.inc' %]
18
19
    <div id="breadcrumbs">
20
        <a href="/cgi-bin/koha/mainpage.pl">Home</a>
21
        &rsaquo; <a href="/cgi-bin/koha/members/members-home.pl">Patrons</a>
22
        &rsaquo; ILL requests for [% INCLUDE 'patron-title.inc' %]
23
    </div>
24
25
    <div id="doc3" class="yui-t1">
26
27
    <div id="bd">
28
        <div id="yui-main">
29
            <div class="yui-b">
30
                <div class="yui-g">
31
                    <h2>ILL requests</h2>
32
                    [% INCLUDE 'ill-list-table.inc' %]
33
                </div>
34
            </div>
35
        </div>
36
        <div class="yui-b">
37
            [% INCLUDE 'circ-menu.inc' %]
38
        </div>
39
    </div>
40
41
[% INCLUDE 'intranet-bottom.inc' %]
(-)a/koha-tmpl/intranet-tmpl/prog/js/ill-list-table.js (+272 lines)
Line 0 Link Here
1
$(document).ready(function() {
2
3
	// Illview Datatable setup
4
5
    // Get any prefilters
6
    var prefilters = $('table#ill-requests').data('prefilters');
7
8
	// Fields we don't want to display
9
	var ignore = [
10
		'accessurl',
11
		'backend',
12
		'branchcode',
13
		'completed',
14
		'capabilities',
15
		'cost',
16
		'medium',
17
		'notesopac',
18
		'notesstaff',
19
		'placed',
20
		'replied'
21
	];
22
23
	// Fields we need to expand (flatten)
24
	var expand = [
25
		'metadata',
26
		'patron'
27
	];
28
29
	// Expanded fields
30
	// This is auto populated
31
	var expanded = {};
32
33
	// The core fields that should be displayed first
34
	var core = [
35
		'metadata_Author',
36
		'metadata_Title',
37
		'borrowername',
38
		'biblio_id',
39
		'library',
40
		'status',
41
		'updated',
42
		'illrequest_id',
43
		'action'
44
	];
45
46
	// Remove any fields we're ignoring
47
	var removeIgnore = function(dataObj) {
48
		dataObj.forEach(function(thisRow) {
49
			ignore.forEach(function(thisIgnore) {
50
				if (thisRow.hasOwnProperty(thisIgnore)) {
51
					delete thisRow[thisIgnore];
52
				}
53
			});
54
		});
55
	};
56
57
	// Expand any fields we're expanding
58
	var expandExpand = function(row) {
59
		expand.forEach(function(thisExpand) {
60
			if (row.hasOwnProperty(thisExpand)) {
61
				if (!expanded.hasOwnProperty(thisExpand)) {
62
					expanded[thisExpand] = [];
63
				}
64
				var expandObj = row[thisExpand];
65
				Object.keys(expandObj).forEach(
66
					function(thisExpandCol) {
67
						var expColName = thisExpand + '_' + thisExpandCol;
68
						// Keep a list of fields that have been expanded
69
						// so we can create toggle links for them
70
						if (expanded[thisExpand].indexOf(expColName) == -1) {
71
							expanded[thisExpand].push(expColName);
72
						}
73
						expandObj[expColName] =
74
							expandObj[thisExpandCol];
75
						delete expandObj[thisExpandCol];
76
					}
77
				);
78
				$.extend(true, row, expandObj);
79
				delete row[thisExpand];
80
			}
81
		});
82
	};
83
84
	// Build a de-duped list of all column names
85
	var allCols = {};
86
	core.map(function(thisCore) {
87
		allCols[thisCore] = 1;
88
	});
89
90
	// Strip the expand prefix if it exists, we do this for display
91
	var stripPrefix = function(value) {
92
		expand.forEach(function(thisExpand) {
93
			var regex = new RegExp(thisExpand + '_', 'g');
94
			value = value.replace(regex, '');
95
		});
96
		return value;
97
	};
98
99
	// Our 'render' function for borrowerlink
100
	var createPatronLink = function(data, type, row) {
101
		return '<a title="' + _("View borrower details") + '" ' +
102
			'href="/cgi-bin/koha/members/moremember.pl?' +
103
			'borrowernumber='+row.borrowernumber+'">' +
104
			row.patron_firstname + ' ' + row.patron_surname +
105
			'</a>';
106
	};
107
108
	// Our 'render' function for the library name
109
	var createLibrary = function(data, type, row) {
110
		return row.library.branchname;
111
	};
112
113
	// Render function for request ID
114
	var createRequestId = function(data, type, row) {
115
		return row.id_prefix + row.illrequest_id;
116
	};
117
118
	// Render function for request status
119
	var createStatus = function(data, type, row, meta) {
120
		var origData = meta.settings.oInit.originalData;
121
		if (origData.length > 0) {
122
			var status_name = meta.settings.oInit.originalData[0].capabilities[
123
				row.status
124
			].name;
125
			switch( status_name ) {
126
				case "New request":
127
					return _("New request");
128
				case "Requested":
129
					return _("Requested");
130
				case "Requested from partners":
131
					return _("Requested from partners");
132
				case "Request reverted":
133
					return _("Request reverted");
134
				case "Queued request":
135
					return _("Queued request");
136
				case "Cancellation requested":
137
					return _("Cancellation requested");
138
				case "Completed":
139
					return _("Completed");
140
				case "Delete request":
141
					return _("Delete request");
142
				default:
143
					return status_name;
144
			}
145
		} else {
146
			return '';
147
		}
148
	};
149
150
	// Render function for creating a row's action link
151
	var createActionLink = function(data, type, row) {
152
		return '<a class="btn btn-default btn-sm" ' +
153
			'href="/cgi-bin/koha/ill/ill-requests.pl?' +
154
			'method=illview&amp;illrequest_id=' +
155
			row.illrequest_id +
156
			'">' + _("Manage request") + '</a>';
157
	};
158
159
	// Columns that require special treatment
160
	var specialCols = {
161
		action: {
162
			name: '',
163
			func: createActionLink
164
		},
165
		borrowername: {
166
			name: _("Patron"),
167
			func: createPatronLink
168
		},
169
		illrequest_id: {
170
			name: _("Request number"),
171
			func: createRequestId
172
		},
173
		status: {
174
			name: _("Status"),
175
			func: createStatus
176
		},
177
		biblio_id: {
178
			name: _("Biblio ID")
179
		},
180
		library: {
181
			name: _("Library"),
182
			func: createLibrary
183
		}
184
	};
185
186
	// Toggle request attributes in Illview
187
	$('#toggle_requestattributes').on('click', function(e) {
188
		e.preventDefault();
189
		$('#requestattributes').toggleClass('content_hidden');
190
	});
191
192
	// Filter partner list
193
	$('#partner_filter').keyup(function() {
194
		var needle = $('#partner_filter').val();
195
		$('#partners > option').each(function() {
196
			var regex = new RegExp(needle, 'i');
197
			if (
198
				needle.length == 0 ||
199
				$(this).is(':selected') ||
200
				$(this).text().match(regex)
201
			) {
202
				$(this).show();
203
			} else {
204
				$(this).hide();
205
			}
206
		});
207
	});
208
209
	// Get our data from the API and process it prior to passing
210
	// it to datatables
211
    var filterParam = prefilters ? '&' + prefilters : '';
212
	var ajax = $.ajax(
213
		'/api/v1/illrequests?embed=metadata,patron,capabilities,library'
214
            + filterParam
215
		).done(function() {
216
			var data = JSON.parse(ajax.responseText);
217
			// Make a copy, we'll be removing columns next and need
218
			// to be able to refer to data that has been removed
219
			var dataCopy = $.extend(true, [], data);
220
			// Remove all columns we're not interested in
221
			removeIgnore(dataCopy);
222
			// Expand columns that need it and create an array
223
			// of all column names
224
			$.each(dataCopy, function(k, row) {
225
				expandExpand(row);
226
			});
227
228
			// Assemble an array of column definitions for passing
229
			// to datatables
230
			var colData = [];
231
			Object.keys(allCols).forEach(function(thisCol) {
232
				// Create the base column object
233
				var colObj = {
234
					name: thisCol,
235
					className: thisCol
236
				};
237
				// We may need to process the data going in this
238
				// column, so do it if necessary
239
				if (
240
					specialCols.hasOwnProperty(thisCol) &&
241
					specialCols[thisCol].hasOwnProperty('func')
242
				) {
243
					colObj.render = specialCols[thisCol].func;
244
				} else {
245
					colObj.data = thisCol;
246
				}
247
				colData.push(colObj);
248
			});
249
250
			// Initialise the datatable
251
			$('#ill-requests').DataTable($.extend(true, {}, dataTablesDefaults, {
252
				'aoColumnDefs': [  // Last column shouldn't be sortable or searchable
253
					{
254
						'aTargets': [ 'actions' ],
255
						'bSortable': false,
256
						'bSearchable': false
257
					},
258
				],
259
				'aaSorting': [[ 6, 'desc' ]], // Default sort, updated descending
260
				'processing': true, // Display a message when manipulating
261
				'iDisplayLength': 10, // 10 results per page
262
				'sPaginationType': "full_numbers", // Pagination display
263
				'deferRender': true, // Improve performance on big datasets
264
				'data': dataCopy,
265
				'columns': colData,
266
				'originalData': data // Enable render functions to access
267
									// our original data
268
			}));
269
		}
270
	);
271
272
});
(-)a/members/ill-requests.pl (-1 / +54 lines)
Line 0 Link Here
0
- 
1
#!/usr/bin/perl
2
3
# This file is part of Koha.
4
#
5
# Copyright 2018 PTFS Europe
6
#
7
# Koha is free software; you can redistribute it and/or modify it
8
# under the terms of the GNU General Public License as published by
9
# the Free Software Foundation; either version 3 of the License, or
10
# (at your option) any later version.
11
#
12
# Koha is distributed in the hope that it will be useful, but
13
# WITHOUT ANY WARRANTY; without even the implied warranty of
14
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15
# GNU General Public License for more details.
16
#
17
# You should have received a copy of the GNU General Public License
18
# along with Koha; if not, see <http://www.gnu.org/licenses>.
19
20
use Modern::Perl;
21
22
use CGI qw ( -utf8 );
23
use C4::Auth;
24
use C4::Output;
25
use C4::Members;
26
use C4::Members::Attributes qw(GetBorrowerAttributes);
27
use Koha::Patrons;
28
29
my $input = new CGI;
30
31
my ( $template, $loggedinuser, $cookie ) = get_template_and_user(
32
    {   template_name   => "members/ill-requests.tt",
33
        query           => $input,
34
        type            => "intranet",
35
        authnotrequired => 0,
36
        flagsrequired   => { borrowers => 'edit_borrowers' },
37
        debug           => 1,
38
    }
39
);
40
41
my $borrowernumber = $input->param('borrowernumber');
42
43
my $logged_in_user = Koha::Patrons->find( $loggedinuser ) or die "Not logged in";
44
my $patron         = Koha::Patrons->find( $borrowernumber );
45
output_and_exit_if_error( $input, $cookie, $template, { module => 'members', logged_in_user => $logged_in_user, current_patron => $patron } );
46
47
my $category = $patron->category;
48
$template->param(
49
    prefilters => "borrowernumber=$borrowernumber",
50
    patron => $patron,
51
    illview  => 1,
52
);
53
54
output_html_with_http_headers $input, $cookie, $template->output;

Return to bug 18589