Skip to content

Commit a9adee5

Browse files
ammoptjoubu
authored andcommitted
Bug 34478: ILL INTRA: query_type => op
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
1 parent 38b21ff commit a9adee5

File tree

2 files changed

+23
-23
lines changed

2 files changed

+23
-23
lines changed

ill/ill-requests.pl

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -460,10 +460,10 @@
460460
}
461461

462462
$template->param(
463-
backends => $backends,
464-
types => [ "Book", "Article", "Journal" ],
465-
query_type => $op,
466-
branches => Koha::Libraries->search,
463+
backends => $backends,
464+
types => [ "Book", "Article", "Journal" ],
465+
op => $op,
466+
branches => Koha::Libraries->search,
467467
);
468468

469469
output_html_with_http_headers( $cgi, $cookie, $template->output );

koha-tmpl/intranet-tmpl/prog/en/modules/ill/ill-requests.tt

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -23,21 +23,21 @@
2323

2424
[% WRAPPER 'sub-header.inc' %]
2525
[% WRAPPER breadcrumbs %]
26-
[% IF query_type == 'cud-create' %]
26+
[% IF op == 'cud-create' %]
2727
[% WRAPPER breadcrumb_item %]
2828
<a href="/cgi-bin/koha/ill/ill-requests.pl">ILL requests</a>
2929
[% END %]
3030
[% WRAPPER breadcrumb_item bc_active= 1 %]
3131
<span>New request</span>
3232
[% END %]
33-
[% ELSIF query_type == 'illview' %]
33+
[% ELSIF op == 'illview' %]
3434
[% WRAPPER breadcrumb_item %]
3535
<a href="/cgi-bin/koha/ill/ill-requests.pl">ILL requests</a>
3636
[% END %]
3737
[% WRAPPER breadcrumb_item bc_active= 1 %]
3838
<span>Manage request [% request.id_prefix _ request.illrequest_id | html %]</span>
3939
[% END %]
40-
[% ELSIF query_type == 'typedisclaimer' %]
40+
[% ELSIF op == 'typedisclaimer' %]
4141
[% WRAPPER breadcrumb_item %]
4242
<a href="/cgi-bin/koha/ill/ill-requests.pl">ILL requests</a>
4343
[% END %]
@@ -55,7 +55,7 @@
5555
<div class="main container-fluid">
5656
<div class="row">
5757

58-
[% IF query_type == 'illlist' %]
58+
[% IF op == 'illlist' %]
5959
<div class="col-sm-2">
6060
<aside>
6161
<form method="get" id="illfilter_form">
@@ -141,19 +141,19 @@
141141
<p>[% whole.success | html %]</p>
142142
[% END %]
143143

144-
[% IF query_type == 'cud-create' %]
144+
[% IF op == 'cud-create' %]
145145
<h1>New ILL request</h1>
146146
[% PROCESS $whole.template %]
147147

148-
[% ELSIF query_type == 'confirm' %]
148+
[% ELSIF op == 'confirm' %]
149149
<h1>Confirm ILL request</h1>
150150
[% PROCESS $whole.template %]
151151

152-
[% ELSIF query_type == 'cud-cancel' and !whole.error %]
152+
[% ELSIF op == 'cud-cancel' and !whole.error %]
153153
<h1>Cancel a confirmed request</h1>
154154
[% PROCESS $whole.template %]
155155

156-
[% ELSIF query_type == 'check_out' and !whole.error %]
156+
[% ELSIF op == 'check_out' and !whole.error %]
157157
[% IF !whole.stage || whole.stage == 'form' %]
158158
<h1 id="ill-issue-title">Issue requested item to [% INCLUDE 'patron-title.inc' patron = request.patron %]</h1>
159159
[% IF !request.biblio_id || request.biblio_id.length == 0 %]
@@ -300,7 +300,7 @@
300300
</fieldset>
301301
[% END %]
302302

303-
[% ELSIF query_type == 'generic_confirm' %]
303+
[% ELSIF op == 'generic_confirm' %]
304304
<h1>Place request with partner libraries</h1>
305305
[% IF error %]
306306
[% IF error == 'no_target_email' %]
@@ -399,7 +399,7 @@
399399
[% END %]
400400
<!-- generic_confirm ends here -->
401401

402-
[% ELSIF query_type == 'edit_action' %]
402+
[% ELSIF op == 'edit_action' %]
403403
<form method="POST" action="/cgi-bin/koha/ill/ill-requests.pl">
404404
[% INCLUDE 'csrf-token.inc' %]
405405
<fieldset class="rows">
@@ -499,7 +499,7 @@
499499
</fieldset>
500500
</form>
501501

502-
[% ELSIF query_type == 'delete_confirm' %]
502+
[% ELSIF op == 'delete_confirm' %]
503503

504504
<div class="dialog alert">
505505
<h3>Are you sure you wish to delete this request?</h3>
@@ -513,7 +513,7 @@
513513
<a class="btn btn-default deny" href="/cgi-bin/koha/ill/ill-requests.pl?op=illview&amp;illrequest_id=[% request.id | html %]"><i class="fa fa-fw fa-times"></i>No, do not delete</a>
514514
</div>
515515

516-
[% ELSIF query_type == 'illview' %]
516+
[% ELSIF op == 'illview' %]
517517
[% IF whole.template.length > 0 %]
518518
[% PROCESS $whole.template %]
519519
[% END %]
@@ -809,7 +809,7 @@
809809
</div>
810810
</div>
811811

812-
[% ELSIF query_type == 'illlist' %]
812+
[% ELSIF op == 'illlist' %]
813813
<!-- illlist -->
814814
<h1>
815815
[% IF !batch %]
@@ -822,7 +822,7 @@
822822
<h2>Details for all requests</h2>
823823
[% INCLUDE 'ill-list-table.inc' %]
824824
</div> <!-- /#results -->
825-
[% ELSIF query_type == 'availability' %]
825+
[% ELSIF op == 'availability' %]
826826
<!-- availability -->
827827
<h1>Availability</h1>
828828
<div id="results" class="page-section">
@@ -857,7 +857,7 @@
857857
[% INCLUDE 'ill-availability-table.inc' service=service %]
858858
[% END %]
859859
</div>
860-
[% ELSIF query_type == 'typedisclaimer' %]
860+
[% ELSIF op == 'typedisclaimer' %]
861861
<!-- typedisclaimer -->
862862
<h1>Request type disclaimer</h1>
863863
<div id="results" class="page-section">
@@ -898,7 +898,7 @@
898898
</fieldset>
899899
</form>
900900
</div>
901-
[% ELSIF query_type == 'batch_list' || query_type == 'batch_create' %]
901+
[% ELSIF op == 'batch_list' || op == 'batch_create' %]
902902
[% INCLUDE 'ill-batch.inc' %]
903903
[% ELSE %]
904904
<!-- Custom Backend Action -->
@@ -962,17 +962,17 @@
962962
[% Asset.js("js/ill-batch.js") | $raw %]
963963
[% Asset.js("js/ill-batch-table.js") | $raw %]
964964
[% Asset.js("js/ill-batch-modal.js") | $raw %]
965-
[% IF (query_type == 'availability' || query_type == 'generic_confirm') && Koha.Preference('ILLCheckAvailability') %]
965+
[% IF (op == 'availability' || op == 'generic_confirm') && Koha.Preference('ILLCheckAvailability') %]
966966
[% Asset.js("js/ill-availability.js") | $raw %]
967967
[% END %]
968-
[% IF query_type == 'availability' && Koha.Preference('ILLCheckAvailability') %]
968+
[% IF op == 'availability' && Koha.Preference('ILLCheckAvailability') %]
969969
<script>
970970
$(document).ready(function() {
971971
window.doSearch();
972972
});
973973
</script>
974974
[% END %]
975-
[% IF query_type == 'generic_confirm' && Koha.Preference('ILLCheckAvailability') %]
975+
[% IF op == 'generic_confirm' && Koha.Preference('ILLCheckAvailability') %]
976976
[% Asset.js("js/ill-availability-partner.js") | $raw %]
977977
[% END %]
978978

0 commit comments

Comments
 (0)