Bug 38685: Preparation: DRY code

This is in preparation of the next patch, to avoid big copy + pastes

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
This commit is contained in:
Pedro Amorim 2024-12-12 13:11:21 +00:00 committed by Katrin Fischer
parent 7ed014dd1e
commit b02d4c42cc
No known key found for this signature in database
GPG Key ID: 0EF6E2C03357A834
1 changed files with 15 additions and 30 deletions

View File

@ -25,37 +25,22 @@
[% WRAPPER 'sub-header.inc' %]
[% WRAPPER breadcrumbs %]
[% IF op == 'cud-create' %]
[% WRAPPER breadcrumb_item %]
<a href="/cgi-bin/koha/ill/ill-requests.pl">ILL requests</a>
[% END %]
[% WRAPPER breadcrumb_item bc_active= 1 %]
<span>New request</span>
[% END %]
[% ELSIF op == 'illview' %]
[% WRAPPER breadcrumb_item %]
<a href="/cgi-bin/koha/ill/ill-requests.pl">ILL requests</a>
[% END %]
[% WRAPPER breadcrumb_item bc_active= 1 %]
<span>Manage request [% request.id_prefix _ request.illrequest_id | html %]</span>
[% END %]
[% ELSIF op == 'typedisclaimer' %]
[% WRAPPER breadcrumb_item %]
<a href="/cgi-bin/koha/ill/ill-requests.pl">ILL requests</a>
[% END %]
[% WRAPPER breadcrumb_item bc_active= 1 %]
<span>Request type disclaimer</span>
[% END %]
[% ELSIF op == 'confirmautoill' %]
[% WRAPPER breadcrumb_item %]
<a href="/cgi-bin/koha/ill/ill-requests.pl">ILL requests</a>
[% END %]
[% WRAPPER breadcrumb_item bc_active= 1 %]
<span>Confirm request</span>
[% END %]
[% ELSE %]
[% WRAPPER breadcrumb_item bc_active= 1 %]
[% WRAPPER breadcrumb_item bc_active = (op == 'illlist' ? 1 : 0) %]
[% IF op == 'illlist' %]
<span>ILL requests</span>
[% ELSE %]
<a href="/cgi-bin/koha/ill/ill-requests.pl">ILL requests</a>
[% END %]
[% END %]
[% WRAPPER breadcrumb_item bc_active= 1 %]
[% IF op == 'cud-create' %]
<span>New request</span>
[% ELSIF op == 'illview' %]
<span>Manage request [% request.id_prefix _ request.illrequest_id | html %]</span>
[% ELSIF op == 'typedisclaimer' %]
<span>Request type disclaimer</span>
[% ELSIF op == 'confirmautoill' %]
<span>Confirm request</span>
[% END %]
[% END %]
[% END #/ WRAPPER breadcrumbs %]