From 5b88ceb8449e21ccfd3beacfa6aa9b9206302ace Mon Sep 17 00:00:00 2001 From: Bill Erickson Date: Thu, 21 Sep 2017 16:04:03 -0400 Subject: [PATCH] LP#1643927 Copy note captures initials; shows date Fixes thinko in copy note staff initials tracking. Offloads the formatting of the copy note to egStrings. Adds the workstation org unit to the initials block a la the XUL client. This does not add the create date to the initials block as with the XUL client, because the create date is part of the note. Instead, we now display the note create date in the copy note display form. Signed-off-by: Bill Erickson Signed-off-by: Cesar Velez Signed-off-by: Galen Charlton --- Open-ILS/src/templates/staff/cat/volcopy/index.tt2 | 3 +++ .../src/templates/staff/cat/volcopy/t_copy_notes.tt2 | 5 ++++- Open-ILS/web/js/ui/default/staff/cat/volcopy/app.js | 11 ++++++++++- 3 files changed, 17 insertions(+), 2 deletions(-) diff --git a/Open-ILS/src/templates/staff/cat/volcopy/index.tt2 b/Open-ILS/src/templates/staff/cat/volcopy/index.tt2 index 97996b7258..f93cb5619b 100644 --- a/Open-ILS/src/templates/staff/cat/volcopy/index.tt2 +++ b/Open-ILS/src/templates/staff/cat/volcopy/index.tt2 @@ -15,6 +15,9 @@ angular.module('egCoreMod').run(['egStrings', function(s) { s.VOL_COPY_TEMPLATE_SUCCESS_SAVE = "[% l('Saved volume/copy template(s)') %]"; s.VOL_COPY_TEMPLATE_SUCCESS_DELETE = "[% l('Deleted volume/copy template') %]"; + [%# Note the "~" characters escape the gettext brackets %] + s.COPY_NOTE_INITIALS = + "[% l('[_1] ~[ [_2] @ [_3] ~]', '{{value}}', '{{initials}}', '{{ws_ou}}') %]" }]); [% END %] diff --git a/Open-ILS/src/templates/staff/cat/volcopy/t_copy_notes.tt2 b/Open-ILS/src/templates/staff/cat/volcopy/t_copy_notes.tt2 index 8b875f04b5..a679afafbf 100644 --- a/Open-ILS/src/templates/staff/cat/volcopy/t_copy_notes.tt2 +++ b/Open-ILS/src/templates/staff/cat/volcopy/t_copy_notes.tt2 @@ -73,11 +73,14 @@
-
+
+
+ {{n.create_date() | date:$root.egDateFormat}} +
diff --git a/Open-ILS/web/js/ui/default/staff/cat/volcopy/app.js b/Open-ILS/web/js/ui/default/staff/cat/volcopy/app.js index 4a0c956a67..11fa2a7b86 100644 --- a/Open-ILS/web/js/ui/default/staff/cat/volcopy/app.js +++ b/Open-ILS/web/js/ui/default/staff/cat/volcopy/app.js @@ -1697,7 +1697,16 @@ function($scope , $q , $window , $routeParams , $location , $timeout , egCore , $scope.ok = function(note) { - if (note.initials) note.value += ' [' + note.initials + ']'; + if ($scope.initials) { + note.value = egCore.strings.$replace( + egCore.strings.COPY_NOTE_INITIALS, { + value : note.value, + initials : $scope.initials, + ws_ou : egCore.org.get( + egCore.auth.user().ws_ou()).shortname() + }); + } + angular.forEach(copy_list, function (cp) { if (!angular.isArray(cp.notes())) cp.notes([]); var n = new egCore.idl.acpn(); -- 2.43.2