[open-ils-commits] [GIT] Evergreen ILS branch rel_3_2 updated. 8b7536f75d6debe3ab65e5226b2179ef31e0ffe6

Evergreen Git git at git.evergreen-ils.org
Fri Mar 8 10:06:23 EST 2019


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "Evergreen ILS".

The branch, rel_3_2 has been updated
       via  8b7536f75d6debe3ab65e5226b2179ef31e0ffe6 (commit)
      from  a36a915ab853babbc42f5f3d9a1fb7858fb1cf73 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit 8b7536f75d6debe3ab65e5226b2179ef31e0ffe6
Author: Galen Charlton <gmc at equinoxinitiative.org>
Date:   Wed Jan 23 10:52:24 2019 -0500

    LP#1812389: make Group Penalty Threshold admin page accessible again
    
    As a consequence of the patch for bug 1744756 adding a new
    admin/local/permission AngularJS app, the routing for
    admin/local/permission/grp_penalty_threshold got broken, making the
    embdeded Conify interface for group penalty thresholds inaccessible
    from the web staff client. This patch fixes that.
    
    To test
    -------
    [1] From Administration | Local Administration, go to Group Penalty
        Thresholds. Note that the embedded Conify admin interface
        is not displayed and the URL changes to .../permission/grp_tree.
    [2] Apply the patch and repeat step 1. This time, the admin interface
        should appear.
    [3] Verify that the Permission Group Tree Entries interface remains
        accessible from Local Administration.
    
    Signed-off-by: Galen Charlton <gmc at equinoxinitiative.org>
    Signed-off-by: Bill Erickson <berickxx at gmail.com>

diff --git a/Open-ILS/src/templates/staff/admin/local/permission/index.tt2 b/Open-ILS/src/templates/staff/admin/local/permission/index.tt2
index 6b63ed5f19..9e110ef526 100644
--- a/Open-ILS/src/templates/staff/admin/local/permission/index.tt2
+++ b/Open-ILS/src/templates/staff/admin/local/permission/index.tt2
@@ -6,6 +6,7 @@
 
 [% BLOCK APP_JS %]
 <script src="[% ctx.media_prefix %]/js/ui/default/staff/services/ui.js"></script>
+<script src="[% ctx.media_prefix %]/js/ui/default/staff/services/eframe.js"></script>
 <script src="[% ctx.media_prefix %]/js/ui/default/staff/admin/local/permission/app.js"></script>
 <link rel="stylesheet" href="[% ctx.base_path %]/staff/css/admin.css" />
 <script>
@@ -23,4 +24,4 @@ angular.module('egCoreMod').run(['egStrings', function(s) {
 
 <div ng-view></div>
 
-[% END %]
\ No newline at end of file
+[% END %]
diff --git a/Open-ILS/web/js/ui/default/staff/admin/local/permission/app.js b/Open-ILS/web/js/ui/default/staff/admin/local/permission/app.js
index 3b7f19a059..185ad33034 100644
--- a/Open-ILS/web/js/ui/default/staff/admin/local/permission/app.js
+++ b/Open-ILS/web/js/ui/default/staff/admin/local/permission/app.js
@@ -14,6 +14,15 @@ angular.module('egAdminPermGrpTreeApp',
         resolve : resolver
     });
 
+    // catch admin/local/permission/grp_penalty_threshold
+    var eframe_template = 
+        '<eg-embed-frame allow-escape="true" min-height="min_height" url="local_admin_url" handlers="funcs"></eg-embed-frame>';
+    $routeProvider.when('/admin/local/:schema/:page', {
+        template: eframe_template,
+        controller: 'EmbedConifyCtl',
+        resolve : resolver
+    });
+
     $routeProvider.otherwise({redirectTo : '/admin/local/permission/grp_tree'});
 })
 
@@ -433,4 +442,26 @@ function($scope , $q , $timeout , $location , $uibModal , egCore , egPermGrpTree
     egCore.startup.go(function() {
         $scope.refreshTree(egCore.auth.user().ws_ou());
     });
-}])
\ No newline at end of file
+}])
+
+.controller('EmbedConifyCtl', 
+       ['$scope','$routeParams','$location','egCore',
+function($scope , $routeParams , $location , egCore) {
+
+    $scope.funcs = {
+        ses : egCore.auth.token(),
+    }
+
+    var conify_path = '/eg/conify/global/' + 
+        $routeParams.schema + '/' + $routeParams.page;
+
+    $scope.min_height = 800;
+
+    // embed URL must include protocol/domain or it will be loaded via
+    // push-state, resulting in an infinitely nested pages.
+    $scope.local_admin_url = 
+        $location.absUrl().replace(/\/eg\/staff.*/, conify_path);
+
+    console.log('Loading local admin URL: ' + $scope.local_admin_url);
+
+}])

-----------------------------------------------------------------------

Summary of changes:
 .../staff/admin/local/permission/index.tt2         |  3 +-
 .../ui/default/staff/admin/local/permission/app.js | 33 +++++++++++++++++++++-
 2 files changed, 34 insertions(+), 2 deletions(-)


hooks/post-receive
-- 
Evergreen ILS


More information about the open-ils-commits mailing list