From 545e9f291878f692978555abc3e55256a1bf8360 Mon Sep 17 00:00:00 2001 From: Kyle M Hall Date: Wed, 6 Dec 2017 14:24:37 -0500 Subject: [PATCH] Bug 19765 - Special library groups should have a 'translated' title and should not be editable Built-in library groups start and end with "__" as defined in bug 16735. We should translate the title to something readable and prevent them from being edited and deleted. Test Plan: 1) Apply this patch 2) Note you no longer see __SEARCH_GROUPS__ and __SEARCH_GROUPS_OPAC__, instead you see a bold emphasised group name in normal language 3) Note you can no longer delete or edit those groups --- .../prog/en/modules/admin/library_groups.tt | 34 +++++++++++++++------- 1 file changed, 23 insertions(+), 11 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/library_groups.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/library_groups.tt index 95200b2..5bad08a 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/library_groups.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/library_groups.tt @@ -252,13 +252,23 @@ [% INCLUDE 'intranet-bottom.inc' %] +[% BLOCK group_title %] + [% IF title == "__SEARCH_GROUPS__" %] + Search Groups - Staff + [% ELSIF title == "__SEARCH_GROUPS_OPAC__" %] + Search Groups - OPAC + [% ELSE %] + [% title %] + [% END %] +[% END %] + [% BLOCK tree %] [% IF group.branchcode %] [% group.branchcode %] [% ELSE %] - [% group.title %] + [% PROCESS group_title title=group.title %] [% END %] @@ -281,17 +291,19 @@ -
  • - - Edit - -
  • + [% UNLESS group.title.match("^__.*__$") # Group titles starting and ending with __ are special groups that cannot be edited or deleted %] +
  • + + Edit + +
  • -
  • - - Delete - -
  • +
  • + + Delete + +
  • + [% END %] -- 2.10.2