sum7/warehost-frontend
sum7
/
warehost-frontend
Archived
1
0
Fork 0

rewrite themen and blog

This commit is contained in:
Martin Geno 2017-03-20 23:03:10 +01:00
parent e7dc403ddc
commit f07e4bece5
No known key found for this signature in database
GPG Key ID: F0D39A37E925E941
24 changed files with 740 additions and 574 deletions

View File

@ -20,11 +20,10 @@
"bootswatch": "^3.3.7", "bootswatch": "^3.3.7",
"ng-table": "^1.0.0", "ng-table": "^1.0.0",
"angular-ui-select": "^0.19.4", "angular-ui-select": "^0.19.4",
"angular-sanitize": "^1.5.8",
"angular-ui-tree": "^2.21.2", "angular-ui-tree": "^2.21.2",
"angular-markdown-editor-ghiscoding": "^1.0.7" "textAngular": "^1.5.16"
}, },
"resolutions":{ "resolutions": {
"angular": "1.6.0" "angular": "1.6.0"
} }
} }

View File

@ -1,27 +1,19 @@
'use strict'; 'use strict';
angular.module('warehost', [ angular.module('warehost', [
'ngSanitize',
'ui.router', 'ui.router',
'ui.bootstrap', 'ui.bootstrap',
'ui.select', 'ui.select',
'ui.tree', 'ui.tree',
'hc.marked', 'textAngular',
'angular-markdown-editor',
'ngTable', 'ngTable',
'config', 'config',
'session', 'session',
'alert' 'alert'
]) ])
.config(['$urlRouterProvider','$httpProvider','markedProvider',function($urlRouterProvider,$httpProvider,markedProvider){ .config(['$urlRouterProvider','$httpProvider',function($urlRouterProvider,$httpProvider){
$urlRouterProvider.otherwise('/'); $urlRouterProvider.otherwise('/');
$httpProvider.defaults.withCredentials = true; $httpProvider.defaults.withCredentials = true;
// marked config
markedProvider.setOptions({
gfm: true,
tables: true,
sanitize: true
});
// highlight config // highlight config
//hljsServiceProvider.setOptions({}); //hljsServiceProvider.setOptions({});

View File

@ -1,29 +1,30 @@
.container .container
h1 Database h1 Database
table.table.table-bordered(ng-table="tableParams") .panel.panel-default
tr(ng-hide='group.$hideRows',ng-repeat="item in $data") table.table(ng-table="tableParams")
td(data-title="'User'", filter="{'profil.login.username': 'text'}") {{item.profil.login.username}} tr(ng-hide='group.$hideRows',ng-repeat="item in $data")
td(data-title="'Database/User'") td(data-title="'User'", filter="{'profil.login.username': 'text'}") {{item.profil.login.username}}
span(ng-if="!item.isEditing") warehost_user{{item.profil.ID}}_db{{item.ID}} td(data-title="'Database/User'")
h4(ng-if="item.isEditing") Database: warehost_user{{item.profil.ID}}_db{{item.ID}} span(ng-if="!item.isEditing") warehost_user{{item.profil.ID}}_db{{item.ID}}
form(name="myform",ng-if="item.isEditing") h4(ng-if="item.isEditing") Database: warehost_user{{item.profil.ID}}_db{{item.ID}}
.form-group form(name="myform",ng-if="item.isEditing")
label(for="password") Password .form-group
input.form-control(id="password",name="password",ng-model="item.password",ng-minlength="3") label(for="password") Password
.form-group input.form-control(id="password",name="password",ng-model="item.password",ng-minlength="3")
label(for="comment") Comment .form-group
input.form-control(id="comment",name="comment",ng-model="item.comment") label(for="comment") Comment
button.btn.btn-primary(type="submit",ng-click="edit(item)") input.form-control(id="comment",name="comment",ng-model="item.comment")
span.glyphicon.glyphicon-floppy-disk button.btn.btn-primary(type="submit",ng-click="edit(item)")
| Save span.glyphicon.glyphicon-floppy-disk
td(data-title="'Kommentar'") | Save
span.glyphicon.glyphicon-lock(ng-if="item.password") td(data-title="'Kommentar'")
span(ng-if="!item.isEditing") {{item.comment}} span.glyphicon.glyphicon-lock(ng-if="item.password")
td(data-title="'Option'") span(ng-if="!item.isEditing") {{item.comment}}
.btn-group.btn-group-xs td(data-title="'Option'")
span.btn.btn-default(ng-click="item.isEditing = true",ng-if="!item.isEditing") .btn-group.btn-group-xs
span.glyphicon.glyphicon-pencil span.btn.btn-default(ng-click="item.isEditing = true",ng-if="!item.isEditing")
span.btn.btn-default(ng-click="edit(item)",ng-if="item.isEditing") span.glyphicon.glyphicon-pencil
span.glyphicon.glyphicon-remove-circle span.btn.btn-default(ng-click="edit(item)",ng-if="item.isEditing")
span.btn.btn-default(ng-click="delete(item)") span.glyphicon.glyphicon-remove-circle
span.glyphicon.glyphicon-trash span.btn.btn-default(ng-click="delete(item)")
span.glyphicon.glyphicon-trash

View File

@ -1,45 +1,46 @@
.container .container
h1 Domains h1 Domains
table.table.table-bordered(ng-table="tableParams") .panel.panel-default
tr(ng-hide='group.$hideRows',ng-repeat="item in $data") table.table(ng-table="tableParams")
td(data-title="'User'", filter="{'profil.login.username': 'text'}") {{item.profil.login.username}} tr(ng-hide='group.$hideRows',ng-repeat="item in $data")
td(data-title="'Domain'", filter="{'fqdn': 'text'}") td(data-title="'User'", filter="{'profil.login.username': 'text'}") {{item.profil.login.username}}
span(ng-if="!item.isEditing") {{item.fqdn}} td(data-title="'Domain'", filter="{'fqdn': 'text'}")
h4(ng-if="item.isEditing") Domain: {{item.fqdn}} span(ng-if="!item.isEditing") {{item.fqdn}}
form(name="myform",ng-if="item.isEditing") h4(ng-if="item.isEditing") Domain: {{item.fqdn}}
.form-group form(name="myform",ng-if="item.isEditing")
label(for="domain") Domain .form-group
input.form-control(id="domain",name="domain",ng-model="item.fqdn",ng-minlength="3") label(for="domain") Domain
.form-group input.form-control(id="domain",name="domain",ng-model="item.fqdn",ng-minlength="3")
label .form-group
input(type="checkbox",ng-model="item.active") label
| Active input(type="checkbox",ng-model="item.active")
.form-group | Active
label .form-group
input(type="checkbox",ng-model="item.web") label
| Web input(type="checkbox",ng-model="item.web")
.form-group | Web
label .form-group
input(type="checkbox",ng-model="item.mail") label
| Mail input(type="checkbox",ng-model="item.mail")
button.btn.btn-primary(type="submit",ng-click="edit(item)") | Mail
span.glyphicon.glyphicon-floppy-disk button.btn.btn-primary(type="submit",ng-click="edit(item)")
| Save span.glyphicon.glyphicon-floppy-disk
td(data-title="'Active'", filter="{'active': 'components/ngfilter-boolean.html'}") | Save
span.glyphicon.glyphicon-ok(aria-hidden="true",ng-if="item.active") td(data-title="'Active'", filter="{'active': 'components/ngfilter-boolean.html'}")
span.glyphicon.glyphicon-lock(aria-hidden="true",ng-if="!item.active") span.glyphicon.glyphicon-ok(aria-hidden="true",ng-if="item.active")
td(data-title="'Funktions'") span.glyphicon.glyphicon-lock(aria-hidden="true",ng-if="!item.active")
a(ng-if="item.mail && !item.isEditing && item.active",ui-sref="app.host.mail({domainid:item.ID})") td(data-title="'Funktions'")
span.glyphicon.glyphicon-envelope(aria-hidden="true") a(ng-if="item.mail && !item.isEditing && item.active",ui-sref="app.host.mail({domainid:item.ID})")
| Mail span.glyphicon.glyphicon-envelope(aria-hidden="true")
a(ng-if="item.web && !item.isEditing && item.active",ui-sref="app.host.web({domainid:item.ID})") | Mail
span.glyphicon.glyphicon-globe(aria-hidden="true") a(ng-if="item.web && !item.isEditing && item.active",ui-sref="app.host.web({domainid:item.ID})")
| Web span.glyphicon.glyphicon-globe(aria-hidden="true")
td(data-title="'Option'") | Web
.btn-group.btn-group-xs td(data-title="'Option'")
span.btn.btn-default(ng-click="item.isEditing = true",ng-if="!item.isEditing") .btn-group.btn-group-xs
span.glyphicon.glyphicon-pencil span.btn.btn-default(ng-click="item.isEditing = true",ng-if="!item.isEditing")
span.btn.btn-default(ng-click="edit(item)",ng-if="item.isEditing") span.glyphicon.glyphicon-pencil
span.glyphicon.glyphicon-remove-circle span.btn.btn-default(ng-click="edit(item)",ng-if="item.isEditing")
span.btn.btn-default(ng-click="delete(item)") span.glyphicon.glyphicon-remove-circle
span.glyphicon.glyphicon-trash span.btn.btn-default(ng-click="delete(item)")
span.glyphicon.glyphicon-trash

View File

@ -1,10 +1,11 @@
.container .container
h1 Profiles h1 Profiles
table.table.table-bordered(ng-table="tableParams") .panel.panel-default
tr(ng-hide='group.$hideRows',ng-repeat="item in $data") table.table(ng-table="tableParams")
td(data-title="'UserID'", filter="{'login.ID': 'text'}") {{item.login.ID}} tr(ng-hide='group.$hideRows',ng-repeat="item in $data")
td(data-title="'User'", filter="{'login.username': 'text'}") {{item.login.username}} td(data-title="'UserID'", filter="{'login.ID': 'text'}") {{item.login.ID}}
td(data-title="'ProfilID'", filter="{'ID': 'text'}") {{item.ID}} td(data-title="'User'", filter="{'login.username': 'text'}") {{item.login.username}}
td(data-title="'Reseller'", filter="{'reseller': 'components/ngfilter-boolean.html'}") td(data-title="'ProfilID'", filter="{'ID': 'text'}") {{item.ID}}
span.glyphicon.glyphicon-ok(aria-hidden="true",ng-if="item.reseller",ng-click="toggle(item)") td(data-title="'Reseller'", filter="{'reseller': 'components/ngfilter-boolean.html'}")
span.glyphicon.glyphicon-remove(aria-hidden="true",ng-if="!item.reseller",ng-click="toggle(item)") span.glyphicon.glyphicon-ok(aria-hidden="true",ng-if="item.reseller",ng-click="toggle(item)")
span.glyphicon.glyphicon-remove(aria-hidden="true",ng-if="!item.reseller",ng-click="toggle(item)")

View File

@ -1,40 +1,43 @@
.container .container
h1 Database h1 Database
a.btn.btn-default(ng-click="isAdding=true") .panel.panel-default
span.glyphicon.glyphicon-plus .panel-heading All
form.well(ng-submit="add()",name="addform",ng-if="isAdding") a.pull-right.btn.btn-default.btn-xs(ng-click="isAdding=true")
.form-group span.glyphicon.glyphicon-plus
label(for="password") Password .panel-body(ng-if="isAdding")
input.form-control(id="password",name="password",ng-model="obj.password",ng-minlength="3") form(ng-submit="add()",name="addform")
.form-group .form-group
label(for="comment") Comment label(for="password") Password
input.form-control(id="comment",name="comment",ng-model="obj.comment") input.form-control(id="password",name="password",ng-model="obj.password",ng-minlength="3")
button.btn.btn-primary(type="submit") .form-group
span.glyphicon.glyphicon-floppy-disk label(for="comment") Comment
| Save input.form-control(id="comment",name="comment",ng-model="obj.comment")
table.table.table-bordered(ng-table="tableParams") button.btn.btn-primary(type="submit")
tr(ng-hide='group.$hideRows',ng-repeat="item in $data") span.glyphicon.glyphicon-floppy-disk
td(data-title="'Database/User'") | Save
span(ng-if="!item.isEditing") warehost_db{{item.ID}} table.table(ng-table="tableParams")
h4(ng-if="item.isEditing") Database: warehost_db{{item.ID}} tr(ng-hide='group.$hideRows',ng-repeat="item in $data")
form(name="myform",ng-if="item.isEditing") td(data-title="'Database/User'")
.form-group span(ng-if="!item.isEditing") warehost_db{{item.ID}}
label(for="password") Password h4(ng-if="item.isEditing") Database: warehost_db{{item.ID}}
input.form-control(id="password",name="password",ng-model="item.password",ng-minlength="3") form(name="myform",ng-if="item.isEditing")
.form-group .form-group
label(for="comment") Comment label(for="password") Password
input.form-control(id="comment",name="comment",ng-model="item.comment") input.form-control(id="password",name="password",ng-model="item.password",ng-minlength="3")
button.btn.btn-primary(type="submit",ng-click="edit(item)") .form-group
span.glyphicon.glyphicon-floppy-disk label(for="comment") Comment
| Save input.form-control(id="comment",name="comment",ng-model="item.comment")
td(data-title="'Kommentar'") button.btn.btn-primary(type="submit",ng-click="edit(item)")
span.glyphicon.glyphicon-lock(ng-if="item.password") span.glyphicon.glyphicon-floppy-disk
span(ng-if="!item.isEditing") {{item.comment}} | Save
td(data-title="'Option'") td(data-title="'Kommentar'")
.btn-group.btn-group-xs span.glyphicon.glyphicon-lock(ng-if="item.password")
span.btn.btn-default(ng-click="item.isEditing = true",ng-if="!item.isEditing") span(ng-if="!item.isEditing") {{item.comment}}
span.glyphicon.glyphicon-pencil td(data-title="'Option'")
span.btn.btn-default(ng-click="edit(item)",ng-if="item.isEditing") .btn-group.btn-group-xs
span.glyphicon.glyphicon-remove-circle span.btn.btn-default(ng-click="item.isEditing = true",ng-if="!item.isEditing")
span.btn.btn-default(ng-click="delete(item)") span.glyphicon.glyphicon-pencil
span.glyphicon.glyphicon-trash 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

View File

@ -1,65 +1,68 @@
.container .container
h1 Domains h1 Domains
a.btn.btn-default(ng-click="isAdding=true") .panel.panel-default
span.glyphicon.glyphicon-plus .panel-heading All
form.well(ng-submit="add()",name="addform",ng-if="isAdding") a.pull-right.btn.btn-default.btn-xs(ng-click="isAdding=true")
.form-group span.glyphicon.glyphicon-plus
label(for="domain") Domain .panel-body(ng-if="isAdding")
input.form-control(id="domain",name="domain",ng-model="obj.fqdn",ng-minlength="3") form(ng-submit="add()",name="addform")
.form-group(ng-if="session.login.superadmin") .form-group
label label(for="domain") Domain
input(type="checkbox",ng-model="obj.active") input.form-control(id="domain",name="domain",ng-model="obj.fqdn",ng-minlength="3")
| Active .form-group(ng-if="session.login.superadmin")
.form-group label
label input(type="checkbox",ng-model="obj.active")
input(type="checkbox",ng-model="obj.web") | Active
| Web .form-group
.form-group label
label input(type="checkbox",ng-model="obj.web")
input(type="checkbox",ng-model="obj.mail") | Web
| Mail .form-group
button.btn.btn-primary(type="submit") label
span.glyphicon.glyphicon-floppy-disk input(type="checkbox",ng-model="obj.mail")
| Save | Mail
table.table.table-bordered(ng-table="tableParams") button.btn.btn-primary(type="submit")
tr(ng-hide='group.$hideRows',ng-repeat="item in $data") span.glyphicon.glyphicon-floppy-disk
td(data-title="'Domain'", filter="{'fqdn': 'text'}") | Save
span(ng-if="!item.isEditing") {{item.fqdn}} table.table(ng-table="tableParams")
h4(ng-if="item.isEditing") Domain: {{item.fqdn}} tr(ng-hide='group.$hideRows',ng-repeat="item in $data")
form(name="myform",ng-if="item.isEditing") td(data-title="'Domain'", filter="{'fqdn': 'text'}")
.form-group span(ng-if="!item.isEditing") {{item.fqdn}}
label(for="domain") Domain h4(ng-if="item.isEditing") Domain: {{item.fqdn}}
input.form-control(id="domain",name="domain",ng-model="item.fqdn",ng-minlength="3") form(name="myform",ng-if="item.isEditing")
.form-group(ng-if="session.login.superadmin") .form-group
label label(for="domain") Domain
input(type="checkbox",ng-model="item.active") input.form-control(id="domain",name="domain",ng-model="item.fqdn",ng-minlength="3")
| Active .form-group(ng-if="session.login.superadmin")
.form-group label
label input(type="checkbox",ng-model="item.active")
input(type="checkbox",ng-model="item.web") | Active
| Web .form-group
.form-group label
label input(type="checkbox",ng-model="item.web")
input(type="checkbox",ng-model="item.mail") | Web
| Mail .form-group
button.btn.btn-primary(type="submit",ng-click="edit(item)") label
span.glyphicon.glyphicon-floppy-disk input(type="checkbox",ng-model="item.mail")
| Save | Mail
td(data-title="'Active'", filter="{'active': 'components/ngfilter-boolean.html'}") button.btn.btn-primary(type="submit",ng-click="edit(item)")
span.glyphicon.glyphicon-ok(aria-hidden="true",ng-if="item.active") span.glyphicon.glyphicon-floppy-disk
span.glyphicon.glyphicon-lock(aria-hidden="true",ng-if="!item.active") | Save
td(data-title="'Funktions'") td(data-title="'Active'", filter="{'active': 'components/ngfilter-boolean.html'}")
a(ng-if="item.mail && !item.isEditing && item.active",ui-sref="app.host.mail({domainid:item.ID})") span.glyphicon.glyphicon-ok(aria-hidden="true",ng-if="item.active")
span.glyphicon.glyphicon-envelope(aria-hidden="true") span.glyphicon.glyphicon-lock(aria-hidden="true",ng-if="!item.active")
| Mail td(data-title="'Funktions'")
a(ng-if="item.web && !item.isEditing && item.active",ui-sref="app.host.web({domainid:item.ID})") a(ng-if="item.mail && !item.isEditing && item.active",ui-sref="app.host.mail({domainid:item.ID})")
span.glyphicon.glyphicon-globe(aria-hidden="true") span.glyphicon.glyphicon-envelope(aria-hidden="true")
| Web | Mail
td(data-title="'Option'") a(ng-if="item.web && !item.isEditing && item.active",ui-sref="app.host.web({domainid:item.ID})")
.btn-group.btn-group-xs span.glyphicon.glyphicon-globe(aria-hidden="true")
span.btn.btn-default(ng-click="item.isEditing = true",ng-if="!item.isEditing") | Web
span.glyphicon.glyphicon-pencil td(data-title="'Option'")
span.btn.btn-default(ng-click="edit(item)",ng-if="item.isEditing") .btn-group.btn-group-xs
span.glyphicon.glyphicon-remove-circle span.btn.btn-default(ng-click="item.isEditing = true",ng-if="!item.isEditing")
span.btn.btn-default(ng-click="delete(item)") span.glyphicon.glyphicon-pencil
span.glyphicon.glyphicon-trash 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

View File

@ -1,74 +1,77 @@
.container .container
h1 Mail h1 Mail
a.btn.btn-default(ng-click="isAdding=true") .panel.panel-default
span.glyphicon.glyphicon-plus .panel-heading All
form.well(ng-submit="add()",name="addform",ng-if="isAdding") a.pull-right.btn.btn-default.btn-xs(ng-click="isAdding=true")
.form-group span.glyphicon.glyphicon-plus
label(for="name") Name .panel-body(ng-if="isAdding")
.input-group form(ng-submit="add()",name="addform")
input.form-control(id="name",name="name",ng-model="obj.name") .form-group
span.input-group-addon @{{domain.fqdn}} label(for="name") Name
.form-group .input-group
label Inbox input.form-control(id="name",name="name",ng-model="obj.name")
.input-group span.input-group-addon @{{domain.fqdn}}
ui-select(ng-model="obj.login")
ui-select-match
span(ng-repeat="i in loginlist",ng-show="i.ID == $select.selected.ID") {{i.username}}
ui-select-choices(repeat="i.ID as i in loginlist | filter: $select.search")
div(ng-bind-html="i.username | highlight: $select.search")
span.input-group-btn
button.btn.btn-default(type="button",ng-click="obj.login = undefined")
span.glyphicon.glyphicon-trash
.form-group
label Forwards
ui-select(ng-model="obj.forwards",multiple,tagging="newMail")
ui-select-match {{$item.to}}
ui-select-choices(repeat="i in obj.forwards")
div(ng-bind-html="i.to | highlight: $select.search")
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="'Mail-Adresse'")
span(ng-if="!item.isEditing") {{item.name}}@{{item.domain.fqdn}}
h4(ng-if="item.isEditing") {{item.name}}@{{item.domain.fqdn}}
form(name="myform",ng-if="item.isEditing")
.form-group
label(for="name") Name
.input-group
input.form-control(id="name",name="name",ng-model="item.name")
span.input-group-addon @{{item.domain.fqdn}}
.form-group .form-group
label Inbox label Inbox
.input-group .input-group
ui-select(ng-model="item.login") ui-select(ng-model="obj.login")
ui-select-match ui-select-match
span(ng-repeat="i in loginlist",ng-show="i.ID == $select.selected.ID") {{i.username}} span(ng-repeat="i in loginlist",ng-show="i.ID == $select.selected.ID") {{i.username}}
ui-select-choices(repeat="i.ID as i in loginlist | filter: $select.search") ui-select-choices(repeat="i.ID as i in loginlist | filter: $select.search")
div(ng-bind-html="i.username | highlight: $select.search") div(ng-bind-html="i.username | highlight: $select.search")
span.input-group-btn span.input-group-btn
button.btn.btn-default(type="button",ng-click="item.login = undefined") button.btn.btn-default(type="button",ng-click="obj.login = undefined")
span.glyphicon.glyphicon-trash span.glyphicon.glyphicon-trash
.form-group .form-group
label Forwards label Forwards
ui-select(ng-model="item.forwards",multiple,tagging="newMail") ui-select(ng-model="obj.forwards",multiple,tagging="newMail")
ui-select-match {{$item.to}} ui-select-match {{$item.to}}
ui-select-choices(repeat="i in item.forwards") ui-select-choices(repeat="i in obj.forwards")
div(ng-bind-html="i.to | highlight: $select.search") div(ng-bind-html="i.to | highlight: $select.search")
button.btn.btn-primary(type="submit",ng-click="edit(item)") button.btn.btn-primary(type="submit")
span.glyphicon.glyphicon-floppy-disk span.glyphicon.glyphicon-floppy-disk
| Save | Save
td(data-title="'Inbox'") table.table(ng-table="tableParams")
span(ng-repeat="i in loginlist",ng-if="i.ID == item.login") {{i.username}} tr(ng-hide='group.$hideRows',ng-repeat="item in $data")
td(data-title="'Forwards'") td(data-title="'Mail-Adresse'")
ul span(ng-if="!item.isEditing") {{item.name}}@{{item.domain.fqdn}}
li(ng-repeat="i in item.forwards") {{i.to}} h4(ng-if="item.isEditing") {{item.name}}@{{item.domain.fqdn}}
td(data-title="'Option'") form(name="myform",ng-if="item.isEditing")
.btn-group.btn-group-xs .form-group
span.btn.btn-default(ng-click="item.isEditing = true",ng-if="!item.isEditing") label(for="name") Name
span.glyphicon.glyphicon-pencil .input-group
span.btn.btn-default(ng-click="edit(item)",ng-if="item.isEditing") input.form-control(id="name",name="name",ng-model="item.name")
span.glyphicon.glyphicon-remove-circle span.input-group-addon @{{item.domain.fqdn}}
span.btn.btn-default(ng-click="delete(item)") .form-group
span.glyphicon.glyphicon-trash label Inbox
.input-group
ui-select(ng-model="item.login")
ui-select-match
span(ng-repeat="i in loginlist",ng-show="i.ID == $select.selected.ID") {{i.username}}
ui-select-choices(repeat="i.ID as i in loginlist | filter: $select.search")
div(ng-bind-html="i.username | highlight: $select.search")
span.input-group-btn
button.btn.btn-default(type="button",ng-click="item.login = undefined")
span.glyphicon.glyphicon-trash
.form-group
label Forwards
ui-select(ng-model="item.forwards",multiple,tagging="newMail")
ui-select-match {{$item.to}}
ui-select-choices(repeat="i in item.forwards")
div(ng-bind-html="i.to | highlight: $select.search")
button.btn.btn-primary(type="submit",ng-click="edit(item)")
span.glyphicon.glyphicon-floppy-disk
| Save
td(data-title="'Inbox'")
span(ng-repeat="i in loginlist",ng-if="i.ID == item.login") {{i.username}}
td(data-title="'Forwards'")
ul
li(ng-repeat="i in item.forwards") {{i.to}}
td(data-title="'Option'")
.btn-group.btn-group-xs
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

View File

@ -1,109 +1,112 @@
.container .container
h1 Web h1 Web
a.btn.btn-default(ng-click="isAdding=true") .panel.panel-default
span.glyphicon.glyphicon-plus .panel-heading All
form.well(ng-submit="add()",name="addform",ng-if="isAdding") a.pull-right.btn.btn-default.btn-xs(ng-click="isAdding=true")
.form-group span.glyphicon.glyphicon-plus
label(for="subdomain") Subdomain .panel-body(ng-if="isAdding")
.input-group form(ng-submit="add()",name="addform")
input.form-control(id="subdomain",name="subdomain",ng-model="obj.subdomain") .form-group
span.input-group-addon .{{domain.fqdn}} label(for="subdomain") Subdomain
.form-group .input-group
label input.form-control(id="subdomain",name="subdomain",ng-model="obj.subdomain")
input(type="checkbox",ng-model="obj.php") span.input-group-addon .{{domain.fqdn}}
| PHP .form-group
.form-group label
label input(type="checkbox",ng-model="obj.php")
input(type="checkbox",ng-model="obj.ssl") | PHP
| SSL .form-group
.form-group label
label input(type="checkbox",ng-model="obj.ssl")
input(type="checkbox",ng-model="obj.sslredirect") | SSL
| SSL-Redirect .form-group
.form-group label
label(for="redirect") Redirect input(type="checkbox",ng-model="obj.sslredirect")
input.form-control(id="redirect",name="redirect",ng-model="obj.redirect") | SSL-Redirect
.form-group .form-group
label(for="proxy") Proxy label(for="redirect") Redirect
input.form-control(id="proxy",name="proxy",ng-model="obj.proxy") input.form-control(id="redirect",name="redirect",ng-model="obj.redirect")
.form-group .form-group
label FTP Access label(for="proxy") Proxy
ui-select(ng-model="obj.ftpaccess",multiple,on-select="newUser(obj.ftpaccess, $model)") input.form-control(id="proxy",name="proxy",ng-model="obj.proxy")
ui-select-match {{$item.login.username}} .form-group
ui-select-choices(repeat="i in loginlist | afterKeyID:obj.ftpaccess:'login' | filter: $select.search") label FTP Access
div(ng-bind-html="i.username | highlight: $select.search") ui-select(ng-model="obj.ftpaccess",multiple,on-select="newUser(obj.ftpaccess, $model)")
.form-group ui-select-match {{$item.login.username}}
label HTTP Access ui-select-choices(repeat="i in loginlist | afterKeyID:obj.ftpaccess:'login' | filter: $select.search")
ui-select(ng-model="obj.httpaccess",multiple,on-select="newUser(obj.httpaccess, $model)") div(ng-bind-html="i.username | highlight: $select.search")
ui-select-match {{$item.login.username}} .form-group
ui-select-choices(repeat="i in loginlist | afterKeyID:obj.httpaccess:'login' | filter: $select.search") label HTTP Access
div(ng-bind-html="i.username | highlight: $select.search") ui-select(ng-model="obj.httpaccess",multiple,on-select="newUser(obj.httpaccess, $model)")
button.btn.btn-primary(type="submit") ui-select-match {{$item.login.username}}
span.glyphicon.glyphicon-floppy-disk ui-select-choices(repeat="i in loginlist | afterKeyID:obj.httpaccess:'login' | filter: $select.search")
| Save div(ng-bind-html="i.username | highlight: $select.search")
table.table.table-bordered(ng-table="tableParams") button.btn.btn-primary(type="submit")
tr(ng-hide='group.$hideRows',ng-repeat="item in $data") span.glyphicon.glyphicon-floppy-disk
td(data-title="'Domain'") | Save
span(ng-if="!item.isEditing") table.table(ng-table="tableParams")
span(ng-if="item.subdomain != ''") {{item.subdomain}}. tr(ng-hide='group.$hideRows',ng-repeat="item in $data")
| {{item.domain.fqdn}} td(data-title="'Domain'")
h4(ng-if="item.isEditing") {{item.subdomain}}.{{item.domain.fqdn}} span(ng-if="!item.isEditing")
form(name="myform",ng-if="item.isEditing") span(ng-if="item.subdomain != ''") {{item.subdomain}}.
.form-group | {{item.domain.fqdn}}
label(for="subdomain") Subdomain h4(ng-if="item.isEditing") {{item.subdomain}}.{{item.domain.fqdn}}
.input-group form(name="myform",ng-if="item.isEditing")
input.form-control(id="subdomain",name="subdomain",ng-model="item.subdomain") .form-group
span.input-group-addon .{{item.domain.fqdn}} label(for="subdomain") Subdomain
.form-group .input-group
label input.form-control(id="subdomain",name="subdomain",ng-model="item.subdomain")
input(type="checkbox",ng-model="item.php") span.input-group-addon .{{item.domain.fqdn}}
| PHP .form-group
.form-group label
label input(type="checkbox",ng-model="item.php")
input(type="checkbox",ng-model="item.ssl") | PHP
| SSL .form-group
.form-group label
label input(type="checkbox",ng-model="item.ssl")
input(type="checkbox",ng-model="item.sslredirect") | SSL
| SSL-Redirect .form-group
.form-group label
label(for="redirect") Redirect input(type="checkbox",ng-model="item.sslredirect")
input.form-control(id="redirect",name="redirect",ng-model="item.redirect") | SSL-Redirect
.form-group .form-group
label(for="proxy") Proxy label(for="redirect") Redirect
input.form-control(id="proxy",name="proxy",ng-model="item.proxy") input.form-control(id="redirect",name="redirect",ng-model="item.redirect")
.form-group .form-group
label FTP Access label(for="proxy") Proxy
ui-select(ng-model="item.ftpaccess",multiple,on-select="newUser(item.ftpaccess, $model)") input.form-control(id="proxy",name="proxy",ng-model="item.proxy")
ui-select-match {{$item.login.username}} .form-group
ui-select-choices(repeat="i in loginlist | afterKeyID:item.ftpaccess:'login' | filter: $select.search") label FTP Access
div(ng-bind-html="i.username | highlight: $select.search") ui-select(ng-model="item.ftpaccess",multiple,on-select="newUser(item.ftpaccess, $model)")
.form-group ui-select-match {{$item.login.username}}
label HTTP Access ui-select-choices(repeat="i in loginlist | afterKeyID:item.ftpaccess:'login' | filter: $select.search")
ui-select(ng-model="item.httpaccess",multiple,on-select="newUser(item.httpaccess, $model)") div(ng-bind-html="i.username | highlight: $select.search")
ui-select-match {{$item.login.username}} .form-group
ui-select-choices(repeat="i in loginlist | afterKeyID:item.httpaccess:'login' | filter: $select.search") label HTTP Access
div(ng-bind-html="i.username | highlight: $select.search") ui-select(ng-model="item.httpaccess",multiple,on-select="newUser(item.httpaccess, $model)")
button.btn.btn-primary(type="submit",ng-click="edit(item)") ui-select-match {{$item.login.username}}
span.glyphicon.glyphicon-floppy-disk ui-select-choices(repeat="i in loginlist | afterKeyID:item.httpaccess:'login' | filter: $select.search")
| Save div(ng-bind-html="i.username | highlight: $select.search")
td(data-title="'FTPAccess'") button.btn.btn-primary(type="submit",ng-click="edit(item)")
ul span.glyphicon.glyphicon-floppy-disk
li(ng-repeat="i in item.ftpaccess") {{i.login.username}} | Save
td(data-title="'HTTPAccess'") td(data-title="'FTPAccess'")
ul ul
li(ng-repeat="i in item.httpaccess") {{i.login.username}} li(ng-repeat="i in item.ftpaccess") {{i.login.username}}
td(data-title="'Features'") td(data-title="'HTTPAccess'")
span.glyphicon.glyphicon-cd(ng-if="item.php") ul
span.glyphicon.glyphicon-lock(ng-if="item.ssl") li(ng-repeat="i in item.httpaccess") {{i.login.username}}
span.glyphicon.glyphicon-share(ng-if="item.sslredirect") td(data-title="'Features'")
span.glyphicon.glyphicon-share-alt(ng-if="item.redirect") span.glyphicon.glyphicon-cd(ng-if="item.php")
span.glyphicon.glyphicon-send(ng-if="item.proxy") span.glyphicon.glyphicon-lock(ng-if="item.ssl")
td(data-title="'Option'") span.glyphicon.glyphicon-share(ng-if="item.sslredirect")
.btn-group.btn-group-xs span.glyphicon.glyphicon-share-alt(ng-if="item.redirect")
span.btn.btn-default(ng-click="item.isEditing = true",ng-if="!item.isEditing") span.glyphicon.glyphicon-send(ng-if="item.proxy")
span.glyphicon.glyphicon-pencil td(data-title="'Option'")
span.btn.btn-default(ng-click="edit(item)",ng-if="item.isEditing") .btn-group.btn-group-xs
span.glyphicon.glyphicon-remove-circle span.btn.btn-default(ng-click="item.isEditing = true",ng-if="!item.isEditing")
span.btn.btn-default(ng-click="delete(item)") span.glyphicon.glyphicon-pencil
span.glyphicon.glyphicon-trash 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

View File

@ -1,47 +1,54 @@
.container .container
h1 Invites h1 Invites
a.btn.btn.default(ng-click="toggleAdmin()") .panel.panel-default
span.glyphicon.glyphicon-ok(ng-if="invitor.admin") .panel-heading All
span.glyphicon.glyphicon-remove(ng-if="!invitor.admin") .btn-group.pull-right.btn-group-xs
a.btn.btn-default(ng-click="isAdding=true") a.btn.btn-default(ng-click="toggleAdmin()") Admin
span.glyphicon.glyphicon-plus span.glyphicon.glyphicon-ok(ng-if="invitor.admin")
form.well(ng-submit="add()",name="addform",ng-if="isAdding") span.glyphicon.glyphicon-remove(ng-if="!invitor.admin")
.form-group a.btn.btn-default(ng-click="isAdding=true") Add
label(for="username") Username span.glyphicon.glyphicon-plus
input.form-control(id="username",name="username",ng-model="obj.username",ng-minlength="3") .panel-body(ng-if="isAdding")
.form-group(ng-class="{'has-error': (error.fields.indexOf('newpassword') >= 0 || !addform.newPassword.$valid)}") form(ng-submit="add()",name="addform")
label(for="newPassword") New Password .form-group(ng-class="{'has-error': (error.fields.indexOf('username') >= 0 || !addform.username.$valid)}")
input.form-control(id="newPassword",type="password",name="newPassword",ng-model="obj.password",ng-minlength="3") label(for="username") Username
.form-group(ng-class="{'has-error': (obj.password != obj.repeatPassword && addform.repeatPassword.$dirty)}") input.form-control(id="username",name="username",ng-model="obj.username",ng-minlength="3")
label(for="repeatPassword") Again Password .form-group(ng-class="{'has-error': (error.fields.indexOf('newpassword') >= 0 || !addform.newPassword.$valid)}")
input.form-control(id="repeatPassword",type="password",name="repeatPassword",ng-model="obj.repeatPassword") label(for="newPassword") New Password
button.btn.btn-primary(type="submit") input.form-control(id="newPassword",type="password",name="newPassword",ng-model="obj.password",ng-minlength="3")
span.glyphicon.glyphicon-floppy-disk .form-group(ng-class="{'has-error': (obj.password != obj.repeatPassword && addform.repeatPassword.$dirty)}")
| Save label(for="repeatPassword") Again Password
table.table.table-bordered(ng-table="tableParams") input.form-control(id="repeatPassword",type="password",name="repeatPassword",ng-model="obj.repeatPassword")
tr(ng-hide='group.$hideRows',ng-repeat="item in $data") button.btn.btn-primary(type="submit")
td(data-title="'#'") {{item.invited.ID}} span.glyphicon.glyphicon-floppy-disk
td(data-title="'Username'", filter="{'invited.username': 'text'}") | Save
span(ng-if="!item.isEditing") {{item.invited.username}} table.table(ng-table="tableParams")
h4(ng-if="item.isEditing") Username: {{item.invited.username}} tr(ng-hide='group.$hideRows',ng-repeat="item in $data")
form(name="myform",ng-if="item.isEditing") td(data-title="'#'") {{item.invited.ID}}
.form-group(ng-if="session.login.superadmin",ng-class="{'has-error': (error.fields.indexOf('username') >= 0 || !myform.username.$valid)}") td(data-title="'Username'", filter="{'invited.username': 'text'}")
label(for="username") Username span(ng-if="!item.isEditing") {{item.invited.username}}
input.form-control(id="username",name="username",ng-model="item.invited.username") h4(ng-if="item.isEditing") Username: {{item.invited.username}}
.form-group(ng-class="{'has-error': (error.fields.indexOf('newpassword') >= 0 || !myform.newPassword.$valid)}") form(name="myform",ng-if="item.isEditing",ng-submit="edit(item)")
label(for="newPassword") New Password .form-group(ng-if="session.login.superadmin",ng-class="{'has-error': (error.fields.indexOf('username') >= 0 || !myform.username.$valid)}")
input.form-control(id="newPassword",type="password",name="newPassword",ng-model="item.newPassword",ng-minlength="3") label(for="username") Username
.form-group(ng-class="{'has-error': (item.newPassword != item.repeatPassword && myform.repeatPassword.$dirty)}") input.form-control(id="username",name="username",ng-model="item.invited.username")
label(for="repeatPassword") Again Password .form-group(ng-class="{'has-error': (error.fields.indexOf('newpassword') >= 0 || !myform.newPassword.$valid)}")
input.form-control(id="repeatPassword",type="password",name="repeatPassword",ng-model="item.repeatPassword") label(for="newPassword") New Password
td(data-title="'Administrator'", filter="{'admin': 'components/ngfilter-boolean.html'}") input.form-control(id="newPassword",type="password",name="newPassword",ng-model="item.newPassword",ng-minlength="3")
span.glyphicon.glyphicon-ok(ng-if="item.admin") .form-group(ng-class="{'has-error': (item.newPassword != item.repeatPassword && myform.repeatPassword.$dirty)}")
span.glyphicon.glyphicon-remove(ng-if="!item.admin") label(for="repeatPassword") Again Password
td(data-title="'Option'") input.form-control(id="repeatPassword",type="password",name="repeatPassword",ng-model="item.repeatPassword")
.btn-group.btn-group-xs(ng-if="item.admin || item.invited.createat >= item.invited.lastloginat") button.btn.btn-primary(type="submit")
span.btn.btn-default(ng-click="item.isEditing = true",ng-if="!item.isEditing") span.glyphicon.glyphicon-floppy-disk
span.glyphicon.glyphicon-pencil | Save
span.btn.btn-default(ng-click="edit(item)",ng-if="item.isEditing") td(data-title="'Administrator'", filter="{'admin': 'components/ngfilter-boolean.html'}")
span.glyphicon.glyphicon-remove-circle span.glyphicon.glyphicon-ok(ng-if="item.admin")
span.btn.btn-default(ng-click="delete(item)") span.glyphicon.glyphicon-remove(ng-if="!item.admin")
span.glyphicon.glyphicon-trash 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

View File

@ -1,24 +1,25 @@
.container .container
h1 Settings h1 Settings
form.well(ng-submit="submit()",name="myform") .panel.panel-default
.form-group form.panel-body(ng-submit="submit()",name="myform")
label(for="globalUsername") Username .form-group
input.form-control(id="globalUsername",ng-model="session.login.username",readonly) label(for="globalUsername") Username
.form-group(ng-class="{'has-error': (error.fields.indexOf('currentpassword') >= 0)}") input.form-control(id="globalUsername",ng-model="session.login.username",readonly)
label(for="currentPassword") Current Password .form-group(ng-class="{'has-error': (error.fields.indexOf('currentpassword') >= 0)}")
input.form-control(id="currentPassword",type="password",ng-model="obj.currentPassword") label(for="currentPassword") Current Password
.form-group(ng-class="{'has-error': (error.fields.indexOf('newpassword') >= 0 || !myform.newPassword.$valid)}") input.form-control(id="currentPassword",type="password",ng-model="obj.currentPassword")
label(for="newPassword") New Password .form-group(ng-class="{'has-error': (error.fields.indexOf('newpassword') >= 0 || !myform.newPassword.$valid)}")
input.form-control(id="newPassword",type="password",name="newPassword",ng-model="obj.newPassword",ng-minlength="3") label(for="newPassword") New Password
.form-group(ng-class="{'has-error': (obj.newPassword != obj.repeatPassword && myform.repeatPassword.$dirty)}") input.form-control(id="newPassword",type="password",name="newPassword",ng-model="obj.newPassword",ng-minlength="3")
label(for="repeatPassword") Again Password .form-group(ng-class="{'has-error': (obj.newPassword != obj.repeatPassword && myform.repeatPassword.$dirty)}")
input.form-control(id="repeatPassword",type="password",name="repeatPassword",ng-model="obj.repeatPassword") label(for="repeatPassword") Again Password
.row input.form-control(id="repeatPassword",type="password",name="repeatPassword",ng-model="obj.repeatPassword")
.col-xs-6 .row
button.btn.btn-primary(type="submit") .col-xs-6
span.glyphicon.glyphicon-floppy-disk button.btn.btn-primary(type="submit")
| Save span.glyphicon.glyphicon-floppy-disk
.col-xs-6.text-right | Save
a.btn.btn-danger(ng-click="delete()") .col-xs-6.text-right
span.glyphicon.glyphicon-trash a.btn.btn-danger(ng-click="delete()")
| Delete span.glyphicon.glyphicon-trash
| Delete

View File

@ -1,55 +1,61 @@
.container .container
h1 User Managment h1 User Managment
a.btn.btn-default(ng-click="isAdding=true") .panel.panel-default
span.glyphicon.glyphicon-plus .panel-heading All
form.well(ng-submit="add()",name="addform",ng-if="isAdding") a.pull-right.btn.btn-default.btn-xs(ng-click="isAdding=true")
.form-group span.glyphicon.glyphicon-plus
label(for="username") Username .panel-body(ng-if="isAdding")
input.form-control(id="username",name="username",ng-model="obj.username",ng-minlength="3") form(ng-submit="add()",name="addform")
.form-group(ng-class="{'has-error': (error.fields.indexOf('newpassword') >= 0 || !addform.newPassword.$valid)}") .form-group(ng-class="{'has-error': (error.fields.indexOf('username') >= 0 || !addform.username.$valid)}")
label(for="newPassword") New Password label(for="username") Username
input.form-control(id="newPassword",type="password",name="newPassword",ng-model="obj.password",ng-minlength="3") input.form-control(id="username",name="username",ng-minlength="3",ng-model="obj.username")
.form-group(ng-class="{'has-error': (obj.password != obj.repeatPassword && addform.repeatPassword.$dirty)}") .form-group(ng-class="{'has-error': (error.fields.indexOf('newpassword') >= 0 || !addform.newPassword.$valid)}")
label(for="repeatPassword") Again Password label(for="newPassword") New Password
input.form-control(id="repeatPassword",type="password",name="repeatPassword",ng-model="obj.repeatPassword") input.form-control(id="newPassword",type="password",name="newPassword",ng-model="obj.password",ng-minlength="3")
button.btn.btn-primary(type="submit") .form-group(ng-class="{'has-error': (obj.password != obj.repeatPassword && addform.repeatPassword.$dirty)}")
span.glyphicon.glyphicon-floppy-disk label(for="repeatPassword") Again Password
| Save input.form-control(id="repeatPassword",type="password",name="repeatPassword",ng-model="obj.repeatPassword")
table.table.table-bordered(ng-table="tableParams") button.btn.btn-primary(type="submit")
tr(ng-hide='group.$hideRows',ng-repeat="item in $data") span.glyphicon.glyphicon-floppy-disk
td(data-title="'#'") {{item.ID}} | Save
td(data-title="'Username'", filter="{'username': 'text'}") table.table(ng-table="tableParams")
span(ng-if="!item.isEditing") {{item.username}} tr(ng-hide='group.$hideRows',ng-repeat="item in $data")
h4(ng-if="item.isEditing") Username: {{item.username}} td(data-title="'#'") {{item.ID}}
form(name="myform",ng-if="item.isEditing") td(data-title="'Username'", filter="{'username': 'text'}")
.form-group(ng-class="{'has-error': (error.fields.indexOf('username') >= 0 || !myform.username.$valid)}") span(ng-if="!item.isEditing") {{item.username}}
label(for="username") Username h4(ng-if="item.isEditing") Username: {{item.username}}
input.form-control(id="username",name="username",ng-model="item.username") form(name="myform",ng-if="item.isEditing",ng-submit="edit(item)")
.form-group(ng-class="{'has-error': (error.fields.indexOf('newpassword') >= 0 || !myform.newPassword.$valid)}") .form-group(ng-class="{'has-error': (error.fields.indexOf('username') >= 0 || !myform.username.$valid)}")
label(for="newPassword") New Password label(for="username") Username
input.form-control(id="newPassword",type="password",name="newPassword",ng-model="item.newPassword",ng-minlength="3") input.form-control(id="username",name="username",ng-model="item.username")
.form-group(ng-class="{'has-error': (item.newPassword != item.repeatPassword && myform.repeatPassword.$dirty)}") .form-group(ng-class="{'has-error': (error.fields.indexOf('newpassword') >= 0 || !myform.newPassword.$valid)}")
label(for="repeatPassword") Again Password label(for="newPassword") New Password
input.form-control(id="repeatPassword",type="password",name="repeatPassword",ng-model="item.repeatPassword") input.form-control(id="newPassword",type="password",name="newPassword",ng-model="item.newPassword",ng-minlength="3")
.form-group .form-group(ng-class="{'has-error': (item.newPassword != item.repeatPassword && myform.repeatPassword.$dirty)}")
label label(for="repeatPassword") Again Password
input(type="checkbox",ng-model="item.active") input.form-control(id="repeatPassword",type="password",name="repeatPassword",ng-model="item.repeatPassword")
| Active .form-group
.form-group label
label input(type="checkbox",ng-model="item.active")
input(type="checkbox",ng-model="item.superadmin") | Active
| Administrator .form-group
td(data-title="'Active'", filter="{'active': 'components/ngfilter-boolean.html'}") label
span.glyphicon.glyphicon-ok(ng-if="item.active") input(type="checkbox",ng-model="item.superadmin")
span.glyphicon.glyphicon-remove(ng-if="!item.active") | Administrator
td(data-title="'Administrator'", filter="{'superadmin': 'components/ngfilter-boolean.html'}") button.btn.btn-primary(type="submit")
span.glyphicon.glyphicon-ok(ng-if="item.superadmin") span.glyphicon.glyphicon-floppy-disk
span.glyphicon.glyphicon-remove(ng-if="!item.superadmin") | Save
td(data-title="'Option'") td(data-title="'Active'", filter="{'active': 'components/ngfilter-boolean.html'}")
.btn-group.btn-group-xs(ng-if="item.admin || item.createat >= item.lastloginat") span.glyphicon.glyphicon-ok(ng-if="item.active")
span.btn.btn-default(ng-click="item.isEditing = true",ng-if="!item.isEditing") span.glyphicon.glyphicon-remove(ng-if="!item.active")
span.glyphicon.glyphicon-pencil td(data-title="'Administrator'", filter="{'superadmin': 'components/ngfilter-boolean.html'}")
span.btn.btn-default(ng-click="edit(item)",ng-if="item.isEditing") span.glyphicon.glyphicon-ok(ng-if="item.superadmin")
span.glyphicon.glyphicon-remove-circle span.glyphicon.glyphicon-remove(ng-if="!item.superadmin")
span.btn.btn-default(ng-click="delete(item)") td(data-title="'Option'")
span.glyphicon.glyphicon-trash .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

31
public/app/web/blog.jade Normal file
View File

@ -0,0 +1,31 @@
.container
h1 Blogs
.row
ul.nav.nav-tabs
li(ng-repeat="item in bloglist", ng-class="{'active':item.ID == blog.ID}")
a(ui-sref="app.webS.blog.post({websiteid:websiteid, blogid:item.ID})",ui-sref-active="active") {{item.title}}
li
a(ui-sref="app.webS.blog({websiteid:websiteid, blogid:-1})")
span.glyphicon.glyphicon-plus
li(style="float:right")
a(ui-sref="app.webS.blog({websiteid:websiteid, blogid:blog.ID})",ui-sref-active="active")
span.glyphicon.glyphicon-cog
.row(ui-view="posts")
form(ng-submit="save()")
h3(ng-if="blog.ID") Edit
h3(ng-if="!blog.ID") New
.form-group
label(for="title") Title
input.form-control(id="title",ng-model="blog.title")
.form-group
label(for="url") URL
br
i (http(s)://DOMAIN/{{blog.url.path}})
input.form-control(id="url",ng-model="blog.url.path")
.form-group
label(for="posturl") Post URL Schema
.form-group
label(for="content") Content
div(id="content",text-angular,ta-text-editor-class="clearfix border-around" ta-html-editor-class="border-around",ng-model="blog.content")
input.btn.btn-default(type="submit",value="Save")
input.btn.btn-danger(ng-if="blog.ID",value="Delete",ng-click="delete(blog)")

51
public/app/web/blog.js Normal file
View File

@ -0,0 +1,51 @@
'use strict';
angular.module('warehost')
.controller('BlogWebCtrl',function(session,config,alert,NgTableParams,$scope,$rootScope,$http,$stateParams){
$scope.bloglist = [];
alert.set({});
$scope.blog = {};
$scope.websiteid = $stateParams.websiteid;
function resetBlog(){
$scope.blog = {};
}
function load(){
$http.get(config.api+'/web/website/'+$stateParams.websiteid+'/blog').then(function(res){
session.set(res);
resetBlog();
$scope.bloglist = res.data.data;
var blog;
for(blog in $scope.bloglist){
if(blog.ID === $stateParams.blogid) {
$scope.blog = blog;
return;
}
}
if($scope.bloglist.length > 0 && $stateParams.blogid !== '-1'){
$scope.blog = $scope.bloglist[0];
}
});
}
function submitresult(res){
session.set(res);
alert.set(res);
if(res.data.data){
load();
}
}
resetBlog();
load();
$rootScope.$on('warehost.session',load);
$scope.save = function(){
if($scope.blog.ID){
$http.patch(config.api+'/web/website/'+$stateParams.websiteid+'/blog/'+$scope.blog.ID,$scope.blog).then(submitresult);
}else{
$http.post(config.api+'/web/website/'+$stateParams.websiteid+'/blog',$scope.blog).then(submitresult);
}
};
$scope.delete = function(a){
$http.delete(config.api+'/web/website/'+$stateParams.websiteid+'/blog/'+a.ID).then(submitresult);
};
});

View File

@ -0,0 +1,31 @@
h2 Posts
.row
.well.col-md-3
.btn-toolbar
.btn-group
a.btn.btn-default(ng-click="add()")
span.glyphicon.glyphicon-plus
br
.list-group
.list-group-item(ng-repeat="item in data")
.angular-ui-tree-handle {{item.title}}
.pull-right.btn-group.btn-group-xs
a.btn.btn-default(ng-click="edit(item)")
span.glyphicon.glyphicon-pencil
a.btn.btn-default(ng-click="delete(item)")
span.glyphicon.glyphicon-remove
form.col-md-9(ng-submit="save()")
h3(ng-if="obj.ID") Edit
h3(ng-if="!obj.ID") New
.form-group
label(for="title") Title
input.form-control(id="title",ng-model="obj.title")
.form-group
label(for="url") URL
br
i (http(s)://DOMAIN/{{obj.url.path}})
input.form-control(id="url",ng-model="obj.url.path")
.form-group
label(for="content") Content
div(id="content",text-angular,ta-text-editor-class="clearfix border-around" ta-html-editor-class="border-around",ng-model="obj.content")
input.btn.btn-default(type="submit",value="Save")

View File

@ -1,19 +1,22 @@
.container .container
h1 Domains h1 Domains
a.btn.btn-default(ng-click="isAdding=true") .panel.panel-default
span.glyphicon.glyphicon-plus .panel-heading All
form.well(ng-submit="add()",name="addform",ng-if="isAdding") a.pull-right.btn.btn-default.btn-xs(ng-click="isAdding=true")
.form-group span.glyphicon.glyphicon-plus
label(for="domain") Domain .panel-body(ng-if="isAdding")
input.form-control(id="domain",name="domain",ng-model="obj.domain",ng-minlength="3") form(ng-submit="add()",name="addform")
button.btn.btn-primary(type="submit") .form-group
span.glyphicon.glyphicon-floppy-disk label(for="domain") Domain
| Save input.form-control(id="domain",name="domain",ng-model="obj.domain",ng-minlength="3")
table.table.table-bordered(ng-table="tableParams") button.btn.btn-primary(type="submit")
tr(ng-hide='group.$hideRows',ng-repeat="item in $data") span.glyphicon.glyphicon-floppy-disk
td(data-title="'Domain'") | Save
span(ng-if="!item.isEditing") {{item.name}} table.table(ng-table="tableParams")
td(data-title="'Option'") tr(ng-hide='group.$hideRows',ng-repeat="item in $data")
.btn-group.btn-group-xs td(data-title="'Domain'")
span.btn.btn-default(ng-click="delete(item)") span(ng-if="!item.isEditing") {{item.name}}
span.glyphicon.glyphicon-trash td(data-title="'Option'")
.btn-group.btn-group-xs
span.btn.btn-default(ng-click="delete(item)")
span.glyphicon.glyphicon-trash

View File

@ -50,6 +50,24 @@ angular.module('warehost')
} }
} }
}) })
.state('app.webS.blog', {
url:'/blog/:blogid',
views:{
'@app':{
templateUrl: 'app/web/blog.html',
controller:'BlogWebCtrl'
}
}
})
.state('app.webS.blog.post', {
url:'/post',
views:{
'posts':{
templateUrl: 'app/web/blogpost.html',
controller:'BlogWebCtrl'
}
}
})
.state('app.webS.permission', { .state('app.webS.permission', {
url:'/permission', url:'/permission',
views:{ views:{

View File

@ -1,34 +1,37 @@
.container .container
h1 Websites h1 Websites
div (where you are involved) div (where you are involved)
a.btn.btn-default(ng-click="isAdding=true") .panel.panel-default
span.glyphicon.glyphicon-plus .panel-heading All
form.well(ng-submit="add()",name="addform",ng-if="isAdding") a.pull-right.btn.btn-default.btn-xs(ng-click="isAdding=true")
.form-group span.glyphicon.glyphicon-plus
label(for="name") Name .panel-body(ng-if="isAdding")
input.form-control(id="name",name="name",ng-model="obj.name",ng-minlength="3") form(ng-submit="add()",name="addform")
button.btn.btn-primary(type="submit") .form-group
span.glyphicon.glyphicon-floppy-disk label(for="name") Name
| Save input.form-control(id="name",name="name",ng-model="obj.name",ng-minlength="3")
table.table.table-bordered(ng-table="tableParams") button.btn.btn-primary(type="submit")
tr(ng-hide='group.$hideRows',ng-repeat="item in $data") span.glyphicon.glyphicon-floppy-disk
td(data-title="'#'") {{item.website.ID}} | Save
td(data-title="'Name'") table.table(ng-table="tableParams")
span(ng-if="!item.isEditing") {{item.website.name}} tr(ng-hide='group.$hideRows',ng-repeat="item in $data")
form(name="myform",ng-if="item.isEditing",ng-submit="edit(item)") td(data-title="'#'") {{item.website.ID}}
.form-group(ng-class="{'has-error': (error.fields.indexOf('name') >= 0 || !myform.name.$valid)}") td(data-title="'Name'")
label(for="name") Name span(ng-if="!item.isEditing") {{item.website.name}}
input.form-control(id="name",name="name",ng-model="item.website.name") form(name="myform",ng-if="item.isEditing",ng-submit="edit(item)")
button.btn.btn-primary(type="submit") .form-group(ng-class="{'has-error': (error.fields.indexOf('name') >= 0 || !myform.name.$valid)}")
span.glyphicon.glyphicon-floppy-disk label(for="name") Name
| Save input.form-control(id="name",name="name",ng-model="item.website.name")
td(data-title="'Option'") button.btn.btn-primary(type="submit")
.btn-group.btn-group-xs span.glyphicon.glyphicon-floppy-disk
a.btn.btn-default(ui-sref="app.webS.page({websiteid:item.website.ID})") | Save
span.glyphicon.glyphicon-dashboard td(data-title="'Option'")
span.btn.btn-default(ng-click="item.isEditing = true",ng-if="!item.isEditing") .btn-group.btn-group-xs
span.glyphicon.glyphicon-pencil a.btn.btn-default(ui-sref="app.webS.blog.post({websiteid:item.website.ID})")
span.btn.btn-default(ng-click="edit(item)",ng-if="item.isEditing") span.glyphicon.glyphicon-dashboard
span.glyphicon.glyphicon-floppy-disk span.btn.btn-default(ng-click="item.isEditing = true",ng-if="!item.isEditing")
span.btn.btn-default(ng-click="delete(item)") span.glyphicon.glyphicon-pencil
span.glyphicon.glyphicon-trash span.btn.btn-default(ng-click="edit(item)",ng-if="item.isEditing")
span.glyphicon.glyphicon-floppy-disk
span.btn.btn-default(ng-click="delete(item)")
span.glyphicon.glyphicon-trash

View File

@ -10,7 +10,9 @@ ui.nav.navbar-nav
a(href="",ng-click="add()") Add a(href="",ng-click="add()") Add
li.dropdown-header Websites: li.dropdown-header Websites:
li(ng-repeat="item in list") li(ng-repeat="item in list")
a(ui-sref="app.webS.page({websiteid:item.website.ID})") {{item.website.name}} a(ui-sref="app.webS.blog.post({websiteid:item.website.ID})") {{item.website.name}}
li(ng-if="website.name")
a(ui-sref="app.webS.blog.post({websiteid:website.ID})") Blog
li(ng-if="website.name") li(ng-if="website.name")
a(ui-sref="app.webS.menu({websiteid:website.ID})") Menu a(ui-sref="app.webS.menu({websiteid:website.ID})") Menu
li(ng-if="website.name") li(ng-if="website.name")

View File

@ -1,20 +1,21 @@
.container .container
h1 Pages .page-header
h1 Pages
.row .row
.well.col-md-3(ui-tree) .col-md-3
.btn-toolbar .panel.panel-default
.btn-group .panel-heading Pages
a.btn.btn-default(ng-click="add()") a.pull-right.btn.btn-default.btn-xs(ng-click="add()")
span.glyphicon.glyphicon-plus span.glyphicon.glyphicon-plus
br table.table
.list-group tr(ng-repeat="item in data")
.list-group-item(ng-repeat="item in data") td {{item.title}}
.angular-ui-tree-handle {{item.title}} td
.pull-right.btn-group.btn-group-xs .pull-right.btn-group.btn-group-xs
a.btn.btn-default(ng-click="edit(item)") a.btn.btn-default(ng-click="edit(item)")
span.glyphicon.glyphicon-pencil span.glyphicon.glyphicon-pencil
a.btn.btn-default(ng-click="delete(item)") a.btn.btn-default(ng-click="delete(item)")
span.glyphicon.glyphicon-remove span.glyphicon.glyphicon-remove
form.col-md-9(ng-submit="save()") form.col-md-9(ng-submit="save()")
h3(ng-if="obj.ID") Edit h3(ng-if="obj.ID") Edit
h3(ng-if="!obj.ID") New h3(ng-if="!obj.ID") New
@ -28,5 +29,5 @@
input.form-control(id="url",ng-model="obj.url.path") input.form-control(id="url",ng-model="obj.url.path")
.form-group .form-group
label(for="content") Content label(for="content") Content
textarea.form-control(id="content",markdown-editor="{hiddenButtons:'cmdImage',addExtraButtons: true, resize: 'vertical'}",ng-model="obj.content",rows="10") div(id="content",text-angular,ta-text-editor-class="clearfix border-around" ta-html-editor-class="border-around",ng-model="obj.content")
input.btn.btn-default(type="submit",value="Save") input.btn.btn-default(type="submit",value="Save")

View File

@ -3,7 +3,6 @@
angular.module('warehost') angular.module('warehost')
.controller('PageWebCtrl',function(session,config,alert,NgTableParams,$scope,$rootScope,$http,$stateParams){ .controller('PageWebCtrl',function(session,config,alert,NgTableParams,$scope,$rootScope,$http,$stateParams){
$scope.data = []; $scope.data = [];
$scope.menulist = [];
alert.set({}); alert.set({});
$scope.obj = {}; $scope.obj = {};

View File

@ -1,22 +1,25 @@
.container .container
h1 Permissions h1 Permissions
a.btn.btn-default(ng-click="isAdding=true") .panel.panel-default
span.glyphicon.glyphicon-plus .panel-heading All
form.well(ng-submit="add()",name="addform",ng-if="isAdding") a.pull-right.btn.btn-default.btn-xs(ng-click="isAdding=true")
.form-group span.glyphicon.glyphicon-plus
ui-select(ng-model="obj.login",theme="bootstrap") .panel-body(ng-if="isAdding")
ui-select-match {{$select.selected.username}} form(ng-submit="add()",name="addform")
ui-select-choices(repeat="item in loginlist | filter: $select.search") .form-group
div(ng-bind-html="item.username | highlight: $select.search") ui-select(ng-model="obj.login",theme="bootstrap")
button.btn.btn-primary(type="submit") ui-select-match {{$select.selected.username}}
span.glyphicon.glyphicon-floppy-disk ui-select-choices(repeat="item in loginlist | filter: $select.search")
| Save div(ng-bind-html="item.username | highlight: $select.search")
table.table.table-bordered(ng-table="tableParams") button.btn.btn-primary(type="submit")
tr(ng-hide='group.$hideRows',ng-repeat="item in $data") span.glyphicon.glyphicon-floppy-disk
td(data-title="'#'") {{item.login.ID}} | Save
td(data-title="'Username'") table.table(ng-table="tableParams")
span(ng-if="!item.isEditing") {{item.login.username}} tr(ng-hide='group.$hideRows',ng-repeat="item in $data")
td(data-title="'Option'") td(data-title="'#'") {{item.login.ID}}
.btn-group.btn-group-xs td(data-title="'Username'")
span.btn.btn-default(ng-click="delete(item)") span(ng-if="!item.isEditing") {{item.login.username}}
span.glyphicon.glyphicon-trash td(data-title="'Option'")
.btn-group.btn-group-xs
span.btn.btn-default(ng-click="delete(item)")
span.glyphicon.glyphicon-trash

View File

@ -2,7 +2,7 @@
angular.module('config', []) angular.module('config', [])
.factory('config', function() { .factory('config', function() {
return { return {
api: 'https://api.warehost.de', api: 'http://[::1]:8080',
table: { table: {
count: 25 count: 25
} }

View File

@ -18,11 +18,11 @@
<link rel="stylesheet" href="bower_components/ng-table/dist/ng-table.css" /> <link rel="stylesheet" href="bower_components/ng-table/dist/ng-table.css" />
<link rel="stylesheet" href="bower_components/angular-ui-select/dist/select.css" /> <link rel="stylesheet" href="bower_components/angular-ui-select/dist/select.css" />
<link rel="stylesheet" href="bower_components/angular-ui-tree/dist/angular-ui-tree.css" /> <link rel="stylesheet" href="bower_components/angular-ui-tree/dist/angular-ui-tree.css" />
<link rel="stylesheet" href="bower_components/bootstrap-markdown/css/bootstrap-markdown.min.css" /> <link rel="stylesheet" href="bower_components/textAngular/dist/textAngular.css" />
<link rel="stylesheet" href="bower_components/angular-markdown-editor-ghiscoding/styles/angular-markdown-editor.css" />
<!-- endbower --> <!-- endbower -->
<link rel="stylesheet" href="bower_components/font-awesome/css/font-awesome.min.css" />
<link rel="stylesheet" href="bower_components/bootstrap/dist/css/bootstrap.min.css" /> <link rel="stylesheet" href="bower_components/bootstrap/dist/css/bootstrap.min.css" />
<link rel="stylesheet" href="bower_components/bootswatch/paper/bootstrap.min.css" /> <link rel="stylesheet" href="bower_components/bootswatch/united/bootstrap.min.css" />
<!-- endbuild --> <!-- endbuild -->
<!-- build:css({.tmp,public}) app/app.css --> <!-- build:css({.tmp,public}) app/app.css -->
<link rel="stylesheet" href="app/app.css"> <link rel="stylesheet" href="app/app.css">
@ -47,13 +47,16 @@
<script src="bower_components/ng-table/dist/ng-table.js"></script> <script src="bower_components/ng-table/dist/ng-table.js"></script>
<script src="bower_components/angular-ui-select/dist/select.js"></script> <script src="bower_components/angular-ui-select/dist/select.js"></script>
<script src="bower_components/angular-ui-tree/dist/angular-ui-tree.js"></script> <script src="bower_components/angular-ui-tree/dist/angular-ui-tree.js"></script>
<script src="bower_components/angular-highlightjs/build/angular-highlightjs.js"></script> <script src="bower_components/rangy/rangy-core.js"></script>
<script src="bower_components/marked/lib/marked.js"></script> <script src="bower_components/rangy/rangy-classapplier.js"></script>
<script src="bower_components/angular-marked/dist/angular-marked.js"></script> <script src="bower_components/rangy/rangy-highlighter.js"></script>
<script src="bower_components/bootstrap-markdown/js/bootstrap-markdown.js"></script> <script src="bower_components/rangy/rangy-selectionsaverestore.js"></script>
<script src="bower_components/angular-markdown-editor-ghiscoding/src/angular-markdown-editor.js"></script> <script src="bower_components/rangy/rangy-serializer.js"></script>
<script src="bower_components/rangy/rangy-textrange.js"></script>
<script src="bower_components/textAngular/dist/textAngular.js"></script>
<script src="bower_components/textAngular/dist/textAngular-sanitize.js"></script>
<script src="bower_components/textAngular/dist/textAngularSetup.js"></script>
<!-- endbower --> <!-- endbower -->
<script src="bower_components/angular-sanitize/angular-sanitize.js"></script>
<!-- endbuild --> <!-- endbuild -->
<!-- build:js({.tmp,public}) app/app.js --> <!-- build:js({.tmp,public}) app/app.js -->
<script src="app/app.js"></script> <script src="app/app.js"></script>
@ -73,6 +76,7 @@
<script src="app/main.js"></script> <script src="app/main.js"></script>
<script src="app/setting.js"></script> <script src="app/setting.js"></script>
<script src="app/user.js"></script> <script src="app/user.js"></script>
<script src="app/web/blog.js"></script>
<script src="app/web/domain.js"></script> <script src="app/web/domain.js"></script>
<script src="app/web/index.js"></script> <script src="app/web/index.js"></script>
<script src="app/web/list.js"></script> <script src="app/web/list.js"></script>