From f258856102530e15ddd12c46e969f55055d4ccfc Mon Sep 17 00:00:00 2001 From: Sagi Dayan Date: Wed, 17 Jun 2015 00:07:21 +0300 Subject: [PATCH] #43 - Settings Page: Some More UI Thinking About UI and Implementing it --- .../js/controllers/settingsController.js | 25 ++++++++++++++++ templates/views/settings.html | 30 +++++++++++++++++++ 2 files changed, 55 insertions(+) diff --git a/templates/js/controllers/settingsController.js b/templates/js/controllers/settingsController.js index 4968b42..1afbabc 100644 --- a/templates/js/controllers/settingsController.js +++ b/templates/js/controllers/settingsController.js @@ -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" + // } }]); \ No newline at end of file diff --git a/templates/views/settings.html b/templates/views/settings.html index 0c4b980..fd1cf52 100644 --- a/templates/views/settings.html +++ b/templates/views/settings.html @@ -5,6 +5,36 @@

{{title}}

+
+
+ +
+
+
+ +
+
+ + {{profileMode}} + +
+
+
+

{{user.name}}

+
+
+ Email: {{user.email}} +
+
+ I Am a: {{(user.isLecturer) ? "Lecturer" : "Student"}} +
+
+
+
+
+ + +
\ No newline at end of file