You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airavata.apache.org by nd...@apache.org on 2016/10/31 07:42:38 UTC
[1/2] airavata-php-gateway git commit: Configuration added if themes
have login/create account links setup, navbar will hide.
Repository: airavata-php-gateway
Updated Branches:
refs/heads/develop 6d121230c -> 5c7e26471
Configuration added if themes have login/create account links setup, navbar will hide.
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/8d1bcdcb
Tree: http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/tree/8d1bcdcb
Diff: http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/diff/8d1bcdcb
Branch: refs/heads/develop
Commit: 8d1bcdcb61a5d3965af0f90f55f6cf73f7642ef8
Parents: 26ed2cf
Author: Nipurn Doshi <ni...@gmail.com>
Authored: Mon Oct 31 00:24:47 2016 -0700
Committer: Nipurn Doshi <ni...@gmail.com>
Committed: Mon Oct 31 00:24:47 2016 -0700
----------------------------------------------------------------------
app/config/pga_config.php.template | 5 ++++
app/libraries/CommonUtilities.php | 49 +++++++++++++++++++--------------
2 files changed, 33 insertions(+), 21 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/blob/8d1bcdcb/app/config/pga_config.php.template
----------------------------------------------------------------------
diff --git a/app/config/pga_config.php.template b/app/config/pga_config.php.template
index b7e2208..7a18f5a 100644
--- a/app/config/pga_config.php.template
+++ b/app/config/pga_config.php.template
@@ -217,6 +217,11 @@ return array(
'portal-smtp-server-port' => '587',
/**
+ * Set this to true if theme has set links to login
+ */
+ 'theme-based-login-links-configured' => false,
+
+ /**
* Set JIRA Issue Collector scripts here.
*/
'jira-help' =>
http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/blob/8d1bcdcb/app/libraries/CommonUtilities.php
----------------------------------------------------------------------
diff --git a/app/libraries/CommonUtilities.php b/app/libraries/CommonUtilities.php
index 962bbcd..b7e434e 100644
--- a/app/libraries/CommonUtilities.php
+++ b/app/libraries/CommonUtilities.php
@@ -139,7 +139,7 @@ class CommonUtilities
}
}
- echo '<nav class="navbar navbar-inverse navbar-static-top" role="navigation">
+ $navbar = '<nav class="navbar navbar-inverse navbar-static-top" role="navigation">
<div class="container-fluid">
<!-- Brand and toggle get grouped for better mobile display -->
<div class="navbar-header">
@@ -167,7 +167,7 @@ class CommonUtilities
if ($options[0]['nav-active'] == Session::get("nav-active"))
$active = " active ";
}
- echo '<li class="dropdown ' . $active . '">
+ $navbar .= '<li class="dropdown ' . $active . '">
<a href="#" class="dropdown-toggle" data-toggle="dropdown">' . $label . '<span class="caret"></span></a>
<ul class="dropdown-menu" role="menu">';
@@ -175,15 +175,14 @@ class CommonUtilities
foreach ($options as $option) {
$id = strtolower(str_replace(' ', '-', $option['label']));
- echo '<li' . $disabled . '><a href="' . $option['url'] . '" id=' . $id . '>' . $option['label'] . '</a></li>';
+ $navbar .= '<li' . $disabled . '><a href="' . $option['url'] . '" id=' . $id . '>' . $option['label'] . '</a></li>';
}
}
- echo '</ul>
- </li>';
+ $navbar .= '</ul></li>';
}
if( count( $menus) == 0)
- echo '<li class="brand-logo"></li>';
+ $navbar .= '<li class="brand-logo"></li>';
$active = "";
if(Session::has('loggedin') &&
@@ -192,9 +191,9 @@ class CommonUtilities
){
if( Session::get("nav-active") == "storage")
$active = "active";
- echo '<li class="' . $active . '"><a href="' . URL::to("/") . '/files/browse"><span class="glyphicon glyphicon-folder-close"></span> Storage</a></li>';
+ $navbar .= '<li class="' . $active . '"><a href="' . URL::to("/") . '/files/browse"><span class="glyphicon glyphicon-folder-close"></span> Storage</a></li>';
}
- echo '</ul>
+ $navbar .= '</ul>
<ul class="nav navbar-nav navbar-right">';
@@ -211,39 +210,47 @@ class CommonUtilities
//notification bell
$notices = array();
$notices = CommonUtilities::get_all_notices();
- echo CommonUtilities::get_notices_ui( $notices);
+ $navbar .= CommonUtilities::get_notices_ui( $notices);
}
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>';
-// else
-// echo '<li><a href="' . URL::to("/") . '/user/profile"><span class="glyphicon glyphicon-user"></span> Profile</a></li>';
+ $navbar .= '<li class="' . $active . '"><a href="' . URL::to("/") . '/admin/dashboard"><span class="glyphicon glyphicon-user"></span>Admin Dashboard</a></li>';
- echo '<li class="dropdown">
+ $navbar .= '<li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown">' . Session::get("username") . ' <span class="caret"></span></a>';
- echo '<ul class="dropdown-menu" role="menu">';
+ $navbar .= '<ul class="dropdown-menu" role="menu">';
if ( Session::has("existing-gateway-provider")) {
$requestedGateways = Session::get("requestedGateways");
foreach( $requestedGateways as $gatewayId => $gateway){
if( $gateway["approvalStatus"] == "Approved"){
- echo '<li><a href="' . URL::to('/') . '/admin/dashboard?gatewayId=' . $gateway["gatewayInfo"]->gatewayId . '">Manage ' . $gateway["gatewayInfo"]->gatewayName . '</a></li>';
+ $navbar .= '<li><a href="' . URL::to('/') . '/admin/dashboard?gatewayId=' . $gateway["gatewayInfo"]->gatewayId . '">Manage ' . $gateway["gatewayInfo"]->gatewayName . '</a></li>';
}
}
}
- echo '<li><a href="' . URL::to('/') . '/logout"><span class="glyphicon glyphicon-log-out"></span> Log out</a></li>';
- echo '</ul></li></ul>';
+ $navbar .= '<li><a href="' . URL::to('/') . '/logout"><span class="glyphicon glyphicon-log-out"></span> Log out</a></li>';
+ $navbar .= '</ul></li>';
} else {
- echo '<li><a href="' . URL::to('/') . '/create"><span class="glyphicon glyphicon-user"></span> Create account</a></li>';
- echo '<li><a href="' . URL::to('/') . '/login"><span class="glyphicon glyphicon-log-in"></span> Log in</a></li>';
- echo '</ul>';
+ $navbar .= '<li><a href="' . URL::to('/') . '/create"><span class="glyphicon glyphicon-user"></span> Create account</a></li>';
+ $navbar .= '<li><a href="' . URL::to('/') . '/login"><span class="glyphicon glyphicon-log-in"></span> Log in</a></li>';
}
- echo '</div></div></nav>';
+ $navbar .= '</ul></div></div></nav>';
+
+ // Check if theme user has created links in their theme to the login and create account page.
+ if( !Session::has('loggedin') &&
+ isset( Config::get('pga_config.portal')['theme-based-login-links-configured']))
+ {
+ if( Config::get('pga_config.portal')['theme-based-login-links-configured'] ){
+ $navbar = "";
+ }
+ }
+
+ echo $navbar;
}
public static function get_notices_ui( $notices){
[2/2] airavata-php-gateway git commit: Merge branch 'develop' of
https://git-wip-us.apache.org/repos/asf/airavata-php-gateway into develop
Posted by nd...@apache.org.
Merge branch 'develop' of https://git-wip-us.apache.org/repos/asf/airavata-php-gateway into develop
# Conflicts:
# app/libraries/CommonUtilities.php
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/5c7e2647
Tree: http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/tree/5c7e2647
Diff: http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/diff/5c7e2647
Branch: refs/heads/develop
Commit: 5c7e26471eb918957cb712b4f3a746148e85cf05
Parents: 8d1bcdc 6d12123
Author: Nipurn Doshi <ni...@gmail.com>
Authored: Mon Oct 31 00:41:11 2016 -0700
Committer: Nipurn Doshi <ni...@gmail.com>
Committed: Mon Oct 31 00:41:11 2016 -0700
----------------------------------------------------------------------
app/controllers/AccountController.php | 182 +-
app/libraries/AdminUtilities.php | 23 +-
app/libraries/Airavata/API/Airavata.php | 19805 +++++++++++------
.../Model/AppCatalog/ComputeResource/Types.php | 2 +
.../Model/AppCatalog/CredetialSummary/Types.php | 210 +
.../AppCatalog/UserResourceProfile/Types.php | 788 +
.../Airavata/Model/Credential/Store/Types.php | 1029 +
app/libraries/AppUtilities.php | 17 +
app/libraries/CRUtilities.php | 8 +-
app/libraries/CommonUtilities.php | 30 +-
app/libraries/ExperimentUtilities.php | 30 +-
app/libraries/ProjectUtilities.php | 1 +
app/libraries/URPUtilities.php | 140 +
app/routes.php | 15 +
app/views/account/credential-store.blade.php | 160 +
app/views/account/dashboard.blade.php | 41 +
.../account/user-compute-resources.blade.php | 162 +
.../account/user-storage-resources.blade.php | 142 +
app/views/admin/manage-experiments.blade.php | 2 +-
app/views/admin/manage-gateway.blade.php | 2 +-
app/views/admin/manage-notices.blade.php | 2 +-
app/views/experiment/browse.blade.php | 2 +-
.../experiment/no-sharing-browse.blade.php | 2 +-
.../compute-resource-preferences.blade.php | 9 +-
app/views/partials/experiment-info.blade.php | 4 +-
.../user-compute-resource-preferences.blade.php | 142 +
.../user-storage-resource-preferences.blade.php | 61 +
public/js/clipboard.min.js | 7 +
public/js/datetimepicker-3.1.3.js | 1 +
public/js/datetimepicker.js | 1 -
30 files changed, 16644 insertions(+), 6376 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/blob/5c7e2647/app/libraries/CommonUtilities.php
----------------------------------------------------------------------
diff --cc app/libraries/CommonUtilities.php
index b7e434e,94e8626..1fef810
--- a/app/libraries/CommonUtilities.php
+++ b/app/libraries/CommonUtilities.php
@@@ -215,12 -216,16 +215,14 @@@ class CommonUtilitie
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>';
+ $navbar .= '<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>';
++ $navbar .= '<li class="' . $active . '"><a href="' . URL::to("/") . '/account/dashboard"><span class="glyphicon glyphicon-user"></span> Dashboard</a></li>';
- echo '<li class="dropdown">
+ $navbar .= '<li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown">' . Session::get("username") . ' <span class="caret"></span></a>';
- echo '<ul class="dropdown-menu" role="menu">';
+ $navbar .= '<ul class="dropdown-menu" role="menu">';
if ( Session::has("existing-gateway-provider")) {
$requestedGateways = Session::get("requestedGateways");