Bug 21706: Make authority framework subfield links work (TT filter)
authorTomas Cohen Arazi <tomascohen@theke.io>
Mon, 29 Oct 2018 13:44:46 +0000 (10:44 -0300)
committerTomas Cohen Arazi <tomascohen@theke.io>
Mon, 12 Nov 2018 19:38:56 +0000 (16:38 -0300)
This patch removes URL building from the controller
and does it on the templates, using the
right 'uri' filter for the query parameters.

To test:
- Go to Home > Administration > Athority types
- On any of the listed frameworks, pick the 'MARC structure' action in
the dropdown
- On any subfield, hover on the actions dropdown
=> FAIL: The URLs are wrongly formed
- Click on the links
=> FAIL: You get errors because of the bad URL
- Apply this patch
- Reload the 'MARC structure' page
- On any subfield, hover on the actions dropdown
=> SUCCESS: LInks look correct
- Click on any of them
=> SUCCESS: They work!
- Sign off :-D

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>

koha-tmpl/intranet-tmpl/prog/en/modules/admin/auth_tag_structure.tt

index 1c1ce55..25872c6 100644 (file)
                     <a class="btn btn-default btn-xs dropdown-toggle" id="authtagactions[% loo.tagfield | html %]" role="button" data-toggle="dropdown" href="#">
                         Actions <b class="caret"></b></a>
                     <ul class="dropdown-menu pull-right" role="menu" aria-labelledby="authtagactions[% loo.tagfield | html %]">
-                        <li><a href="[% loo.subfield_link | url %]"><i class="fa fa-eye"></i> Subfields</a></li>
-                        <li><a href="[% loo.edit | url %]"><i class="fa fa-pencil"></i> Edit</a></li>
-                        <li><a href="[% loo.delete | url %]"><i class="fa fa-trash"></i> Delete</a></li>
+                        <li><a href="auth_subfields_structure.pl?tagfield=[% loo.tagfield | uri %]&amp;authtypecode=[% authtypecode | uri %]"><i class="fa fa-eye"></i> Subfields</a></li>
+                        <li><a href="?op=add_form&amp;searchfield=[% loo.tagfield | uri %]&amp;authtypecode=[% authtypecode | uri %]"><i class="fa fa-pencil"></i> Edit</a></li>
+                        <li><a href="?op=delete_confirm&amp;searchfield=[% loo.tagfield | uri %]&amp;authtypecode=[% authtypecode | uri %]"><i class="fa fa-trash"></i> Delete</a></li>
                     </ul>
                 </div>
             </td>