Bugzilla – Attachment 69590 Details for
Bug 19765
Special library groups should have a 'translated' title and should not be editable
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 19765 - Special library groups should have a 'translated' title and should not be editable
Bug-19765---Special-library-groups-should-have-a-t.patch (text/plain), 3.66 KB, created by
Kyle M Hall (khall)
on 2017-12-06 19:26:33 UTC
(
hide
)
Description:
Bug 19765 - Special library groups should have a 'translated' title and should not be editable
Filename:
MIME Type:
Creator:
Kyle M Hall (khall)
Created:
2017-12-06 19:26:33 UTC
Size:
3.66 KB
patch
obsolete
>From 545e9f291878f692978555abc3e55256a1bf8360 Mon Sep 17 00:00:00 2001 >From: Kyle M Hall <kyle@bywatersolutions.com> >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 @@ > </div> > [% INCLUDE 'intranet-bottom.inc' %] > >+[% BLOCK group_title %] >+ [% IF title == "__SEARCH_GROUPS__" %] >+ <strong><em>Search Groups - Staff</em></strong> >+ [% ELSIF title == "__SEARCH_GROUPS_OPAC__" %] >+ <strong><em>Search Groups - OPAC</em></strong> >+ [% ELSE %] >+ [% title %] >+ [% END %] >+[% END %] >+ > [% BLOCK tree %] > <tr data-tt-id="[% group.id %]" data-tt-parent-id="[% group.parent_id %]"> > <td> > [% IF group.branchcode %] > [% group.branchcode %] > [% ELSE %] >- [% group.title %] >+ [% PROCESS group_title title=group.title %] > [% END %] > </td> > <td> >@@ -281,17 +291,19 @@ > </a> > </li> > >- <li> >- <a class="edit-group" id="edit-group-[% group.id %]" href="#" class="edit-group" data-group-id="[% group.id %]" data-group-title="[% group.title | html %]" data-group-description="[% group.description | html %]"> >- <i class="fa fa-pencil"></i> Edit >- </a> >- </li> >+ [% UNLESS group.title.match("^__.*__$") # Group titles starting and ending with __ are special groups that cannot be edited or deleted %] >+ <li> >+ <a class="edit-group" id="edit-group-[% group.id %]" href="#" class="edit-group" data-group-id="[% group.id %]" data-group-title="[% group.title | html %]" data-group-description="[% group.description | html %]"> >+ <i class="fa fa-pencil"></i> Edit >+ </a> >+ </li> > >- <li> >- <a class="delete-group" id="delete-group-[% group.id %]" href="#" class="delete-group" data-group-id="[% group.id %]" data-group-title="[% group.title | html %]"> >- <i class="fa fa-trash"></i> Delete >- </a> >- </li> >+ <li> >+ <a class="delete-group" id="delete-group-[% group.id %]" href="#" class="delete-group" data-group-id="[% group.id %]" data-group-title="[% group.title | html %]"> >+ <i class="fa fa-trash"></i> Delete >+ </a> >+ </li> >+ [% END %] > </ul> > </div> > >-- >2.10.2
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 19765
: 69590