From 5eaa1710418e237cd6ec9745b9c77e978b5fba5d Mon Sep 17 00:00:00 2001
From: Jane Sandberg <sandbej@linnbenton.edu>
Date: Mon, 10 Sep 2018 11:16:51 -0700
Subject: [PATCH] LP1743654: Fleshing out the Created By column in Item Status

To test:
1) Scan an item into Item Status.
2) Turn on the Created By column.
3) Note that the Created By column shows the ID of the user
that created the record.
4) Apply this commit and repeat steps 1-2.
5) Note that the Created By column now shows the creator's
user name as a link, which opens the creator's record in
a new tab.

Signed-off-by: Jane Sandberg <sandbej@linnbenton.edu>
Signed-off-by: John Amundson <jamundson@cwmars.org>
Signed-off-by: Jason Stephenson <jason@sigio.com>
---
 Open-ILS/src/templates/staff/cat/item/t_list.tt2       | 9 ++++++++-
 Open-ILS/web/js/ui/default/staff/circ/services/item.js | 2 +-
 2 files changed, 9 insertions(+), 2 deletions(-)

diff --git a/Open-ILS/src/templates/staff/cat/item/t_list.tt2 b/Open-ILS/src/templates/staff/cat/item/t_list.tt2
index f9fba8428e..1d250f807c 100644
--- a/Open-ILS/src/templates/staff/cat/item/t_list.tt2
+++ b/Open-ILS/src/templates/staff/cat/item/t_list.tt2
@@ -102,7 +102,14 @@
   <eg-grid-field label="[% l('Circulation Modifier') %]"  path="circ_modifier.name" hidden></eg-grid-field>
   <eg-grid-field label="[% l('Copy ID') %]"               path="id" hidden></eg-grid-field>
   <eg-grid-field label="[% l('Copy Number') %]"           path="copy_number" hidden></eg-grid-field>
-  <eg-grid-field label="[% l('Created By') %]"            path="creator" hidden></eg-grid-field>
+
+  <eg-grid-field label="[% l('Created By') %]"
+    path="creator" hidden>
+    <a target="_blank" href="[% ctx.base_path %]/staff/circ/patron/{{item['creator.id']}}/checkout">
+      {{item['creator.usrname']}} <span ng-show="item['creator.id']" class="glyphicon glyphicon-new-window"/>
+    </a>
+  </eg-grid-field>
+
   <eg-grid-field label="[% l('Date Created') %]"          path="create_date" datatype="timestamp" hidden></eg-grid-field>
   <eg-grid-field label="[% l('Date Last Edited') %]"      path="edit_date" datatype="timestamp" hidden></eg-grid-field>
   <eg-grid-field label="[% l('Date Record Created') %]"   path="call_number.record.create_date" datatype="timestamp" hidden></eg-grid-field>
diff --git a/Open-ILS/web/js/ui/default/staff/circ/services/item.js b/Open-ILS/web/js/ui/default/staff/circ/services/item.js
index b03f57d15d..1ec1458263 100644
--- a/Open-ILS/web/js/ui/default/staff/circ/services/item.js
+++ b/Open-ILS/web/js/ui/default/staff/circ/services/item.js
@@ -16,7 +16,7 @@ function(egCore , egCirc , $uibModal , $q , $timeout , $window , egConfirmDialog
         flesh : 4,
         flesh_fields : {
             acp : ['call_number','location','status','location','floating','circ_modifier',
-                'age_protect','circ_lib','copy_alerts', 'editor', 'circ_as_type', 'latest_inventory'],
+                'age_protect','circ_lib','copy_alerts', 'creator', 'editor', 'circ_as_type', 'latest_inventory'],
             acn : ['record','prefix','suffix','label_class'],
             bre : ['simple_record','creator','editor'],
             alci : ['inventory_workstation']
-- 
2.11.0