LP#1534787 Patron Message Center port
authorKyle Huckins <khuckins@catalystdevworks.com>
Wed, 4 Jan 2017 17:36:21 +0000 (09:36 -0800)
committerKathy Lussier <klussier@masslnc.org>
Tue, 7 Feb 2017 05:32:04 +0000 (00:32 -0500)
Port patron message center from XUL client to
web client.

Signed-off-by: Kyle Huckins <khuckins@catalystdevworks.com>
Signed-off-by: Christine Burns <christine.burns@bc.libraries.coop>
Signed-off-by: Kathy Lussier <klussier@masslnc.org>
Open-ILS/src/templates/staff/circ/patron/index.tt2
Open-ILS/src/templates/staff/circ/patron/t_message_center.tt2 [new file with mode: 0644]
Open-ILS/web/js/ui/default/staff/circ/patron/app.js

index 407668d..0cdc45c 100644 (file)
@@ -146,6 +146,11 @@ angular.module('egCoreMod').run(['egStrings', function(s) {
             </a>
           </li>
           <li>
+            <a href="./circ/patron/{{patron().id()}}/message_center">
+              [% l('Message Center') %]
+            </a>
+          </li>
+          <li>
             <a href="./circ/patron/{{patron().id()}}/stat_cats">
               [% l('Statistical Categories') %]
             </a>
diff --git a/Open-ILS/src/templates/staff/circ/patron/t_message_center.tt2 b/Open-ILS/src/templates/staff/circ/patron/t_message_center.tt2
new file mode 100644 (file)
index 0000000..4a59e27
--- /dev/null
@@ -0,0 +1,2 @@
+<!-- insert the patron registration UI -->
+<eg-embed-frame url="message_center_url" handlers="funcs"></eg-embed-frame>
\ No newline at end of file
index 630ca9c..2c94009 100644 (file)
@@ -190,6 +190,12 @@ angular.module('egPatronApp', ['ngRoute', 'ui.bootstrap',
         resolve : resolver
     });
 
+    $routeProvider.when('/circ/patron/:id/message_center', {
+        templateUrl: './circ/patron/t_message_center',
+        controller: 'PatronMessageCenterCtrl',
+        resolve : resolver
+    });
+
     $routeProvider.when('/circ/patron/:id/edit_perms', {
         templateUrl: './circ/patron/t_edit_perms',
         controller: 'PatronPermsCtrl',
@@ -1640,6 +1646,19 @@ function($scope,  $routeParams,  $location , egCore , patronSvc) {
     $scope.funcs = {};
 }])
 
+.controller('PatronMessageCenterCtrl',
+       ['$scope','$routeParams','$location','egCore','patronSvc',
+function($scope,  $routeParams,  $location , egCore , patronSvc) {
+    $scope.initTab('other', $routeParams.id);
+
+    var url = $location.protocol() + '://' + $location.host()
+        + egCore.env.basePath.replace(/\/staff.*/,  '/actor/user/message');
+    url += '/' + encodeURIComponent($routeParams.id);
+
+    $scope.message_center_url = url;
+    $scope.funcs = {};
+}])
+
 .controller('PatronPermsCtrl',
        ['$scope','$routeParams','$window','$location','egCore',
 function($scope , $routeParams , $window , $location , egCore) {