From 79c3ab14534a190e141eebf5089a1bca322c1ebf Mon Sep 17 00:00:00 2001 From: Kyle Hall Date: Fri, 29 Apr 2022 07:24:06 -0400 Subject: [PATCH] Bug 20256: (QA follow-up) hide Edit chooice in Actions on items editor if item cannot be edited --- cataloguing/additem.pl | 4 ++-- .../intranet-tmpl/prog/en/modules/cataloguing/additem.tt | 2 ++ 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/cataloguing/additem.pl b/cataloguing/additem.pl index cf98b54a9f..4b93ec24b3 100755 --- a/cataloguing/additem.pl +++ b/cataloguing/additem.pl @@ -518,8 +518,8 @@ if ($op) { my @items; for my $item ( $biblio->items->as_list, $biblio->host_items->as_list ) { my $i = $item->columns_to_str; - $item->{nomod} = 1 unless $patron->can_edit_item($item); - push @items, $item->columns_to_str; + $i->{nomod} = 1 unless $patron->can_edit_item($item); + push @items, $i; } my @witness_attributes = uniq map { diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/additem.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/additem.tt index aa02320f52..fa8dd08e6b 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/additem.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/additem.tt @@ -107,7 +107,9 @@ [% IF item.biblionumber != biblio.biblionumber %] [%# Host item %]
  • Edit in host   Delink
  • [% ELSE %] + [% UNLESS item.nomod %]
  • Edit
  • + [% END %]
  • Duplicate
  • Delete
  • -- 2.30.2