49 lines
2.8 KiB
Plaintext
49 lines
2.8 KiB
Plaintext
.container
|
|
h1 User Managment
|
|
a.btn.btn-default(ng-click="isAdding=true")
|
|
span.glyphicon.glyphicon-plus
|
|
form.well(ng-submit="add()",name="addform",ng-if="isAdding")
|
|
.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
|
|
table.table.table-bordered(ng-table="tableParams")
|
|
tr(ng-hide='group.$hideRows',ng-repeat="item in $data")
|
|
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}}
|
|
form(name="myform",ng-if="item.isEditing")
|
|
.form-group(ng-class="{'has-error': (error.fields.indexOf('username') >= 0 || !myform.username.$valid)}")
|
|
label(for="username") Username
|
|
input.form-control(id="username",name="username",ng-model="item.username")
|
|
.form-group(ng-class="{'has-error': (error.fields.indexOf('newpassword') >= 0 || !myform.newPassword.$valid)}")
|
|
label(for="newPassword") New Password
|
|
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)}")
|
|
label(for="repeatPassword") Again Password
|
|
input.form-control(id="repeatPassword",type="password",name="repeatPassword",ng-model="item.repeatPassword")
|
|
.form-group
|
|
label
|
|
input(type="checkbox",ng-model="item.superadmin")
|
|
| Administrator
|
|
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")
|
|
td(data-title="'Option'")
|
|
.btn-group.btn-group-xs(ng-if="item.admin || item.createat >= item.lastloginat")
|
|
span.btn.btn-default(ng-click="item.isEditing = true",ng-if="!item.isEditing")
|
|
span.glyphicon.glyphicon-pencil
|
|
span.btn.btn-default(ng-click="edit(item)",ng-if="item.isEditing")
|
|
span.glyphicon.glyphicon-remove-circle
|
|
span.btn.btn-default(ng-click="delete(item)")
|
|
span.glyphicon.glyphicon-trash
|