#43 - Settings Page: Some More UI

Thinking About UI and Implementing it
This commit is contained in:
Sagi Dayan 2015-06-17 00:07:21 +03:00
parent f5be224cb2
commit f258856102
2 changed files with 55 additions and 0 deletions

View file

@ -24,7 +24,32 @@ angular.module('SeHub')
});
$scope.isEditMode = false;
$scope.profileMode = "Edit Profile";
$scope.profileModeIcon = "fa fa-pencil";
$scope.changeProfileMode = function() {
$scope.isEditMode = !$scope.isEditMode;
if ($scope.isEditMode) {
$scope.profileMode = "Save Profile";
$scope.profileModeIcon = "fa fa-floppy-o";
} else {
$scope.profileMode = "Edit Profile";
$scope.profileModeIcon = "fa fa-pencil";
}
}
// {
// name: ";"
// isLecturer: false
// email: "sagidayan@gmail.com"
// username: "sagidayan"
// seToken: "76cd4178-94dd-4cb4-b464-111d2239e567"
// isFirstLogin: true
// campuses_id_list: [0]
// classes_id_list: [0]
// avatar_url: "https://avatars.githubusercontent.com/u/2984053?v=3"
// }
}]);

View file

@ -5,6 +5,36 @@
<md-content layout-padding>
<md-card layout-padding>
<h1><i class="fa fa-cogs"></i> {{title}}</h1>
<div layout="row">
<div>
<md-card layout-padding>
<div id="profile" layout="column">
<div class="user-box" layout="row">
<div>
<img ng-src="{{user.avatar_url}}" alt="" style="width:20%">
</div>
<div flex="70%">
<md-button class="md-raised" ng-click="changeProfileMode()">
<i ng-class="[profileModeIcon]"></i> {{profileMode}}
</md-button>
</div>
</div>
<div>
<h2>{{user.name}}</h2>
</div>
<div>
Email: {{user.email}}
</div>
<div>
I Am a: {{(user.isLecturer) ? "Lecturer" : "Student"}}
</div>
</div>
</md-card>
</div>
</div>
</md-card>
</md-content>
</div>