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 122-128 Link Here
122
        [% IF houseboundview %]<li class="active">[% ELSE %]<li>[% END %]<a href="/cgi-bin/koha/members/housebound.pl?borrowernumber=[% patron.borrowernumber | html %]">Housebound</a></li>
122
        [% IF houseboundview %]<li class="active">[% ELSE %]<li>[% END %]<a href="/cgi-bin/koha/members/housebound.pl?borrowernumber=[% patron.borrowernumber | html %]">Housebound</a></li>
123
    [% END %]
123
    [% END %]
124
    [% IF Koha.Preference('ILLModule') && CAN_user_ill %]
124
    [% IF Koha.Preference('ILLModule') && CAN_user_ill %]
125
        <li><a href="/cgi-bin/koha/ill/ill-requests.pl?borrowernumber=[% patron.borrowernumber | html %]">Interlibrary loans</a></li>
125
        [% IF illview %]<li class="active">[% ELSE %]<li>[% END %]<a href="/cgi-bin/koha/members/ill-requests.pl?borrowernumber=[% patron.borrowernumber %]">Interlibrary loans</a></li>
126
    [% END %]
126
    [% END %]
127
</ul></div>
127
</ul></div>
128
[% END %]
128
[% 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 10-286 Link Here
10
[% Asset.js("lib/jquery/plugins/jquery.checkboxes.min.js") | $raw %]
10
[% Asset.js("lib/jquery/plugins/jquery.checkboxes.min.js") | $raw %]
11
[% Asset.css("css/datatables.css") | $raw %]
11
[% Asset.css("css/datatables.css") | $raw %]
12
[% INCLUDE 'datatables.inc' %]
12
[% INCLUDE 'datatables.inc' %]
13
<script type="text/javascript">
13
[% Asset.js("js/ill-list-table.js") %]
14
    //<![CDATA[
15
    $(document).ready(function() {
16
17
        // Illview Datatable setup
18
19
        // Fields we don't want to display
20
        var ignore = [
21
            'accessurl',
22
            'backend',
23
            'branchcode',
24
            'completed',
25
            'capabilities',
26
            'cost',
27
            'medium',
28
            'notesopac',
29
            'notesstaff',
30
            'placed',
31
            'replied'
32
        ];
33
34
        // Fields we need to expand (flatten)
35
        var expand = [
36
            'metadata',
37
            'patron'
38
        ];
39
40
        // Expanded fields
41
        // This is auto populated
42
        var expanded = {};
43
44
        // The core fields that should be displayed first
45
        var core = [
46
            'metadata_Author',
47
            'metadata_Title',
48
            'borrowername',
49
            'biblio_id',
50
            'library',
51
            'status',
52
            'updated',
53
            'illrequest_id',
54
            'action'
55
        ];
56
57
        // Remove any fields we're ignoring
58
        var removeIgnore = function(dataObj) {
59
            dataObj.forEach(function(thisRow) {
60
                ignore.forEach(function(thisIgnore) {
61
                    if (thisRow.hasOwnProperty(thisIgnore)) {
62
                        delete thisRow[thisIgnore];
63
                    }
64
                });
65
            });
66
        };
67
68
        // Expand any fields we're expanding
69
        var expandExpand = function(row) {
70
            expand.forEach(function(thisExpand) {
71
                if (row.hasOwnProperty(thisExpand)) {
72
                    if (!expanded.hasOwnProperty(thisExpand)) {
73
                        expanded[thisExpand] = [];
74
                    }
75
                    var expandObj = row[thisExpand];
76
                    Object.keys(expandObj).forEach(
77
                        function(thisExpandCol) {
78
                            var expColName = thisExpand + '_' + thisExpandCol;
79
                            // Keep a list of fields that have been expanded
80
                            // so we can create toggle links for them
81
                            if (expanded[thisExpand].indexOf(expColName) == -1) {
82
                                expanded[thisExpand].push(expColName);
83
                            }
84
                            expandObj[expColName] =
85
                                expandObj[thisExpandCol];
86
                            delete expandObj[thisExpandCol];
87
                        }
88
                    );
89
                    $.extend(true, row, expandObj);
90
                    delete row[thisExpand];
91
                }
92
            });
93
        };
94
95
        // Build a de-duped list of all column names
96
        var allCols = {};
97
        core.map(function(thisCore) {
98
            allCols[thisCore] = 1;
99
        });
100
101
        // Strip the expand prefix if it exists, we do this for display
102
        var stripPrefix = function(value) {
103
            expand.forEach(function(thisExpand) {
104
                var regex = new RegExp(thisExpand + '_', 'g');
105
                value = value.replace(regex, '');
106
            });
107
            return value;
108
        };
109
110
        // Our 'render' function for borrowerlink
111
        var createPatronLink = function(data, type, row) {
112
            return '<a title="' + _("View borrower details") + '" ' +
113
                'href="/cgi-bin/koha/members/moremember.pl?' +
114
                'borrowernumber='+row.borrowernumber+'">' +
115
                row.patron_firstname + ' ' + row.patron_surname +
116
                '</a>';
117
        };
118
119
        // Our 'render' function for the library name
120
        var createLibrary = function(data, type, row) {
121
            return row.library.branchname;
122
        };
123
124
        // Render function for request ID
125
        var createRequestId = function(data, type, row) {
126
            return row.id_prefix + row.illrequest_id;
127
        };
128
129
        // Render function for request status
130
        var createStatus = function(data, type, row, meta) {
131
            var origData = meta.settings.oInit.originalData;
132
            if (origData.length > 0) {
133
                var status_name = meta.settings.oInit.originalData[0].capabilities[
134
                    row.status
135
                ].name;
136
                switch( status_name ) {
137
                    case "New request":
138
                        return _("New request");
139
                    case "Requested":
140
                        return _("Requested");
141
                    case "Requested from partners":
142
                        return _("Requested from partners");
143
                    case "Request reverted":
144
                        return _("Request reverted");
145
                    case "Queued request":
146
                        return _("Queued request");
147
                    case "Cancellation requested":
148
                        return _("Cancellation requested");
149
                    case "Completed":
150
                        return _("Completed");
151
                    case "Delete request":
152
                        return _("Delete request");
153
                    default:
154
                        return status_name;
155
                }
156
            } else {
157
                return '';
158
            }
159
        };
160
161
        // Render function for creating a row's action link
162
        var createActionLink = function(data, type, row) {
163
            return '<a class="btn btn-default btn-sm" ' +
164
                'href="/cgi-bin/koha/ill/ill-requests.pl?' +
165
                'method=illview&amp;illrequest_id=' +
166
                row.illrequest_id +
167
                '">' + _("Manage request") + '</a>';
168
        };
169
170
        // Columns that require special treatment
171
        var specialCols = {
172
            action: {
173
                name: '',
174
                func: createActionLink
175
            },
176
            borrowername: {
177
                name: _("Patron"),
178
                func: createPatronLink
179
            },
180
            illrequest_id: {
181
                name: _("Request number"),
182
                func: createRequestId
183
            },
184
            status: {
185
                name: _("Status"),
186
                func: createStatus
187
            },
188
            biblio_id: {
189
                name: _("Bibliograpic Record ID")
190
            },
191
            library: {
192
                name: _("Library"),
193
                func: createLibrary
194
            }
195
        };
196
197
        // Filter partner list
198
        $('#partner_filter').keyup(function() {
199
            var needle = $('#partner_filter').val();
200
            $('#partners > option').each(function() {
201
                var regex = new RegExp(needle, 'i');
202
                if (
203
                    needle.length == 0 ||
204
                    $(this).is(':selected') ||
205
                    $(this).text().match(regex)
206
                ) {
207
                    $(this).show();
208
                } else {
209
                    $(this).hide();
210
                }
211
            });
212
        });
213
214
        // Display the modal containing request supplier metadata
215
        $('#ill-request-display-metadata').on('click', function(e) {
216
            e.preventDefault();
217
            $('#dataPreview').modal({show:true});
218
        });
219
220
        // Get our data from the API and process it prior to passing
221
        // it to datatables
222
        var ajax = $.ajax(
223
            '/api/v1/illrequests?embed=metadata,patron,capabilities,library'
224
            ).done(function() {
225
                var data = JSON.parse(ajax.responseText);
226
                // Make a copy, we'll be removing columns next and need
227
                // to be able to refer to data that has been removed
228
                var dataCopy = $.extend(true, [], data);
229
                // Remove all columns we're not interested in
230
                removeIgnore(dataCopy);
231
                // Expand columns that need it and create an array
232
                // of all column names
233
                $.each(dataCopy, function(k, row) {
234
                    expandExpand(row);
235
                });
236
237
                // Assemble an array of column definitions for passing
238
                // to datatables
239
                var colData = [];
240
                Object.keys(allCols).forEach(function(thisCol) {
241
                    // Create the base column object
242
                    var colObj = {
243
                        name: thisCol,
244
                        className: thisCol
245
                    };
246
                    // We may need to process the data going in this
247
                    // column, so do it if necessary
248
                    if (
249
                        specialCols.hasOwnProperty(thisCol) &&
250
                        specialCols[thisCol].hasOwnProperty('func')
251
                    ) {
252
                        colObj.render = specialCols[thisCol].func;
253
                    } else {
254
                        colObj.data = thisCol;
255
                    }
256
                    colData.push(colObj);
257
                });
258
259
                // Initialise the datatable
260
                $('#ill-requests').DataTable($.extend(true, {}, dataTablesDefaults, {
261
                    'aoColumnDefs': [  // Last column shouldn't be sortable or searchable
262
                        {
263
                            'aTargets': [ 'actions' ],
264
                            'bSortable': false,
265
                            'bSearchable': false
266
                        },
267
                    ],
268
                    'aaSorting': [[ 6, 'desc' ]], // Default sort, updated descending
269
                    'processing': true, // Display a message when manipulating
270
                    'iDisplayLength': 10, // 10 results per page
271
                    'sPaginationType': "full_numbers", // Pagination display
272
                    'deferRender': true, // Improve performance on big datasets
273
                    'data': dataCopy,
274
                    'columns': colData,
275
                    'originalData': data // Enable render functions to access
276
                                       // our original data
277
                }));
278
            }
279
        );
280
281
    });
282
    //]]>
283
</script>
284
</head>
14
</head>
285
15
286
<body id="illrequests" class="ill">
16
<body id="illrequests" class="ill">
Lines 597-622 Link Here
597
                [% ELSIF query_type == 'illlist' %]
327
                [% ELSIF query_type == 'illlist' %]
598
                    <!-- illlist -->
328
                    <!-- illlist -->
599
                    <h1>View ILL requests</h1>
329
                    <h1>View ILL requests</h1>
330
                    [% prefilter_arr =  %]
600
                    <div id="results">
331
                    <div id="results">
601
                        <h3>Details for all requests</h3>
332
                        <h3>Details for all requests</h3>
602
333
						[% INCLUDE 'ill-list-table.inc' %]
603
                        <table id="ill-requests">
604
                            <thead>
605
                                <tr id="illview-header">
606
                                    <th>Author</th>
607
                                    <th>Title</th>
608
                                    <th>Patron</th>
609
                                    <th>Bibliographic record ID</th>
610
                                    <th>Library</th>
611
                                    <th>Status</th>
612
                                    <th>Updated on</th>
613
                                    <th>Request number</th>
614
                                    <th class="actions"></th>
615
                                </tr>
616
                            </thead>
617
                            <tbody id="illview-body">
618
                            </tbody>
619
                        </table>
620
                    </div>
334
                    </div>
621
                [% ELSE %]
335
                [% ELSE %]
622
                <!-- Custom Backend Action -->
336
                <!-- 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