sum7/warehost-frontend
sum7
/
warehost-frontend
Archived
1
0
Fork 0
This repository has been archived on 2020-09-27. You can view files and clone it, but cannot push or open issues or pull requests.
warehost-frontend/public/app/user.jade

56 lines
3.1 KiB
Plaintext
Raw Normal View History

2016-08-14 13:37:26 +02:00
.container
2016-09-11 18:40:03 +02:00
h1 User Managment
2016-08-23 22:57:35 +02:00
a.btn.btn-default(ng-click="isAdding=true")
2016-08-20 01:17:28 +02:00
span.glyphicon.glyphicon-plus
2016-09-11 23:03:41 +02:00
form.well(ng-submit="add()",name="addform",ng-if="isAdding")
2016-08-23 22:57:35 +02:00
.form-group
label(for="username") Username
input.form-control(id="username",name="username",ng-model="obj.username",ng-minlength="3")
.form-group(ng-class="{'has-error': (error.fields.indexOf('newpassword') >= 0 || !addform.newPassword.$valid)}")
label(for="newPassword") New Password
input.form-control(id="newPassword",type="password",name="newPassword",ng-model="obj.password",ng-minlength="3")
.form-group(ng-class="{'has-error': (obj.password != obj.repeatPassword && addform.repeatPassword.$dirty)}")
label(for="repeatPassword") Again Password
input.form-control(id="repeatPassword",type="password",name="repeatPassword",ng-model="obj.repeatPassword")
button.btn.btn-primary(type="submit")
span.glyphicon.glyphicon-floppy-disk
| Save
2016-08-20 01:17:28 +02:00
table.table.table-bordered(ng-table="tableParams")
tr(ng-hide='group.$hideRows',ng-repeat="item in $data")
2016-09-11 18:40:03 +02:00
td(data-title="'#'") {{item.ID}}
td(data-title="'Username'", filter="{'username': 'text'}")
span(ng-if="!item.isEditing") {{item.username}}
h4(ng-if="item.isEditing") Username: {{item.username}}
2016-09-03 16:30:05 +02:00
form(name="myform",ng-if="item.isEditing")
2016-09-11 18:40:03 +02:00
.form-group(ng-class="{'has-error': (error.fields.indexOf('username') >= 0 || !myform.username.$valid)}")
2016-08-24 23:11:57 +02:00
label(for="username") Username
2016-09-11 18:40:03 +02:00
input.form-control(id="username",name="username",ng-model="item.username")
2016-08-20 01:17:28 +02:00
.form-group(ng-class="{'has-error': (error.fields.indexOf('newpassword') >= 0 || !myform.newPassword.$valid)}")
label(for="newPassword") New Password
2016-08-24 23:11:57 +02:00
input.form-control(id="newPassword",type="password",name="newPassword",ng-model="item.newPassword",ng-minlength="3")
.form-group(ng-class="{'has-error': (item.newPassword != item.repeatPassword && myform.repeatPassword.$dirty)}")
2016-08-20 01:17:28 +02:00
label(for="repeatPassword") Again Password
2016-08-24 23:11:57 +02:00
input.form-control(id="repeatPassword",type="password",name="repeatPassword",ng-model="item.repeatPassword")
2016-10-22 21:34:20 +02:00
.form-group
label
input(type="checkbox",ng-model="item.active")
| Active
2016-09-11 18:40:03 +02:00
.form-group
label
input(type="checkbox",ng-model="item.superadmin")
| Administrator
2016-10-22 21:34:20 +02:00
td(data-title="'Active'", filter="{'active': 'components/ngfilter-boolean.html'}")
span.glyphicon.glyphicon-ok(ng-if="item.active")
span.glyphicon.glyphicon-remove(ng-if="!item.active")
2016-09-11 18:40:03 +02:00
td(data-title="'Administrator'", filter="{'superadmin': 'components/ngfilter-boolean.html'}")
span.glyphicon.glyphicon-ok(ng-if="item.superadmin")
span.glyphicon.glyphicon-remove(ng-if="!item.superadmin")
2016-08-20 01:17:28 +02:00
td(data-title="'Option'")
2016-09-11 18:40:03 +02:00
.btn-group.btn-group-xs(ng-if="item.admin || item.createat >= item.lastloginat")
2016-08-20 01:17:28 +02:00
span.btn.btn-default(ng-click="item.isEditing = true",ng-if="!item.isEditing")
span.glyphicon.glyphicon-pencil
2016-08-24 23:11:57 +02:00
span.btn.btn-default(ng-click="edit(item)",ng-if="item.isEditing")
2016-08-20 01:17:28 +02:00
span.glyphicon.glyphicon-remove-circle
2016-08-24 23:11:57 +02:00
span.btn.btn-default(ng-click="delete(item)")
2016-08-20 01:17:28 +02:00
span.glyphicon.glyphicon-trash