Bug 21377: Remove erroneous "html" filter use
authorAndrew Isherwood <andrew.isherwood@ptfs-europe.com>
Wed, 19 Sep 2018 08:34:21 +0000 (09:34 +0100)
committerNick Clemens <nick@bywatersolutions.com>
Fri, 28 Sep 2018 19:00:33 +0000 (19:00 +0000)
The "html" filter that is being applied to these variable declarations
is inappropriate and has been removed.
I've also simplified things by removing two of the extraneous variable
declarations.

To test:

- Before applying the patch, on master, view the "Manage request" page
for an ILL request
- TEST: Observe that, apart from the "Edit request" button, the various
available action buttons do not display correctly
- Apply the patch
- TEST: Refresh the page and observe that the buttons now display
correctly

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>

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

index 6d43525..b188945 100644 (file)
                     </div>
 
                 [% ELSIF query_type == 'illview' %]
-                    [% actions = request.available_actions | html %]
-                    [% capabilities = request.capabilities | html %]
-                    [% req_status = request.status | html %]
+                    [% req_status = request.status %]
                     <h1>Manage ILL request</h1>
                     <div id="toolbar" class="btn-toolbar">
                         <a title="Edit request" id="ill-toolbar-btn-edit-action" class="btn btn-sm btn-default" href="/cgi-bin/koha/ill/ill-requests.pl?method=edit_action&amp;illrequest_id=[% request.illrequest_id | html %]">
                         <span class="fa fa-pencil"></span>
                         Edit request
                         </a>
-                        [% FOREACH action IN actions %]
+                        [% FOREACH action IN request.available_actions %]
                             [% IF action.method != 0 %]
                                 <a title="[% action.ui_method_name | html %]" id="ill-toolbar-btn-[% action.id | lower | html %]" class="btn btn-sm btn-default" href="/cgi-bin/koha/ill/ill-requests.pl?method=[% action.method | html %]&amp;illrequest_id=[% request.illrequest_id | html %]">
                                 <span class="fa [% action.ui_method_icon | html %]"></span>
                                 </div>
                                 <div class="status">
                                     <span class="label status">Status:</span>
-                                    [% capabilities.$req_status.name | html %]
+                                    [% request.capabilities.$req_status.name | html %]
                                 </div>
                                 <div class="updated">
                                     <span class="label updated">Last updated:</span>