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,6 +1,7 @@
.container .container
h1 Database h1 Database
table.table.table-bordered(ng-table="tableParams") .panel.panel-default
table.table(ng-table="tableParams")
tr(ng-hide='group.$hideRows',ng-repeat="item in $data") tr(ng-hide='group.$hideRows',ng-repeat="item in $data")
td(data-title="'User'", filter="{'profil.login.username': 'text'}") {{item.profil.login.username}} td(data-title="'User'", filter="{'profil.login.username': 'text'}") {{item.profil.login.username}}
td(data-title="'Database/User'") td(data-title="'Database/User'")

View File

@ -1,6 +1,7 @@
.container .container
h1 Domains h1 Domains
table.table.table-bordered(ng-table="tableParams") .panel.panel-default
table.table(ng-table="tableParams")
tr(ng-hide='group.$hideRows',ng-repeat="item in $data") tr(ng-hide='group.$hideRows',ng-repeat="item in $data")
td(data-title="'User'", filter="{'profil.login.username': 'text'}") {{item.profil.login.username}} td(data-title="'User'", filter="{'profil.login.username': 'text'}") {{item.profil.login.username}}
td(data-title="'Domain'", filter="{'fqdn': 'text'}") td(data-title="'Domain'", filter="{'fqdn': 'text'}")

View File

@ -1,6 +1,7 @@
.container .container
h1 Profiles h1 Profiles
table.table.table-bordered(ng-table="tableParams") .panel.panel-default
table.table(ng-table="tableParams")
tr(ng-hide='group.$hideRows',ng-repeat="item in $data") tr(ng-hide='group.$hideRows',ng-repeat="item in $data")
td(data-title="'UserID'", filter="{'login.ID': 'text'}") {{item.login.ID}} td(data-title="'UserID'", filter="{'login.ID': 'text'}") {{item.login.ID}}
td(data-title="'User'", filter="{'login.username': 'text'}") {{item.login.username}} td(data-title="'User'", filter="{'login.username': 'text'}") {{item.login.username}}

View File

@ -1,8 +1,11 @@
.container .container
h1 Database h1 Database
a.btn.btn-default(ng-click="isAdding=true") .panel.panel-default
.panel-heading All
a.pull-right.btn.btn-default.btn-xs(ng-click="isAdding=true")
span.glyphicon.glyphicon-plus span.glyphicon.glyphicon-plus
form.well(ng-submit="add()",name="addform",ng-if="isAdding") .panel-body(ng-if="isAdding")
form(ng-submit="add()",name="addform")
.form-group .form-group
label(for="password") Password label(for="password") Password
input.form-control(id="password",name="password",ng-model="obj.password",ng-minlength="3") input.form-control(id="password",name="password",ng-model="obj.password",ng-minlength="3")
@ -12,7 +15,7 @@
button.btn.btn-primary(type="submit") button.btn.btn-primary(type="submit")
span.glyphicon.glyphicon-floppy-disk span.glyphicon.glyphicon-floppy-disk
| Save | Save
table.table.table-bordered(ng-table="tableParams") table.table(ng-table="tableParams")
tr(ng-hide='group.$hideRows',ng-repeat="item in $data") tr(ng-hide='group.$hideRows',ng-repeat="item in $data")
td(data-title="'Database/User'") td(data-title="'Database/User'")
span(ng-if="!item.isEditing") warehost_db{{item.ID}} span(ng-if="!item.isEditing") warehost_db{{item.ID}}

View File

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

View File

@ -1,8 +1,11 @@
.container .container
h1 Mail h1 Mail
a.btn.btn-default(ng-click="isAdding=true") .panel.panel-default
.panel-heading All
a.pull-right.btn.btn-default.btn-xs(ng-click="isAdding=true")
span.glyphicon.glyphicon-plus span.glyphicon.glyphicon-plus
form.well(ng-submit="add()",name="addform",ng-if="isAdding") .panel-body(ng-if="isAdding")
form(ng-submit="add()",name="addform")
.form-group .form-group
label(for="name") Name label(for="name") Name
.input-group .input-group
@ -28,7 +31,7 @@
button.btn.btn-primary(type="submit") button.btn.btn-primary(type="submit")
span.glyphicon.glyphicon-floppy-disk span.glyphicon.glyphicon-floppy-disk
| Save | Save
table.table.table-bordered(ng-table="tableParams") table.table(ng-table="tableParams")
tr(ng-hide='group.$hideRows',ng-repeat="item in $data") tr(ng-hide='group.$hideRows',ng-repeat="item in $data")
td(data-title="'Mail-Adresse'") td(data-title="'Mail-Adresse'")
span(ng-if="!item.isEditing") {{item.name}}@{{item.domain.fqdn}} span(ng-if="!item.isEditing") {{item.name}}@{{item.domain.fqdn}}

View File

@ -1,8 +1,11 @@
.container .container
h1 Web h1 Web
a.btn.btn-default(ng-click="isAdding=true") .panel.panel-default
.panel-heading All
a.pull-right.btn.btn-default.btn-xs(ng-click="isAdding=true")
span.glyphicon.glyphicon-plus span.glyphicon.glyphicon-plus
form.well(ng-submit="add()",name="addform",ng-if="isAdding") .panel-body(ng-if="isAdding")
form(ng-submit="add()",name="addform")
.form-group .form-group
label(for="subdomain") Subdomain label(for="subdomain") Subdomain
.input-group .input-group
@ -41,7 +44,7 @@
button.btn.btn-primary(type="submit") button.btn.btn-primary(type="submit")
span.glyphicon.glyphicon-floppy-disk span.glyphicon.glyphicon-floppy-disk
| Save | Save
table.table.table-bordered(ng-table="tableParams") table.table(ng-table="tableParams")
tr(ng-hide='group.$hideRows',ng-repeat="item in $data") tr(ng-hide='group.$hideRows',ng-repeat="item in $data")
td(data-title="'Domain'") td(data-title="'Domain'")
span(ng-if="!item.isEditing") span(ng-if="!item.isEditing")

View File

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

View File

@ -1,6 +1,7 @@
.container .container
h1 Settings h1 Settings
form.well(ng-submit="submit()",name="myform") .panel.panel-default
form.panel-body(ng-submit="submit()",name="myform")
.form-group .form-group
label(for="globalUsername") Username label(for="globalUsername") Username
input.form-control(id="globalUsername",ng-model="session.login.username",readonly) input.form-control(id="globalUsername",ng-model="session.login.username",readonly)

View File

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

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

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,16 +1,19 @@
.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
.panel-heading All
a.pull-right.btn.btn-default.btn-xs(ng-click="isAdding=true")
span.glyphicon.glyphicon-plus span.glyphicon.glyphicon-plus
form.well(ng-submit="add()",name="addform",ng-if="isAdding") .panel-body(ng-if="isAdding")
form(ng-submit="add()",name="addform")
.form-group .form-group
label(for="name") Name label(for="name") Name
input.form-control(id="name",name="name",ng-model="obj.name",ng-minlength="3") input.form-control(id="name",name="name",ng-model="obj.name",ng-minlength="3")
button.btn.btn-primary(type="submit") button.btn.btn-primary(type="submit")
span.glyphicon.glyphicon-floppy-disk span.glyphicon.glyphicon-floppy-disk
| Save | Save
table.table.table-bordered(ng-table="tableParams") table.table(ng-table="tableParams")
tr(ng-hide='group.$hideRows',ng-repeat="item in $data") tr(ng-hide='group.$hideRows',ng-repeat="item in $data")
td(data-title="'#'") {{item.website.ID}} td(data-title="'#'") {{item.website.ID}}
td(data-title="'Name'") td(data-title="'Name'")
@ -24,7 +27,7 @@
| Save | Save
td(data-title="'Option'") td(data-title="'Option'")
.btn-group.btn-group-xs .btn-group.btn-group-xs
a.btn.btn-default(ui-sref="app.webS.page({websiteid:item.website.ID})") a.btn.btn-default(ui-sref="app.webS.blog.post({websiteid:item.website.ID})")
span.glyphicon.glyphicon-dashboard span.glyphicon.glyphicon-dashboard
span.btn.btn-default(ng-click="item.isEditing = true",ng-if="!item.isEditing") span.btn.btn-default(ng-click="item.isEditing = true",ng-if="!item.isEditing")
span.glyphicon.glyphicon-pencil span.glyphicon.glyphicon-pencil

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,15 +1,16 @@
.container .container
.page-header
h1 Pages 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
@ -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,8 +1,11 @@
.container .container
h1 Permissions h1 Permissions
a.btn.btn-default(ng-click="isAdding=true") .panel.panel-default
.panel-heading All
a.pull-right.btn.btn-default.btn-xs(ng-click="isAdding=true")
span.glyphicon.glyphicon-plus span.glyphicon.glyphicon-plus
form.well(ng-submit="add()",name="addform",ng-if="isAdding") .panel-body(ng-if="isAdding")
form(ng-submit="add()",name="addform")
.form-group .form-group
ui-select(ng-model="obj.login",theme="bootstrap") ui-select(ng-model="obj.login",theme="bootstrap")
ui-select-match {{$select.selected.username}} ui-select-match {{$select.selected.username}}
@ -11,7 +14,7 @@
button.btn.btn-primary(type="submit") button.btn.btn-primary(type="submit")
span.glyphicon.glyphicon-floppy-disk span.glyphicon.glyphicon-floppy-disk
| Save | Save
table.table.table-bordered(ng-table="tableParams") table.table(ng-table="tableParams")
tr(ng-hide='group.$hideRows',ng-repeat="item in $data") tr(ng-hide='group.$hideRows',ng-repeat="item in $data")
td(data-title="'#'") {{item.login.ID}} td(data-title="'#'") {{item.login.ID}}
td(data-title="'Username'") td(data-title="'Username'")

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>