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/invite.jade

55 lines
3.3 KiB
Plaintext
Raw Normal View History

2016-08-14 13:37:26 +02:00
.container
h1 Invites
2017-03-20 23:03:10 +01:00
.panel.panel-default
.panel-heading All
.btn-group.pull-right.btn-group-xs
a.btn.btn-default(ng-click="toggleAdmin()") Admin
span.glyphicon.glyphicon-ok(ng-if="invitor.admin")
span.glyphicon.glyphicon-remove(ng-if="!invitor.admin")
a.btn.btn-default(ng-click="isAdding=true") Add
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-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(ng-table="tableParams")
tr(ng-hide='group.$hideRows',ng-repeat="item in $data")
td(data-title="'#'") {{item.invited.ID}}
td(data-title="'Username'", filter="{'invited.username': 'text'}")
span(ng-if="!item.isEditing") {{item.invited.username}}
h4(ng-if="item.isEditing") Username: {{item.invited.username}}
form(name="myform",ng-if="item.isEditing",ng-submit="edit(item)")
.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")
.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")
button.btn.btn-primary(type="submit")
span.glyphicon.glyphicon-floppy-disk
| Save
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
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