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 <berickxx@gmail.com>
Signed-off-by: Cesar Velez <cesar.velez@equinoxinitiative.org>
Signed-off-by: Galen Charlton <gmc@equinoxinitiative.org>
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}}') %]"
}]);
</script>
[% END %]
</div>
</div>
<div class="row pad-vert">
- <div class="col-md-12">
+ <div class="col-md-10">
<textarea class="form-control" ng-change="n.value(value) && n.ischanged(1)"
ng-model="value" placeholder="[% l('Note...') %]" ng-disabled="deleted">
</textarea>
</div>
+ <div class="col-md-2">
+ {{n.create_date() | date:$root.egDateFormat}}
+ </div>
</div>
<div class="row">
<div class="col-md-12">
$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();