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

62 lines
3.4 KiB
Plaintext
Raw Permalink Normal View History

2016-08-14 13:37:26 +02:00
.container
2016-09-11 18:40:03 +02:00
h1 User Managment
2017-03-20 23:03:10 +01:00
.panel.panel-default
.panel-heading All
a.pull-right.btn.btn-default.btn-xs(ng-click="isAdding=true")
span.glyphicon.glyphicon-plus
.panel-body(ng-if="isAdding")
form(ng-submit="add()",name="addform")
.form-group(ng-class="{'has-error': (error.fields.indexOf('username') >= 0 || !addform.username.$valid)}")
label(for="username") Username
input.form-control(id="username",name="username",ng-minlength="3",ng-model="obj.username")
.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(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",ng-submit="edit(item)")
.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.active")
| Active
.form-group
label
input(type="checkbox",ng-model="item.superadmin")
| Administrator
button.btn.btn-primary(type="submit")
span.glyphicon.glyphicon-floppy-disk
| Save
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")
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