airavata-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From machris...@apache.org
Subject [03/12] airavata-php-gateway git commit: AIRAVATA-2316 Add user profile editor view
Date Sun, 11 Jun 2017 20:25:32 GMT
AIRAVATA-2316 Add user profile editor view


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/3bbfc4de
Tree: http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/tree/3bbfc4de
Diff: http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/diff/3bbfc4de

Branch: refs/heads/keycloak-integration
Commit: 3bbfc4dedf7b5ad6f03804b387536859bed7156a
Parents: 848d72d
Author: Marcus Christie <machrist@iu.edu>
Authored: Wed Feb 15 15:03:35 2017 -0500
Committer: Marcus Christie <machrist@iu.edu>
Committed: Wed Feb 15 15:05:16 2017 -0500

----------------------------------------------------------------------
 app/controllers/UserSettingsController.php |  8 +++
 app/libraries/UserProfileUtilities.php     | 15 ++++
 app/routes.php                             |  1 +
 app/views/account/settings.blade.php       | 16 +++++
 app/views/account/user-profile.blade.php   | 94 +++++++++++++++++++++++++
 public/css/bootstrap.min.css               |  2 +-
 6 files changed, 135 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/blob/3bbfc4de/app/controllers/UserSettingsController.php
----------------------------------------------------------------------
diff --git a/app/controllers/UserSettingsController.php b/app/controllers/UserSettingsController.php
index a3eba04..49c4257 100644
--- a/app/controllers/UserSettingsController.php
+++ b/app/controllers/UserSettingsController.php
@@ -186,4 +186,12 @@ class UserSettingsController extends BaseController
             return Redirect::to("account/user-storage-resources")->with("message","Storage
Resource Account Settings have been deleted.");
         }
     }
+
+    public function getUserProfile() {
+
+        $emailAddress = "foo@example.com";
+        return View::make("account/user-profile", array(
+            "emailAddress" => $emailAddress
+        ));
+    }
 }

http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/blob/3bbfc4de/app/libraries/UserProfileUtilities.php
----------------------------------------------------------------------
diff --git a/app/libraries/UserProfileUtilities.php b/app/libraries/UserProfileUtilities.php
new file mode 100644
index 0000000..929d5c0
--- /dev/null
+++ b/app/libraries/UserProfileUtilities.php
@@ -0,0 +1,15 @@
+<?php
+
+
+class UserProfileUtilities
+{
+
+    public static function does_user_profile_exist()
+    {
+        $userId = Session::get('username');
+        $gatewayId = Session::get('gateway_id');
+        return Airavata::doesUserProfileExist(Session::get('authz-token'), $userId, $gatewayId);
+    }
+}
+
+?>

http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/blob/3bbfc4de/app/routes.php
----------------------------------------------------------------------
diff --git a/app/routes.php b/app/routes.php
index b2e58cd..e750ef1 100755
--- a/app/routes.php
+++ b/app/routes.php
@@ -64,6 +64,7 @@ Route::post("account/add-user-srp", "UserSettingsController@addUserStorageResour
 Route::post("account/update-user-srp", "UserSettingsController@updateUserStorageResourcePreference");
 Route::post("account/delete-user-srp", "UserSettingsController@deleteUserStorageResourcePreference");
 
+Route::get("account/user-profile", "UserSettingsController@getUserProfile");
 /*
  * The following routes will not work without logging in.
  *

http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/blob/3bbfc4de/app/views/account/settings.blade.php
----------------------------------------------------------------------
diff --git a/app/views/account/settings.blade.php b/app/views/account/settings.blade.php
index 62f1177..35bb0ad 100644
--- a/app/views/account/settings.blade.php
+++ b/app/views/account/settings.blade.php
@@ -12,6 +12,22 @@
     </ol>
     <div class="row well user-settings">
 
+        <h3>Profile</h3>
+
+        <a href="{{URL::to('/')}}/account/user-profile">
+            <div class=" col-md-12 well">
+                <div class="col-md-12">
+                    <span class="glyphicon glyphicon-user user-setting-icon"></span>
+                </div>
+                <div class="col-md-12">
+                    <h4>Your Profile</h4>
+                </div>
+            </div>
+        </a>
+    </div>
+
+    <div class="row well user-settings">
+
         <h3>Manage Personal Computing and Storage Resources</h3>
         <p>Use these settings if you have your own compute and/or
         storage resource accounts that you would like to use.</p>

http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/blob/3bbfc4de/app/views/account/user-profile.blade.php
----------------------------------------------------------------------
diff --git a/app/views/account/user-profile.blade.php b/app/views/account/user-profile.blade.php
new file mode 100644
index 0000000..53dbef2
--- /dev/null
+++ b/app/views/account/user-profile.blade.php
@@ -0,0 +1,94 @@
+
+@extends('layout.basic')
+
+@section('page-header')
+@parent
+{{ HTML::style('css/user-settings.css')}}
+@stop
+
+@section('content')
+<div class="container">
+    <ol class="breadcrumb">
+        <li><a href="{{ URL::to('/') }}/account/settings">User Settings</a></li>
+        <li class="active">Your Profile</li>
+    </ol>
+    
+    <div class="row">
+        <div class="col-md-6 col-md-offset-3">
+            <h1>Profile for {{ Session::get("username") }}</h1>
+        </div>
+    </div>
+    
+    <div class="row">
+        <div class="col-md-6 col-md-offset-3">
+    <form action="{{ URL::to("account/user-profile") }}" method="post" role="form">
+
+        <div class="form-group">
+            <label class="control-label">E-mail</label>
+            <p class="form-control-static">{{{ $emailAddress }}}</p>
+        </div>
+        <div class="form-group required">
+            <label class="control-label">First Name</label>
+            <div><input class="form-control" id="first_name" maxlength="30" name="first_name"
+                        placeholder="First Name" required="required" title="" type="text"
+                        value="{{Input::old('first_name') }}"/></div>
+        </div>
+        <div class="form-group required">
+            <label class="control-label">Last Name</label>
+            <div><input class="form-control" id="last_name" maxlength="30" name="last_name"
+                        placeholder="Last Name" required="required" title="" type="text"
+                        value="{{Input::old('last_name') }}"/></div>
+        </div>
+        <div class="form-group">
+            <label class="control-label">Organization</label>
+            <div><input class="form-control" id="organization" name="organization"
+                        placeholder="Organization" title="" type="text" value="{{Input::old('organization')
}}"/>
+            </div>
+        </div>
+        <div class="form-group">
+            <label class="control-label">Address</label>
+            <div><input class="form-control" id="address" name="address"
+                        placeholder="Address" title="" type="text" value="{{Input::old('address')
}}"/>
+            </div>
+        </div>
+        <div class="form-group">
+            <label class="control-label">Country</label>
+            <div><input class="form-control" id="country" name="country"
+                        placeholder="Country" title="" type="text" value="{{Input::old('country')
}}"/>
+            </div>
+        </div>
+        <div class="form-group">
+            <label class="control-label">Telephone</label>
+            <div><input class="form-control" id="telephone" name="telephone"
+                        placeholder="Telephone" title="" type="tel" value="{{Input::old('telephone')
}}"/>
+            </div>
+        </div>
+        <div class="form-group">
+            <label class="control-label">Mobile</label>
+            <div><input class="form-control" id="mobile" name="mobile"
+                        placeholder="Mobile" title="" type="tel" value="{{Input::old('mobile')
}}"/>
+            </div>
+        </div>
+        <div class="form-group">
+            <label class="control-label">IM</label>
+            <div><input class="form-control" id="im" name="im"
+                        placeholder="IM" title="" type="text" value="{{Input::old('im') }}"/>
+            </div>
+        </div>
+        <div class="form-group">
+            <label class="control-label">URL</label>
+            <div><input class="form-control" id="url" name="url"
+                        placeholder="URL" title="" type="text" value="{{Input::old('url')
}}"/>
+            </div>
+        </div>
+        <br/>
+        <input name="update" type="submit" class="btn btn-primary btn-block" value="Update">
+    </form>
+    
+</div>
+
+@stop
+
+@section('scripts')
+@parent
+@stop

http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/blob/3bbfc4de/public/css/bootstrap.min.css
----------------------------------------------------------------------
diff --git a/public/css/bootstrap.min.css b/public/css/bootstrap.min.css
index 0f7ca0c..5ee9a45 100644
--- a/public/css/bootstrap.min.css
+++ b/public/css/bootstrap.min.css
@@ -11,7 +11,7 @@ body{
 	background: #ecf0f1;
 }
 .form-group.required .control-label:after { 
-   content:"*";
+   content:" *";
    color:red;
 }
 


Mime
View raw message