Bug 14050: Default framework for authorities should not be deletable
authorMarc Véron <veron@veron.ch>
Mon, 25 Apr 2016 13:02:36 +0000 (15:02 +0200)
committerKyle M Hall <kyle@bywatersolutions.com>
Fri, 29 Apr 2016 12:28:43 +0000 (12:28 +0000)
To test:
- Apply patch
- In staff client, go to Home > Administration > Authority types
- Verify that the Actions for the Default type do not contain the delete
  action
- Verify that other types have a delete action

Signed-off-by: Hector Castro <hector.hecaxmmx@gmail.com>
Delete action was eliminated

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
koha-tmpl/intranet-tmpl/prog/en/modules/admin/authtypes.tt

index 4740e4d..90dc74f 100644 (file)
                     <ul class="dropdown-menu pull-right" role="menu" aria-labelledby="authtypeactions[% authority_type.authtypecode %]">
                       <li><a href="auth_tag_structure.pl?authtypecode=[% authority_type.authtypecode %]" class="button parameters"><i class="fa fa-eye"></i> MARC structure</a></li>
                       <li><a href="/cgi-bin/koha/admin/authtypes.pl?op=add_form&amp;authtypecode=[% authority_type.authtypecode |html %]"><i class="fa fa-pencil"></i> Edit</a></li>
-                      <li><a href="/cgi-bin/koha/admin/authtypes.pl?op=delete_confirm&amp;authtypecode=[% authority_type.authtypecode |html %]"><i class="fa fa-trash"></i> Delete</a></li>
+                      [% IF authority_type.authtypecode %]<li><a href="/cgi-bin/koha/admin/authtypes.pl?op=delete_confirm&amp;authtypecode=[% authority_type.authtypecode |html %]"><i class="fa fa-trash"></i> Delete</a></li>[% END %]
                     </ul>
                   </div>
                 </td>