rewrite themen and blog
This commit is contained in:
parent
e7dc403ddc
commit
f07e4bece5
|
@ -20,11 +20,10 @@
|
|||
"bootswatch": "^3.3.7",
|
||||
"ng-table": "^1.0.0",
|
||||
"angular-ui-select": "^0.19.4",
|
||||
"angular-sanitize": "^1.5.8",
|
||||
"angular-ui-tree": "^2.21.2",
|
||||
"angular-markdown-editor-ghiscoding": "^1.0.7"
|
||||
"textAngular": "^1.5.16"
|
||||
},
|
||||
"resolutions":{
|
||||
"resolutions": {
|
||||
"angular": "1.6.0"
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,27 +1,19 @@
|
|||
'use strict';
|
||||
|
||||
angular.module('warehost', [
|
||||
'ngSanitize',
|
||||
'ui.router',
|
||||
'ui.bootstrap',
|
||||
'ui.select',
|
||||
'ui.tree',
|
||||
'hc.marked',
|
||||
'angular-markdown-editor',
|
||||
'textAngular',
|
||||
'ngTable',
|
||||
'config',
|
||||
'session',
|
||||
'alert'
|
||||
])
|
||||
.config(['$urlRouterProvider','$httpProvider','markedProvider',function($urlRouterProvider,$httpProvider,markedProvider){
|
||||
.config(['$urlRouterProvider','$httpProvider',function($urlRouterProvider,$httpProvider){
|
||||
$urlRouterProvider.otherwise('/');
|
||||
$httpProvider.defaults.withCredentials = true;
|
||||
// marked config
|
||||
markedProvider.setOptions({
|
||||
gfm: true,
|
||||
tables: true,
|
||||
sanitize: true
|
||||
});
|
||||
|
||||
// highlight config
|
||||
//hljsServiceProvider.setOptions({});
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
.container
|
||||
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")
|
||||
td(data-title="'User'", filter="{'profil.login.username': 'text'}") {{item.profil.login.username}}
|
||||
td(data-title="'Database/User'")
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
.container
|
||||
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")
|
||||
td(data-title="'User'", filter="{'profil.login.username': 'text'}") {{item.profil.login.username}}
|
||||
td(data-title="'Domain'", filter="{'fqdn': 'text'}")
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
.container
|
||||
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")
|
||||
td(data-title="'UserID'", filter="{'login.ID': 'text'}") {{item.login.ID}}
|
||||
td(data-title="'User'", filter="{'login.username': 'text'}") {{item.login.username}}
|
||||
|
|
|
@ -1,8 +1,11 @@
|
|||
.container
|
||||
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
|
||||
form.well(ng-submit="add()",name="addform",ng-if="isAdding")
|
||||
.panel-body(ng-if="isAdding")
|
||||
form(ng-submit="add()",name="addform")
|
||||
.form-group
|
||||
label(for="password") Password
|
||||
input.form-control(id="password",name="password",ng-model="obj.password",ng-minlength="3")
|
||||
|
@ -12,7 +15,7 @@
|
|||
button.btn.btn-primary(type="submit")
|
||||
span.glyphicon.glyphicon-floppy-disk
|
||||
| Save
|
||||
table.table.table-bordered(ng-table="tableParams")
|
||||
table.table(ng-table="tableParams")
|
||||
tr(ng-hide='group.$hideRows',ng-repeat="item in $data")
|
||||
td(data-title="'Database/User'")
|
||||
span(ng-if="!item.isEditing") warehost_db{{item.ID}}
|
||||
|
|
|
@ -1,8 +1,11 @@
|
|||
.container
|
||||
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
|
||||
form.well(ng-submit="add()",name="addform",ng-if="isAdding")
|
||||
.panel-body(ng-if="isAdding")
|
||||
form(ng-submit="add()",name="addform")
|
||||
.form-group
|
||||
label(for="domain") Domain
|
||||
input.form-control(id="domain",name="domain",ng-model="obj.fqdn",ng-minlength="3")
|
||||
|
@ -21,7 +24,7 @@
|
|||
button.btn.btn-primary(type="submit")
|
||||
span.glyphicon.glyphicon-floppy-disk
|
||||
| Save
|
||||
table.table.table-bordered(ng-table="tableParams")
|
||||
table.table(ng-table="tableParams")
|
||||
tr(ng-hide='group.$hideRows',ng-repeat="item in $data")
|
||||
td(data-title="'Domain'", filter="{'fqdn': 'text'}")
|
||||
span(ng-if="!item.isEditing") {{item.fqdn}}
|
||||
|
|
|
@ -1,8 +1,11 @@
|
|||
.container
|
||||
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
|
||||
form.well(ng-submit="add()",name="addform",ng-if="isAdding")
|
||||
.panel-body(ng-if="isAdding")
|
||||
form(ng-submit="add()",name="addform")
|
||||
.form-group
|
||||
label(for="name") Name
|
||||
.input-group
|
||||
|
@ -28,7 +31,7 @@
|
|||
button.btn.btn-primary(type="submit")
|
||||
span.glyphicon.glyphicon-floppy-disk
|
||||
| Save
|
||||
table.table.table-bordered(ng-table="tableParams")
|
||||
table.table(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}}
|
||||
|
|
|
@ -1,8 +1,11 @@
|
|||
.container
|
||||
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
|
||||
form.well(ng-submit="add()",name="addform",ng-if="isAdding")
|
||||
.panel-body(ng-if="isAdding")
|
||||
form(ng-submit="add()",name="addform")
|
||||
.form-group
|
||||
label(for="subdomain") Subdomain
|
||||
.input-group
|
||||
|
@ -41,7 +44,7 @@
|
|||
button.btn.btn-primary(type="submit")
|
||||
span.glyphicon.glyphicon-floppy-disk
|
||||
| Save
|
||||
table.table.table-bordered(ng-table="tableParams")
|
||||
table.table(ng-table="tableParams")
|
||||
tr(ng-hide='group.$hideRows',ng-repeat="item in $data")
|
||||
td(data-title="'Domain'")
|
||||
span(ng-if="!item.isEditing")
|
||||
|
|
|
@ -1,12 +1,16 @@
|
|||
.container
|
||||
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-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
|
||||
form.well(ng-submit="add()",name="addform",ng-if="isAdding")
|
||||
.form-group
|
||||
.panel-body(ng-if="isAdding")
|
||||
form(ng-submit="add()",name="addform")
|
||||
.form-group(ng-class="{'has-error': (error.fields.indexOf('username') >= 0 || !addform.username.$valid)}")
|
||||
label(for="username") Username
|
||||
input.form-control(id="username",name="username",ng-model="obj.username",ng-minlength="3")
|
||||
.form-group(ng-class="{'has-error': (error.fields.indexOf('newpassword') >= 0 || !addform.newPassword.$valid)}")
|
||||
|
@ -18,13 +22,13 @@
|
|||
button.btn.btn-primary(type="submit")
|
||||
span.glyphicon.glyphicon-floppy-disk
|
||||
| Save
|
||||
table.table.table-bordered(ng-table="tableParams")
|
||||
table.table(ng-table="tableParams")
|
||||
tr(ng-hide='group.$hideRows',ng-repeat="item in $data")
|
||||
td(data-title="'#'") {{item.invited.ID}}
|
||||
td(data-title="'Username'", filter="{'invited.username': 'text'}")
|
||||
span(ng-if="!item.isEditing") {{item.invited.username}}
|
||||
h4(ng-if="item.isEditing") Username: {{item.invited.username}}
|
||||
form(name="myform",ng-if="item.isEditing")
|
||||
form(name="myform",ng-if="item.isEditing",ng-submit="edit(item)")
|
||||
.form-group(ng-if="session.login.superadmin",ng-class="{'has-error': (error.fields.indexOf('username') >= 0 || !myform.username.$valid)}")
|
||||
label(for="username") Username
|
||||
input.form-control(id="username",name="username",ng-model="item.invited.username")
|
||||
|
@ -34,6 +38,9 @@
|
|||
.form-group(ng-class="{'has-error': (item.newPassword != item.repeatPassword && myform.repeatPassword.$dirty)}")
|
||||
label(for="repeatPassword") Again Password
|
||||
input.form-control(id="repeatPassword",type="password",name="repeatPassword",ng-model="item.repeatPassword")
|
||||
button.btn.btn-primary(type="submit")
|
||||
span.glyphicon.glyphicon-floppy-disk
|
||||
| Save
|
||||
td(data-title="'Administrator'", filter="{'admin': 'components/ngfilter-boolean.html'}")
|
||||
span.glyphicon.glyphicon-ok(ng-if="item.admin")
|
||||
span.glyphicon.glyphicon-remove(ng-if="!item.admin")
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
.container
|
||||
h1 Settings
|
||||
form.well(ng-submit="submit()",name="myform")
|
||||
.panel.panel-default
|
||||
form.panel-body(ng-submit="submit()",name="myform")
|
||||
.form-group
|
||||
label(for="globalUsername") Username
|
||||
input.form-control(id="globalUsername",ng-model="session.login.username",readonly)
|
||||
|
|
|
@ -1,11 +1,14 @@
|
|||
.container
|
||||
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
|
||||
form.well(ng-submit="add()",name="addform",ng-if="isAdding")
|
||||
.form-group
|
||||
.panel-body(ng-if="isAdding")
|
||||
form(ng-submit="add()",name="addform")
|
||||
.form-group(ng-class="{'has-error': (error.fields.indexOf('username') >= 0 || !addform.username.$valid)}")
|
||||
label(for="username") Username
|
||||
input.form-control(id="username",name="username",ng-model="obj.username",ng-minlength="3")
|
||||
input.form-control(id="username",name="username",ng-minlength="3",ng-model="obj.username")
|
||||
.form-group(ng-class="{'has-error': (error.fields.indexOf('newpassword') >= 0 || !addform.newPassword.$valid)}")
|
||||
label(for="newPassword") New Password
|
||||
input.form-control(id="newPassword",type="password",name="newPassword",ng-model="obj.password",ng-minlength="3")
|
||||
|
@ -15,13 +18,13 @@
|
|||
button.btn.btn-primary(type="submit")
|
||||
span.glyphicon.glyphicon-floppy-disk
|
||||
| Save
|
||||
table.table.table-bordered(ng-table="tableParams")
|
||||
table.table(ng-table="tableParams")
|
||||
tr(ng-hide='group.$hideRows',ng-repeat="item in $data")
|
||||
td(data-title="'#'") {{item.ID}}
|
||||
td(data-title="'Username'", filter="{'username': 'text'}")
|
||||
span(ng-if="!item.isEditing") {{item.username}}
|
||||
h4(ng-if="item.isEditing") Username: {{item.username}}
|
||||
form(name="myform",ng-if="item.isEditing")
|
||||
form(name="myform",ng-if="item.isEditing",ng-submit="edit(item)")
|
||||
.form-group(ng-class="{'has-error': (error.fields.indexOf('username') >= 0 || !myform.username.$valid)}")
|
||||
label(for="username") Username
|
||||
input.form-control(id="username",name="username",ng-model="item.username")
|
||||
|
@ -39,6 +42,9 @@
|
|||
label
|
||||
input(type="checkbox",ng-model="item.superadmin")
|
||||
| Administrator
|
||||
button.btn.btn-primary(type="submit")
|
||||
span.glyphicon.glyphicon-floppy-disk
|
||||
| Save
|
||||
td(data-title="'Active'", filter="{'active': 'components/ngfilter-boolean.html'}")
|
||||
span.glyphicon.glyphicon-ok(ng-if="item.active")
|
||||
span.glyphicon.glyphicon-remove(ng-if="!item.active")
|
||||
|
|
|
@ -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)")
|
|
@ -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);
|
||||
};
|
||||
});
|
|
@ -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")
|
|
@ -1,15 +1,18 @@
|
|||
.container
|
||||
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
|
||||
form.well(ng-submit="add()",name="addform",ng-if="isAdding")
|
||||
.panel-body(ng-if="isAdding")
|
||||
form(ng-submit="add()",name="addform")
|
||||
.form-group
|
||||
label(for="domain") Domain
|
||||
input.form-control(id="domain",name="domain",ng-model="obj.domain",ng-minlength="3")
|
||||
button.btn.btn-primary(type="submit")
|
||||
span.glyphicon.glyphicon-floppy-disk
|
||||
| Save
|
||||
table.table.table-bordered(ng-table="tableParams")
|
||||
table.table(ng-table="tableParams")
|
||||
tr(ng-hide='group.$hideRows',ng-repeat="item in $data")
|
||||
td(data-title="'Domain'")
|
||||
span(ng-if="!item.isEditing") {{item.name}}
|
||||
|
|
|
@ -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', {
|
||||
url:'/permission',
|
||||
views:{
|
||||
|
|
|
@ -1,16 +1,19 @@
|
|||
.container
|
||||
h1 Websites
|
||||
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
|
||||
form.well(ng-submit="add()",name="addform",ng-if="isAdding")
|
||||
.panel-body(ng-if="isAdding")
|
||||
form(ng-submit="add()",name="addform")
|
||||
.form-group
|
||||
label(for="name") Name
|
||||
input.form-control(id="name",name="name",ng-model="obj.name",ng-minlength="3")
|
||||
button.btn.btn-primary(type="submit")
|
||||
span.glyphicon.glyphicon-floppy-disk
|
||||
| Save
|
||||
table.table.table-bordered(ng-table="tableParams")
|
||||
table.table(ng-table="tableParams")
|
||||
tr(ng-hide='group.$hideRows',ng-repeat="item in $data")
|
||||
td(data-title="'#'") {{item.website.ID}}
|
||||
td(data-title="'Name'")
|
||||
|
@ -24,7 +27,7 @@
|
|||
| Save
|
||||
td(data-title="'Option'")
|
||||
.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.btn.btn-default(ng-click="item.isEditing = true",ng-if="!item.isEditing")
|
||||
span.glyphicon.glyphicon-pencil
|
||||
|
|
|
@ -10,7 +10,9 @@ ui.nav.navbar-nav
|
|||
a(href="",ng-click="add()") Add
|
||||
li.dropdown-header Websites:
|
||||
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")
|
||||
a(ui-sref="app.webS.menu({websiteid:website.ID})") Menu
|
||||
li(ng-if="website.name")
|
||||
|
|
|
@ -1,15 +1,16 @@
|
|||
.container
|
||||
.page-header
|
||||
h1 Pages
|
||||
.row
|
||||
.well.col-md-3(ui-tree)
|
||||
.btn-toolbar
|
||||
.btn-group
|
||||
a.btn.btn-default(ng-click="add()")
|
||||
.col-md-3
|
||||
.panel.panel-default
|
||||
.panel-heading Pages
|
||||
a.pull-right.btn.btn-default.btn-xs(ng-click="add()")
|
||||
span.glyphicon.glyphicon-plus
|
||||
br
|
||||
.list-group
|
||||
.list-group-item(ng-repeat="item in data")
|
||||
.angular-ui-tree-handle {{item.title}}
|
||||
table.table
|
||||
tr(ng-repeat="item in data")
|
||||
td {{item.title}}
|
||||
td
|
||||
.pull-right.btn-group.btn-group-xs
|
||||
a.btn.btn-default(ng-click="edit(item)")
|
||||
span.glyphicon.glyphicon-pencil
|
||||
|
@ -28,5 +29,5 @@
|
|||
input.form-control(id="url",ng-model="obj.url.path")
|
||||
.form-group
|
||||
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")
|
||||
|
|
|
@ -3,7 +3,6 @@
|
|||
angular.module('warehost')
|
||||
.controller('PageWebCtrl',function(session,config,alert,NgTableParams,$scope,$rootScope,$http,$stateParams){
|
||||
$scope.data = [];
|
||||
$scope.menulist = [];
|
||||
alert.set({});
|
||||
$scope.obj = {};
|
||||
|
||||
|
|
|
@ -1,8 +1,11 @@
|
|||
.container
|
||||
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
|
||||
form.well(ng-submit="add()",name="addform",ng-if="isAdding")
|
||||
.panel-body(ng-if="isAdding")
|
||||
form(ng-submit="add()",name="addform")
|
||||
.form-group
|
||||
ui-select(ng-model="obj.login",theme="bootstrap")
|
||||
ui-select-match {{$select.selected.username}}
|
||||
|
@ -11,7 +14,7 @@
|
|||
button.btn.btn-primary(type="submit")
|
||||
span.glyphicon.glyphicon-floppy-disk
|
||||
| Save
|
||||
table.table.table-bordered(ng-table="tableParams")
|
||||
table.table(ng-table="tableParams")
|
||||
tr(ng-hide='group.$hideRows',ng-repeat="item in $data")
|
||||
td(data-title="'#'") {{item.login.ID}}
|
||||
td(data-title="'Username'")
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
angular.module('config', [])
|
||||
.factory('config', function() {
|
||||
return {
|
||||
api: 'https://api.warehost.de',
|
||||
api: 'http://[::1]:8080',
|
||||
table: {
|
||||
count: 25
|
||||
}
|
||||
|
|
|
@ -18,11 +18,11 @@
|
|||
<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-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/angular-markdown-editor-ghiscoding/styles/angular-markdown-editor.css" />
|
||||
<link rel="stylesheet" href="bower_components/textAngular/dist/textAngular.css" />
|
||||
<!-- 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/bootswatch/paper/bootstrap.min.css" />
|
||||
<link rel="stylesheet" href="bower_components/bootswatch/united/bootstrap.min.css" />
|
||||
<!-- endbuild -->
|
||||
<!-- build:css({.tmp,public}) 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/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-highlightjs/build/angular-highlightjs.js"></script>
|
||||
<script src="bower_components/marked/lib/marked.js"></script>
|
||||
<script src="bower_components/angular-marked/dist/angular-marked.js"></script>
|
||||
<script src="bower_components/bootstrap-markdown/js/bootstrap-markdown.js"></script>
|
||||
<script src="bower_components/angular-markdown-editor-ghiscoding/src/angular-markdown-editor.js"></script>
|
||||
<script src="bower_components/rangy/rangy-core.js"></script>
|
||||
<script src="bower_components/rangy/rangy-classapplier.js"></script>
|
||||
<script src="bower_components/rangy/rangy-highlighter.js"></script>
|
||||
<script src="bower_components/rangy/rangy-selectionsaverestore.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 -->
|
||||
<script src="bower_components/angular-sanitize/angular-sanitize.js"></script>
|
||||
<!-- endbuild -->
|
||||
<!-- build:js({.tmp,public}) app/app.js -->
|
||||
<script src="app/app.js"></script>
|
||||
|
@ -73,6 +76,7 @@
|
|||
<script src="app/main.js"></script>
|
||||
<script src="app/setting.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/index.js"></script>
|
||||
<script src="app/web/list.js"></script>
|
||||
|
|
Reference in New Issue