mirror of
https://github.com/sismics/docs.git
synced 2024-11-22 14:07:55 +01:00
Migration of /tags and /settings views
This commit is contained in:
parent
6963fd9770
commit
9802beaf7b
@ -5,7 +5,5 @@
|
|||||||
*/
|
*/
|
||||||
App.controller('Settings', function($scope, Restangular) {
|
App.controller('Settings', function($scope, Restangular) {
|
||||||
// Flag if the user is admin
|
// Flag if the user is admin
|
||||||
$scope.userInfo.then(function (data) {
|
$scope.isAdmin = $scope.userInfo.base_functions.indexOf('ADMIN') != -1;
|
||||||
$scope.isAdmin = data.base_functions.indexOf('ADMIN') != -1;
|
|
||||||
});
|
|
||||||
});
|
});
|
@ -11,7 +11,7 @@ App.directive('inlineEdit', function() {
|
|||||||
value: '=',
|
value: '=',
|
||||||
editCallback: '&onEdit'
|
editCallback: '&onEdit'
|
||||||
},
|
},
|
||||||
template: '<span ng-click="edit()" ng-bind="value"></span><input type="text" ng-model="value" />',
|
template: '<span ng-click="edit()" ng-bind="value"></span><input type="text" class="form-control" ng-model="value" />',
|
||||||
link: function (scope, element, attrs) {
|
link: function (scope, element, attrs) {
|
||||||
// Let's get a reference to the input element, as we'll want to reference it.
|
// Let's get a reference to the input element, as we'll want to reference it.
|
||||||
var inputElement = angular.element(element.children()[1]);
|
var inputElement = angular.element(element.children()[1]);
|
||||||
|
@ -59,38 +59,49 @@
|
|||||||
<body>
|
<body>
|
||||||
<nav class="navbar navbar-default" role="navigation" ng-controller="Navigation">
|
<nav class="navbar navbar-default" role="navigation" ng-controller="Navigation">
|
||||||
<div class="navbar-header">
|
<div class="navbar-header">
|
||||||
|
<button type="button" class="navbar-toggle"
|
||||||
|
ng-init="isCollapsed = true"
|
||||||
|
ng-click="isCollapsed = !isCollapsed">
|
||||||
|
<span class="sr-only">Toggle navigation</span>
|
||||||
|
<span class="icon-bar"></span>
|
||||||
|
<span class="icon-bar"></span>
|
||||||
|
<span class="icon-bar"></span>
|
||||||
|
</button>
|
||||||
|
|
||||||
<div class="navbar-brand loader" ng-class="{'loader-hide': !isLoading() }">
|
<div class="navbar-brand loader" ng-class="{'loader-hide': !isLoading() }">
|
||||||
<img src="img/loader.gif" />
|
<img src="img/loader.gif" />
|
||||||
</div>
|
</div>
|
||||||
<a class="navbar-brand" href="#">Sismics Docs</a>
|
<a class="navbar-brand" href="#">Sismics Docs</a>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<ul class="nav navbar-nav" ng-show="!userInfo.anonymous">
|
<div class="collapse navbar-collapse" collapse="isCollapsed">
|
||||||
<li ng-class="{active: $uiRoute}" ui-route="/document.*">
|
<ul class="nav navbar-nav" ng-show="!userInfo.anonymous">
|
||||||
<a href="#/document"><span class="glyphicon glyphicon-book"></span> Documents</a>
|
<li ng-class="{active: $uiRoute}" ui-route="/document.*">
|
||||||
</li>
|
<a href="#/document"><span class="glyphicon glyphicon-book"></span> Documents</a>
|
||||||
<li ng-class="{active: $uiRoute}" ui-route="/tag.*">
|
</li>
|
||||||
<a href="#/tag"><span class="glyphicon glyphicon-tags"></span> Tags</a>
|
<li ng-class="{active: $uiRoute}" ui-route="/tag.*">
|
||||||
</li>
|
<a href="#/tag"><span class="glyphicon glyphicon-tags"></span> Tags</a>
|
||||||
</ul>
|
</li>
|
||||||
|
</ul>
|
||||||
|
|
||||||
<ul class="nav navbar-nav navbar-right" ng-show="!userInfo.anonymous">
|
<ul class="nav navbar-nav navbar-right" ng-show="!userInfo.anonymous">
|
||||||
<li ng-show="errorNumber > 0">
|
<li ng-show="errorNumber > 0">
|
||||||
<a href="#/settings/log" ng-click="openLogs()" class="nav-text-error">
|
<a href="#/settings/log" ng-click="openLogs()" class="nav-text-error">
|
||||||
<span class="glyphicon glyphicon-warning-sign"></span> {{ errorNumber }} new error{{ errorNumber > 1 ? 's' : '' }}
|
<span class="glyphicon glyphicon-warning-sign"></span> {{ errorNumber }} new error{{ errorNumber > 1 ? 's' : '' }}
|
||||||
|
</a>
|
||||||
|
</li>
|
||||||
|
<li ng-class="{active: $uiRoute}" ui-route="/settings.*">
|
||||||
|
<a href="#/settings/account">
|
||||||
|
<span class="glyphicon glyphicon-cog"></span> Settings
|
||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
<li ng-class="{active: $uiRoute}" ui-route="/settings.*">
|
<li>
|
||||||
<a href="#/settings/account">
|
<a href="#" ng-click="logout($event)">
|
||||||
<span class="glyphicon glyphicon-cog"></span> Settings
|
<span class="glyphicon glyphicon-off"></span> Logout
|
||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
<li>
|
</ul>
|
||||||
<a href="#" ng-click="logout($event)">
|
</div>
|
||||||
<span class="glyphicon glyphicon-off"></span> Logout
|
|
||||||
</a>
|
|
||||||
</li>
|
|
||||||
</ul>
|
|
||||||
</nav>
|
</nav>
|
||||||
|
|
||||||
<div ui-view="page">
|
<div ui-view="page">
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
<div ng-show="document || !isEdit()">
|
<div ng-show="document || !isEdit()">
|
||||||
<form name="documentForm" class="form-horizontal">
|
<form name="documentForm" class="form-horizontal">
|
||||||
<div class="form-group" ng-class="{ error: !documentForm.title.$valid }">
|
<div class="form-group" ng-class="{ 'has-error': !documentForm.title.$valid }">
|
||||||
<label class="col-sm-2 control-label" for="inputTitle">Title</label>
|
<label class="col-sm-2 control-label" for="inputTitle">Title</label>
|
||||||
<div class="col-sm-10">
|
<div class="col-sm-10">
|
||||||
<input required ng-maxlength="100" class="form-control" type="text" id="inputTitle"
|
<input required ng-maxlength="100" class="form-control" type="text" id="inputTitle"
|
||||||
@ -11,7 +11,7 @@
|
|||||||
typeahead-wait-ms="200" ng-disabled="fileIsUploading" />
|
typeahead-wait-ms="200" ng-disabled="fileIsUploading" />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group" ng-class="{ error: !documentForm.description.$valid }">
|
<div class="form-group" ng-class="{ 'has-error': !documentForm.description.$valid }">
|
||||||
<label class="col-sm-2 control-label" for="inputDescription">Description</label>
|
<label class="col-sm-2 control-label" for="inputDescription">Description</label>
|
||||||
<div class="col-sm-10">
|
<div class="col-sm-10">
|
||||||
<textarea ng-maxlength="4000" class="form-control" rows="5" id="inputDescription"
|
<textarea ng-maxlength="4000" class="form-control" rows="5" id="inputDescription"
|
||||||
|
@ -28,7 +28,7 @@
|
|||||||
<p ng-bind-html="document.description | newline"></p>
|
<p ng-bind-html="document.description | newline"></p>
|
||||||
|
|
||||||
<div class="row" ui-sortable="fileSortableOptions" ng-model="files" ng-show="files.length > 0">
|
<div class="row" ui-sortable="fileSortableOptions" ng-model="files" ng-show="files.length > 0">
|
||||||
<div class="col-md-2 text-center" ng-repeat="file in files">
|
<div class="col-xs-6 col-sm-4 col-md-3 col-lg-2 text-center" ng-repeat="file in files">
|
||||||
<div class="thumbnail">
|
<div class="thumbnail">
|
||||||
<a ng-click="openFile(file)">
|
<a ng-click="openFile(file)">
|
||||||
<img class="thumbnail-file" ng-src="api/file/{{ file.id }}/data?size=thumb" tooltip="{{ file.mimetype }}" tooltip-placement="top" />
|
<img class="thumbnail-file" ng-src="api/file/{{ file.id }}/data?size=thumb" tooltip="{{ file.mimetype }}" tooltip-placement="top" />
|
||||||
|
@ -1,28 +1,36 @@
|
|||||||
<h1>User <small>account</small></h1>
|
<h1>User <small>account</small></h1>
|
||||||
<form class="form-horizontal" name="editUserForm" novalidate>
|
<form class="form-horizontal" name="editUserForm" novalidate>
|
||||||
<div class="control-group" ng-class="{ error: !editUserForm.password.$valid, success: editUserForm.password.$valid }">
|
<div class="form-group" ng-class="{ 'has-error': !editUserForm.password.$valid, success: editUserForm.password.$valid }">
|
||||||
<label class="control-label" for="inputPassword">Password</label>
|
<label class="col-sm-2 control-label" for="inputPassword">Password</label>
|
||||||
<div class="controls">
|
<div class="col-sm-7">
|
||||||
<input name="password" type="password" id="inputPassword" required
|
<input name="password" type="password" id="inputPassword" required class="form-control"
|
||||||
ng-minlength="8" ng-maxlength="50" placeholder="Password" ng-model="user.password" />
|
ng-minlength="8" ng-maxlength="50" placeholder="Password" ng-model="user.password" />
|
||||||
<span class="help-inline" ng-show="editUserForm.password.$error.required">Required</span>
|
</div>
|
||||||
<span class="help-inline" ng-show="editUserForm.password.$error.minlength">Too short</span>
|
<div class="col-sm-3">
|
||||||
<span class="help-inline" ng-show="editUserForm.password.$error.maxlength">Too long</span>
|
<span class="help-block" ng-show="editUserForm.password.$error.required">Required</span>
|
||||||
|
<span class="help-block" ng-show="editUserForm.password.$error.minlength">Too short</span>
|
||||||
|
<span class="help-block" ng-show="editUserForm.password.$error.maxlength">Too long</span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="control-group" ng-class="{ error: !editUserForm.passwordconfirm.$valid, success: editUserForm.passwordconfirm.$valid }">
|
|
||||||
<label class="control-label" for="inputPasswordConfirm">Password (confirm)</label>
|
<div class="form-group" ng-class="{ 'has-error': !editUserForm.passwordconfirm.$valid, success: editUserForm.passwordconfirm.$valid }">
|
||||||
<div class="controls">
|
<label class="col-sm-2 control-label" for="inputPasswordConfirm">Password (confirm)</label>
|
||||||
<input name="passwordconfirm" type="password" id="inputPasswordConfirm" required
|
<div class="col-sm-7">
|
||||||
|
<input name="passwordconfirm" type="password" id="inputPasswordConfirm" required class="form-control"
|
||||||
ui-validate="'$value == user.password'" ui-validate-watch="'user.password'"
|
ui-validate="'$value == user.password'" ui-validate-watch="'user.password'"
|
||||||
placeholder="Password (confirm)" ng-model="user.passwordconfirm" />
|
placeholder="Password (confirm)" ng-model="user.passwordconfirm" />
|
||||||
<span class="help-inline" ng-show="editUserForm.passwordconfirm.$error.validator">Password and password confirmation must match</span>
|
</div>
|
||||||
|
<div class="col-sm-3">
|
||||||
|
<span class="help-block" ng-show="editUserForm.passwordconfirm.$error.validator">Password and password confirmation must match</span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-actions">
|
|
||||||
<button type="submit" class="btn btn-primary" ng-click="editUser()" ng-disabled="!editUserForm.$valid">
|
<div class="form-group">
|
||||||
<span class="icon-pencil icon-white"></span> Edit
|
<div class="col-sm-offset-2 col-sm-10">
|
||||||
</button>
|
<button type="submit" class="btn btn-primary" ng-click="editUser()" ng-disabled="!editUserForm.$valid">
|
||||||
|
<span class="glyphicon glyphicon-pencil"></span> Edit
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
<alert ng-repeat="alert in alerts" type="alert.type" close="closeAlert($index)">{{ alert.msg }}</alert>
|
<alert ng-repeat="alert in alerts" type="alert.type" close="closeAlert($index)">{{ alert.msg }}</alert>
|
@ -1,19 +1,23 @@
|
|||||||
<div class="container-fluid">
|
<div class="row">
|
||||||
<div class="row-fluid">
|
<div class="col-md-4">
|
||||||
<div class="span4 well">
|
<div class="panel panel-default">
|
||||||
<ul class="nav nav-list">
|
<div class="panel-heading"><strong>Personal settings</strong></div>
|
||||||
<li class="nav-header">Personal settings</li>
|
<ul class="list-group">
|
||||||
<li ng-class="{active: $uiRoute}" ui-route="/settings/account"><a href="#/settings/account">User account</a></li>
|
<a class="list-group-item" ng-class="{active: $uiRoute}" ui-route="/settings/account" href="#/settings/account">User account</a>
|
||||||
<li ng-class="{active: $uiRoute}" ui-route="/settings/session"><a href="#/settings/session">Opened sessions</a></li>
|
<a class="list-group-item" ng-class="{active: $uiRoute}" ui-route="/settings/session" href="#/settings/session">Opened sessions</a>
|
||||||
|
|
||||||
<li class="nav-header" ng-show="isAdmin">General settings</li>
|
|
||||||
<li ng-show="isAdmin" ng-class="{active: $uiRoute}" ui-route="/settings/user.*"><a href="#/settings/user">Users</a></li>
|
|
||||||
<li ng-show="isAdmin" ng-class="{active: $uiRoute}" ui-route="/settings/log"><a href="#/settings/log">Server logs</a></li>
|
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="span8 well">
|
<div class="panel panel-default">
|
||||||
<div ui-view="settings"></div>
|
<div class="panel-heading" ng-show="isAdmin"><strong>General settings</strong></div>
|
||||||
|
<ul class="list-group">
|
||||||
|
<a class="list-group-item" ng-show="isAdmin" ng-class="{active: $uiRoute}" ui-route="/settings/user.*" href="#/settings/user">Users</a>
|
||||||
|
<a class="list-group-item" ng-show="isAdmin" ng-class="{active: $uiRoute}" ui-route="/settings/log" href="#/settings/log">Server logs</a>
|
||||||
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<div class="col-md-8">
|
||||||
|
<div class="well" ui-view="settings"></div>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
@ -11,7 +11,7 @@
|
|||||||
<tr ng-repeat="session in sessions | orderBy: '-current'" ng-class="{ 'info': session.current, 'warning': !session.current }">
|
<tr ng-repeat="session in sessions | orderBy: '-current'" ng-class="{ 'info': session.current, 'warning': !session.current }">
|
||||||
<td>{{ session.create_date | date: 'yyyy-MM-dd HH:mm' }}</td>
|
<td>{{ session.create_date | date: 'yyyy-MM-dd HH:mm' }}</td>
|
||||||
<td>{{ session.last_connection_date | date: 'yyyy-MM-dd HH:mm' }}</td>
|
<td>{{ session.last_connection_date | date: 'yyyy-MM-dd HH:mm' }}</td>
|
||||||
<td><span ng-show="session.current" class="icon-ok"></span></td>
|
<td><span ng-show="session.current" class="glyphicon glyphicon-ok"></span></td>
|
||||||
</tr>
|
</tr>
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
|
@ -8,58 +8,71 @@
|
|||||||
<small>user</small>
|
<small>user</small>
|
||||||
</h2>
|
</h2>
|
||||||
<form class="form-horizontal" name="editUserForm" novalidate>
|
<form class="form-horizontal" name="editUserForm" novalidate>
|
||||||
<div class="control-group" ng-class="{ error: !editUserForm.username.$valid, success: editUserForm.username.$valid }">
|
<div class="form-group" ng-class="{ 'has-error': !editUserForm.username.$valid, success: editUserForm.username.$valid }">
|
||||||
<label class="control-label" for="inputUsername">Username</label>
|
<label class="col-sm-2 control-label" for="inputUsername">Username</label>
|
||||||
|
|
||||||
<div class="controls">
|
<div class="col-sm-7">
|
||||||
<input name="username" type="text" id="inputUsername" required ng-disabled="isEdit()"
|
<input name="username" type="text" id="inputUsername" required ng-disabled="isEdit()" class="form-control"
|
||||||
ng-minlength="3" ng-maxlength="50" placeholder="Username" ng-model="user.username"/>
|
ng-minlength="3" ng-maxlength="50" placeholder="Username" ng-model="user.username"/>
|
||||||
<span class="help-inline" ng-show="editUserForm.username.$error.required">Required</span>
|
</div>
|
||||||
<span class="help-inline" ng-show="editUserForm.username.$error.minlength">Too short</span>
|
|
||||||
<span class="help-inline" ng-show="editUserForm.username.$error.maxlength">Too long</span>
|
<div class="col-sm-3">
|
||||||
|
<span class="help-block" ng-show="editUserForm.username.$error.required">Required</span>
|
||||||
|
<span class="help-block" ng-show="editUserForm.username.$error.minlength">Too short</span>
|
||||||
|
<span class="help-block" ng-show="editUserForm.username.$error.maxlength">Too long</span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="control-group" ng-class="{ error: !editUserForm.email.$valid, success: editUserForm.email.$valid }">
|
<div class="form-group" ng-class="{ 'has-error': !editUserForm.email.$valid, success: editUserForm.email.$valid }">
|
||||||
<label class="control-label" for="inputEmail">E-mail</label>
|
<label class="col-sm-2 control-label" for="inputEmail">E-mail</label>
|
||||||
|
|
||||||
<div class="controls">
|
<div class="col-sm-7">
|
||||||
<input name="email" type="email" id="inputEmail" required
|
<input name="email" type="email" id="inputEmail" required class="form-control"
|
||||||
ng-minlength="3" ng-maxlength="50" placeholder="E-mail" ng-model="user.email"/>
|
ng-minlength="3" ng-maxlength="50" placeholder="E-mail" ng-model="user.email"/>
|
||||||
<span class="help-inline" ng-show="editUserForm.email.$error.required">Required</span>
|
</div>
|
||||||
<span class="help-inline" ng-show="editUserForm.email.$error.email">Must be a valid e-mail</span>
|
|
||||||
<span class="help-inline" ng-show="editUserForm.email.$error.minlength">Too short</span>
|
<div class="col-sm-3">
|
||||||
<span class="help-inline" ng-show="editUserForm.email.$error.maxlength">Too long</span>
|
<span class="help-block" ng-show="editUserForm.email.$error.required">Required</span>
|
||||||
|
<span class="help-block" ng-show="editUserForm.email.$error.email">Must be a valid e-mail</span>
|
||||||
|
<span class="help-block" ng-show="editUserForm.email.$error.minlength">Too short</span>
|
||||||
|
<span class="help-block" ng-show="editUserForm.email.$error.maxlength">Too long</span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="control-group" ng-class="{ error: !editUserForm.password.$valid, success: editUserForm.password.$valid }">
|
<div class="form-group" ng-class="{ 'has-error': !editUserForm.password.$valid, success: editUserForm.password.$valid }">
|
||||||
<label class="control-label" for="inputPassword">Password</label>
|
<label class="col-sm-2 control-label" for="inputPassword">Password</label>
|
||||||
|
|
||||||
<div class="controls">
|
<div class="col-sm-7">
|
||||||
<input name="password" type="password" id="inputPassword" ng-required="!isEdit()"
|
<input name="password" type="password" id="inputPassword" ng-required="!isEdit()" class="form-control"
|
||||||
ng-minlength="8" ng-maxlength="50" placeholder="Password" ng-model="user.password"/>
|
ng-minlength="8" ng-maxlength="50" placeholder="Password" ng-model="user.password"/>
|
||||||
<span class="help-inline" ng-show="editUserForm.password.$error.required">Required</span>
|
</div>
|
||||||
<span class="help-inline" ng-show="editUserForm.password.$error.minlength">Too short</span>
|
|
||||||
<span class="help-inline" ng-show="editUserForm.password.$error.maxlength">Too long</span>
|
<div class="col-sm-3">
|
||||||
|
<span class="help-block" ng-show="editUserForm.password.$error.required">Required</span>
|
||||||
|
<span class="help-block" ng-show="editUserForm.password.$error.minlength">Too short</span>
|
||||||
|
<span class="help-block" ng-show="editUserForm.password.$error.maxlength">Too long</span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="control-group"
|
<div class="form-group" ng-class="{ 'has-error': !editUserForm.passwordconfirm.$valid, success: editUserForm.passwordconfirm.$valid }">
|
||||||
ng-class="{ error: !editUserForm.passwordconfirm.$valid, success: editUserForm.passwordconfirm.$valid }">
|
<label class="col-sm-2 -label" for="inputPasswordConfirm">Password (confirm)</label>
|
||||||
<label class="control-label" for="inputPasswordConfirm">Password (confirm)</label>
|
|
||||||
|
|
||||||
<div class="controls">
|
<div class="col-sm-7">
|
||||||
<input name="passwordconfirm" type="password" id="inputPasswordConfirm" ng-required="!isEdit()"
|
<input name="passwordconfirm" type="password" id="inputPasswordConfirm" ng-required="!isEdit()" class="form-control"
|
||||||
ui-validate="'$value == user.password'" ui-validate-watch="'user.password'"
|
ui-validate="'$value == user.password'" ui-validate-watch="'user.password'"
|
||||||
placeholder="Password (confirm)" ng-model="user.passwordconfirm"/>
|
placeholder="Password (confirm)" ng-model="user.passwordconfirm"/>
|
||||||
<span class="help-inline" ng-show="editUserForm.passwordconfirm.$error.validator">Password and password confirmation must match</span>
|
</div>
|
||||||
|
|
||||||
|
<div class="col-sm-3">
|
||||||
|
<span class="help-block" ng-show="editUserForm.passwordconfirm.$error.validator">Password and password confirmation must match</span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-actions">
|
<div class="form-group">
|
||||||
<button type="submit" class="btn btn-primary" ng-click="edit()" ng-disabled="!editUserForm.$valid">
|
<div class="col-sm-offset-2 col-sm-10">
|
||||||
<span class="icon-pencil icon-white"></span> {{ isEdit() ? 'Edit' : 'Add' }}
|
<button type="submit" class="btn btn-primary" ng-click="edit()" ng-disabled="!editUserForm.$valid">
|
||||||
</button>
|
<span class="glyphicon glyphicon-pencil"></span> {{ isEdit() ? 'Edit' : 'Add' }}
|
||||||
<button type="button" class="btn btn-danger" ng-click="remove()" ng-show="isEdit()">
|
</button>
|
||||||
<span class="icon-trash icon-white"></span> Delete
|
<button type="button" class="btn btn-danger" ng-click="remove()" ng-show="isEdit()">
|
||||||
</button>
|
<span class="glyphicon glyphicon-trash"></span> Delete
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
<alert ng-repeat="alert in alerts" type="alert.type" close="closeAlert($index)">{{ alert.msg }}</alert>
|
<alert ng-repeat="alert in alerts" type="alert.type" close="closeAlert($index)">{{ alert.msg }}</alert>
|
||||||
|
@ -1,26 +1,24 @@
|
|||||||
<h1>Users <small>management</small> <a class="btn btn-primary" href="#/settings/user/add">Add</a></h1>
|
<h1>Users <small>management</small> <a class="btn btn-primary" href="#/settings/user/add">Add</a></h1>
|
||||||
|
|
||||||
<div class="container-fluid">
|
<div class="row">
|
||||||
<div class="row-fluid">
|
<div class="col-md-4 well">
|
||||||
<div class="span4 well">
|
<table class="table table-striped table-hover table-users">
|
||||||
<table class="table table-striped table-hover table-users">
|
<thead>
|
||||||
<thead>
|
<tr>
|
||||||
<tr>
|
<th>Username</th>
|
||||||
<th>Username</th>
|
<th>Create date</th>
|
||||||
<th>Create date</th>
|
</tr>
|
||||||
</tr>
|
</thead>
|
||||||
</thead>
|
<tbody>
|
||||||
<tbody>
|
<tr ng-repeat="user in users | orderBy: 'username'" ng-click="editUser(user)">
|
||||||
<tr ng-repeat="user in users | orderBy: 'username'" ng-click="editUser(user)">
|
<td>{{ user.username }}</td>
|
||||||
<td>{{ user.username }}</td>
|
<td>{{ user.create_date | date: 'yyyy-MM-dd' }}</td>
|
||||||
<td>{{ user.create_date | date: 'yyyy-MM-dd' }}</td>
|
</tr>
|
||||||
</tr>
|
</tbody>
|
||||||
</tbody>
|
</table>
|
||||||
</table>
|
</div>
|
||||||
</div>
|
|
||||||
|
<div class="col-md-8">
|
||||||
<div class="span8">
|
<div ui-view="user"></div>
|
||||||
<div ui-view="user"></div>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
@ -1,45 +1,46 @@
|
|||||||
<div class="container-fluid">
|
<div class="row">
|
||||||
<div class="row-fluid">
|
<div class="col-md-4">
|
||||||
<div class="span4 well text-center">
|
<div class="well">
|
||||||
<form name="tagForm" novalidate>
|
<form name="tagForm" novalidate>
|
||||||
<div class="control-group" ng-class="{ error: !tagForm.name.$valid }">
|
<p class="input-group" ng-class="{ 'has-error': !tagForm.name.$valid }">
|
||||||
<div class="input-prepend input-append input-block-level">
|
<span colorpicker class="input-group-addon btn btn-default" data-color="#3a87ad" ng-model="tag.color" ng-style="{ 'background': tag.color }"> </span>
|
||||||
<span colorpicker class="btn" data-color="#3a87ad" ng-model="tag.color" ng-style="{ 'background': tag.color }"> </span>
|
<input type="text" name="name" placeholder="New tag" class="form-control"
|
||||||
<input type="text" name="name" placeholder="New tag"
|
ng-maxlength="36" required ng-model="tag.name" ui-validate="{duplicate: 'validateDuplicate($value)', space: '!$value || $value.indexOf(\' \') == -1' }">
|
||||||
ng-maxlength="36" required ng-model="tag.name" ui-validate="{duplicate: 'validateDuplicate($value)', space: '!$value || $value.indexOf(\' \') == -1' }">
|
<span class="input-group-addon btn btn-primary" ng-disabled="!tagForm.$valid" ng-click="addTag()">Add</span>
|
||||||
<button type="submit" class="btn btn-primary" ng-disabled="!tagForm.$valid" ng-click="addTag()">Add</button>
|
</p>
|
||||||
</div>
|
<span class="help-block" ng-show="tagForm.name.$error.duplicate">This tag already exists</span>
|
||||||
<span class="help-inline" ng-show="tagForm.name.$error.duplicate">This tag already exists</span>
|
<span class="help-block" ng-show="tagForm.name.$error.space">Space are not allowed</span>
|
||||||
<span class="help-inline" ng-show="tagForm.name.$error.space">Space are not allowed</span>
|
|
||||||
</div>
|
|
||||||
</form>
|
</form>
|
||||||
|
|
||||||
<div class="input-prepend input-block-level">
|
<p class="input-group">
|
||||||
<span class="add-on"><span class="icon-search"></span></span>
|
<span class="input-group-addon"><span class="glyphicon glyphicon-search"></span></span>
|
||||||
<input type="text" placeholder="Search" ng-model="search.name">
|
<input type="search" class="form-control" placeholder="Search" ng-model="search.name">
|
||||||
</div>
|
</p>
|
||||||
|
|
||||||
<table class="table table-striped table-hover table-tags">
|
<table class="row table table-striped table-hover table-tags">
|
||||||
<tbody>
|
<tbody>
|
||||||
<tr ng-repeat="tag in tags | filter:search">
|
<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)" /></td>
|
||||||
<td class="span1"><span colorpicker class="btn" on-hide="updateTag(tag)" data-color="" ng-model="tag.color" ng-style="{ 'background': tag.color }"> </span></td>
|
<td class="col-xs-1"><span colorpicker class="btn" on-hide="updateTag(tag)" data-color="" ng-model="tag.color" ng-style="{ 'background': tag.color }"> </span></td>
|
||||||
<td class="span1"><button class="btn btn-danger pull-right" ng-click="deleteTag(tag)"><span class="icon-trash icon-white"></span></button></td>
|
<td class="col-xs-1"><button class="btn btn-danger pull-right" ng-click="deleteTag(tag)"><span class="glyphicon glyphicon-trash"></span></button></td>
|
||||||
</tr>
|
</tr>
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
<div class="span8 well" ng-if="stats.length >= 0">
|
|
||||||
|
<div class="col-md-8" ng-if="stats.length >= 0">
|
||||||
|
<div class="well">
|
||||||
<h1>{{ tags.length }} <small>tag{{ tags.length > 1 ? 's' : '' }}</small></h1>
|
<h1>{{ tags.length }} <small>tag{{ tags.length > 1 ? 's' : '' }}</small></h1>
|
||||||
<dl class="dl-horizontal" ng-repeat="stat in stats | orderBy: '-count'">
|
<dl class="dl-horizontal" ng-repeat="stat in stats | orderBy: '-count'">
|
||||||
<dt>{{ stat.name }} <span class="badge badge-info" ng-style="{ 'background': stat.color }">{{ stat.count }}</span></dt>
|
<dt>{{ stat.name }} <span class="badge badge-info" ng-style="{ 'background': stat.color }">{{ stat.count }}</span></dt>
|
||||||
<dd><progress percent="stat.count / getStatCount() * 100" class="progress-info"></progress></dd>
|
<dd><progressbar value="stat.count / getStatCount() * 100" class="progress-info"></progressbar></dd>
|
||||||
</dl>
|
</dl>
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
<div class="span8 well" ng-if="!stats">
|
|
||||||
|
<div class="col-md-8" ng-if="!stats">
|
||||||
|
<div class="well">
|
||||||
<img src="img/loader.gif" />
|
<img src="img/loader.gif" />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
Loading…
Reference in New Issue
Block a user