From 1a1529d20572c8eb7e65ad7bbd41f688d5f86f07 Mon Sep 17 00:00:00 2001 From: Marcel de Rooy Date: Wed, 3 Aug 2022 14:59:49 +0000 Subject: [PATCH] Bug 29144: Adjust libraries form Test plan: [1] Go to Administration / libraries. [2] Check list view. [3] Check view on individual library with/without opac info. [4] Edit individual library with/without opac info. Signed-off-by: Marcel de Rooy Signed-off-by: Owen Leonard Signed-off-by: Martin Renvoize Signed-off-by: Tomas Cohen Arazi --- admin/branches.pl | 1 - .../prog/en/modules/admin/branches.tt | 19 +++++++++++++++---- 2 files changed, 15 insertions(+), 5 deletions(-) diff --git a/admin/branches.pl b/admin/branches.pl index 134321a2bd..17b6a47d3c 100755 --- a/admin/branches.pl +++ b/admin/branches.pl @@ -78,7 +78,6 @@ if ( $op eq 'add_form' ) { issuing branchip branchnotes - opac_info marcorgcode pickup_location public diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/branches.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/branches.tt index 11185bd235..a0674f355f 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/branches.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/branches.tt @@ -4,6 +4,8 @@ [% SET footerjs = 1 %] [% USE TablesSettings %] [% INCLUDE 'doc-head-open.inc' %] +[% IF library %][% SET OpacLibraryInfo = library.opac_info( lang => lang ) %][% END %] + [% IF op == 'add_form' %] [% IF library %] @@ -248,7 +250,14 @@ Libraries › Administration › Koha </select> </li> <li><label for="branchurl">URL: </label><input type="text" name="branchurl" id="branchurl" size="80" value="[% library.branchurl | html %]" class="url" /></li> - <li><label for="opac_info">OPAC info: </label><textarea name="opac_info" id="opac_info">[% library.opac_info | $raw %]</textarea></li> + <li><label for="opac_info">OPAC info: </label> + [% IF OpacLibraryInfo %]<!-- opac_info --> + <div>[% OpacLibraryInfo.content | $raw %]</div> + <div class="hint"><a href="/cgi-bin/koha/tools/additional-contents.pl?category=html_customizations&op=add_form&id=[% OpacLibraryInfo.id | $raw %]&editmode=wysiwyg" target="_blank">Edit html content</a></div> + [% ELSE %] + <a href="/cgi-bin/koha/tools/additional-contents.pl?category=html_customizations&op=add_form&editmode=wysiwyg" target="_blank">Add html content</a> + [% END %] + </li> <li> <label for="branchip">IP: </label> <input type="text" name="branchip" id="branchip" size="15" maxlength="15" value="[% library.branchip | html %]" /> @@ -461,12 +470,12 @@ Libraries › Administration › Koha </div> <!-- /.rows --> </div> <!-- /.col-sm-6 --> </div> <!-- /.row --> - [% IF ( library.opac_info ) %] + [% IF OpacLibraryInfo %]<!-- opac_info --> <hr /> <div class="row"> <div class="col-sm-12"> <h2>OPAC information</h2> - [% library.opac_info | $raw %] + <div>[% OpacLibraryInfo.content | $raw %]</div> </div> </div> [% END %] @@ -659,7 +668,9 @@ Libraries › Administration › Koha "orderable": false }, { - "data": "opac_info", + "data": function( row, type, val, meta ) { + return ''; // provisional placeholder for opac_info + }, "searchable": true, "visible": false, "orderable": false -- 2.39.5