mirror of
https://github.com/sismics/docs.git
synced 2024-11-25 23:27:57 +01:00
#70: User profiles UI
This commit is contained in:
parent
6fbcd46a76
commit
adebb7ff6d
@ -3,5 +3,14 @@
|
||||
/**
|
||||
* User controller.
|
||||
*/
|
||||
angular.module('docs').controller('User', function() {
|
||||
angular.module('docs').controller('User', function(Restangular, $scope, $state) {
|
||||
// Load users
|
||||
Restangular.one('user/list').get({ limit: 100 }).then(function(data) {
|
||||
$scope.users = data.users;
|
||||
});
|
||||
|
||||
// Open a user
|
||||
$scope.openUser = function(user) {
|
||||
$state.go('user.profile', { username: user.username });
|
||||
};
|
||||
});
|
@ -17,10 +17,10 @@
|
||||
<input type="search" class="form-control" placeholder="Search" ng-model="search.name">
|
||||
</p>
|
||||
|
||||
<table class="row table table-striped table-hover table-tags">
|
||||
<table class="row table table-striped table-hover">
|
||||
<tbody>
|
||||
<tr ng-repeat="tag in tags | filter:search">
|
||||
<td><inline-edit value="tag.name" on-edit="updateTag(tag)" /></td>
|
||||
<td><inline-edit value="tag.name" on-edit="updateTag(tag)" ></inline-edit></td>
|
||||
<td class="col-xs-4">
|
||||
<select class="form-control" ng-model="tag.parent" ng-change="updateTag(tag)">
|
||||
<option value="" ng-selected="!tag.parent"></option>
|
||||
|
@ -1,3 +1,26 @@
|
||||
User
|
||||
<div class="row">
|
||||
<div class="col-md-4">
|
||||
<div class="well">
|
||||
<p class="input-group">
|
||||
<span class="input-group-addon"><span class="glyphicon glyphicon-search"></span></span>
|
||||
<input type="search" class="form-control" placeholder="Search" ng-model="search">
|
||||
</p>
|
||||
|
||||
<div ui-view="user"></div>
|
||||
<table class="row table table-striped table-hover">
|
||||
<tbody>
|
||||
<tr class="pointer" ng-repeat="user in users | filter: search"
|
||||
ng-click="openUser(user)" ng-class="{ active: $stateParams.username == user.username }">
|
||||
<td class="col-xs-4">
|
||||
<span class="glyphicon glyphicon-user"></span>
|
||||
{{ user.username }}
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-md-8">
|
||||
<div ui-view="user"></div>
|
||||
</div>
|
||||
</div>
|
@ -1 +1,6 @@
|
||||
{{ user }}
|
||||
<div class="page-header">
|
||||
<h1>{{ user.username }} <small>{{ user.email }}</small></h1>
|
||||
</div>
|
||||
|
||||
<h4>Documents created by {{ user.username }}</h4>
|
||||
TODO
|
Loading…
Reference in New Issue
Block a user