airavata-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sma...@apache.org
Subject [01/20] airavata-php-gateway git commit: Add dashboard link for non-admin users
Date Fri, 28 Oct 2016 16:45:50 GMT
Repository: airavata-php-gateway
Updated Branches:
  refs/heads/develop 31a70432b -> e47baa67a


Add dashboard link for non-admin users


Project: http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/repo
Commit: http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/commit/06ede1d2
Tree: http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/tree/06ede1d2
Diff: http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/diff/06ede1d2

Branch: refs/heads/develop
Commit: 06ede1d24c9e3ef4c8cb154de7841912d8d2a46a
Parents: 26ed2cf
Author: Marcus Christie <marc.christie@gmail.com>
Authored: Fri Oct 7 16:47:18 2016 -0400
Committer: Marcus Christie <machrist@iu.edu>
Committed: Thu Oct 20 10:21:41 2016 -0400

----------------------------------------------------------------------
 app/controllers/AccountController.php | 5 +++++
 app/libraries/CommonUtilities.php     | 6 ++++--
 2 files changed, 9 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/blob/06ede1d2/app/controllers/AccountController.php
----------------------------------------------------------------------
diff --git a/app/controllers/AccountController.php b/app/controllers/AccountController.php
index d167148..ddcecef 100644
--- a/app/controllers/AccountController.php
+++ b/app/controllers/AccountController.php
@@ -3,6 +3,11 @@
 class AccountController extends BaseController
 {
 
+    public function __construct()
+    {
+        Session::put("nav-active", "user-dashboard");
+    }
+
     public function createAccountView()
     {
         return View::make('account/create');

http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/blob/06ede1d2/app/libraries/CommonUtilities.php
----------------------------------------------------------------------
diff --git a/app/libraries/CommonUtilities.php b/app/libraries/CommonUtilities.php
index 962bbcd..9ec209b 100644
--- a/app/libraries/CommonUtilities.php
+++ b/app/libraries/CommonUtilities.php
@@ -203,7 +203,7 @@ class CommonUtilities
         if (Session::has('loggedin')) {
             $active = "";
             if (Session::has("nav-active")) {
-                if ("user-console" == Session::get("nav-active"))
+                if ("user-console" == Session::get("nav-active") || "user-dashboard" == Session::get("nav-active"))
                     $active = " active ";
             }
 
@@ -216,7 +216,9 @@ class CommonUtilities
 
 
             if (Session::has("admin") || Session::has("admin-read-only"))
-                echo '<li class="' . $active . '"><a href="' . URL::to("/") . '/admin/dashboard"><span
class="glyphicon glyphicon-user"></span>Admin Dashboard</a></li>';
+                echo '<li class="' . $active . '"><a href="' . URL::to("/") . '/admin/dashboard"><span
class="glyphicon glyphicon-user"></span> Admin Dashboard</a></li>';
+            else
+                echo '<li class="' . $active . '"><a href="' . URL::to("/") . '/account/dashboard"><span
class="glyphicon glyphicon-user"></span> Dashboard</a></li>';
 //            else
 //                echo '<li><a href="' . URL::to("/") . '/user/profile"><span
class="glyphicon glyphicon-user"></span> Profile</a></li>';
 


Mime
View raw message