From 4a302b17afee055c5d123d78328d50bdc7531259 Mon Sep 17 00:00:00 2001 From: Marcel de Rooy Date: Thu, 22 Jun 2017 10:14:29 +0200 Subject: [PATCH] Bug 18980: Show distinction between shared and private lists in staff MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Just as we show this distinction in OPAC, this patch adds a type column in the Your lists tab that displays Private or Shared. It always contains Public in the other tab. Test plan: [1] Check if you see Shared for a private lists with shares in staff. [2] Run t/db_dependent/Utils/Datatables_Virtualshelves.t Signed-off-by: Marcel de Rooy Signed-off-by: Lee Jamison Signed-off-by: Marc Véron Signed-off-by: Nick Clemens Signed-off-by: Jonathan Druart --- C4/Utils/DataTables/VirtualShelves.pm | 1 + .../intranet-tmpl/prog/en/modules/virtualshelves/shelves.tt | 3 +++ .../prog/en/modules/virtualshelves/tables/shelves_results.tt | 2 ++ 3 files changed, 6 insertions(+) diff --git a/C4/Utils/DataTables/VirtualShelves.pm b/C4/Utils/DataTables/VirtualShelves.pm index 28f579fd3e..156b68cb23 100644 --- a/C4/Utils/DataTables/VirtualShelves.pm +++ b/C4/Utils/DataTables/VirtualShelves.pm @@ -122,6 +122,7 @@ sub search { my $s = Koha::Virtualshelves->find( $shelf->{shelfnumber} ); $shelf->{can_manage_shelf} = $s->can_be_managed( $loggedinuser ); $shelf->{can_delete_shelf} = $s->can_be_deleted( $loggedinuser ); + $shelf->{is_shared} = $s->is_shared; } return { iTotalRecords => $iTotalRecords, diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/virtualshelves/shelves.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/virtualshelves/shelves.tt index f26acd45e1..9dd7ea4629 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/virtualshelves/shelves.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/virtualshelves/shelves.tt @@ -92,6 +92,7 @@ $(document).ready(function(){ { 'mDataProp': 'dt_type' }, { 'mDataProp': 'dt_shelfname' }, { 'mDataProp': 'dt_count' }, + { 'mDataProp': 'dt_is_shared' }, { 'mDataProp': 'dt_owner' }, { 'mDataProp': 'dt_sortby' }, { 'mDataProp': 'dt_created_on' }, @@ -638,6 +639,7 @@ function AdjustRemark() { Type List name Contents + Type Owner Sort by Creation date @@ -648,6 +650,7 @@ function AdjustRemark() { +