2016-08-14 13:37:26 +02:00
|
|
|
.container
|
|
|
|
h1 Invites
|
2016-08-24 23:11:57 +02:00
|
|
|
a.btn.btn.default(ng-click="toggleAdmin()")
|
|
|
|
span.glyphicon.glyphicon-ok(ng-if="invitor.admin")
|
|
|
|
span.glyphicon.glyphicon-remove(ng-if="!invitor.admin")
|
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-08-23 22:57:35 +02:00
|
|
|
form(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
|
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")
|
|
|
|
td(data-title="'#'") {{item.invited.ID}}
|
2016-08-24 23:11:57 +02:00
|
|
|
td(data-title="'Username'", filter="{'invited.username': 'text'}")
|
2016-08-20 01:17:28 +02:00
|
|
|
span(ng-if="!item.isEditing") {{item.invited.username}}
|
|
|
|
h4(ng-if="item.isEditing") Username: {{item.invited.username}}
|
2016-08-23 22:57:35 +02:00
|
|
|
form(ng-submit="submit(obj)",name="myform",ng-if="item.isEditing")
|
2016-08-24 23:11:57 +02:00
|
|
|
.form-group(ng-if="session.login.superadmin",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.invited.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-08-20 01:17:28 +02:00
|
|
|
td(data-title="'Administrator'", filter="{'admin': 'components/ngfilter-boolean.html'}")
|
|
|
|
span.glyphicon.glyphicon-ok(ng-if="item.admin")
|
|
|
|
span.glyphicon.glyphicon-remove(ng-if="!item.admin")
|
|
|
|
td(data-title="'Option'")
|
|
|
|
.btn-group.btn-group-xs(ng-if="item.admin || item.invited.createat >= item.invited.lastloginat")
|
|
|
|
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
|