WiP on namespaces and users
This commit is contained in:
parent
432e6ffaeb
commit
1b73282e90
18 changed files with 513 additions and 0 deletions
39
views/namespaces/edit.hbs
Normal file
39
views/namespaces/edit.hbs
Normal file
|
@ -0,0 +1,39 @@
|
|||
<ol class="breadcrumb">
|
||||
<li><a href="/">{{#translate}}Home{{/translate}}</a></li>
|
||||
<li>{{#translate}}Namespaces{{/translate}}</li>
|
||||
<li class="active">{{#translate}}Edit Namespace{{/translate}}</li>
|
||||
</ol>
|
||||
|
||||
<div class="pull-right">
|
||||
<a class="btn btn-primary" href="/reports/create" role="button"><i class="glyphicon glyphicon-plus"></i> {{#translate}}Create Namespace{{/translate}}</a>
|
||||
</div>
|
||||
|
||||
<h2>{{#translate}}Namespaces{{/translate}}</h2>
|
||||
|
||||
<hr>
|
||||
|
||||
<form method="post" class="delete-form" id="namespaces-delete" action="/namespaces/delete">
|
||||
<input type="hidden" name="_csrf" value="{{csrfToken}}">
|
||||
<input type="hidden" name="id" value="{{id}}" />
|
||||
</form>
|
||||
|
||||
<form class="form-horizontal" method="post" action="/namespaces/edit">
|
||||
<input type="hidden" name="_csrf" value="{{csrfToken}}">
|
||||
<input type="hidden" name="id" value="{{id}}" />
|
||||
|
||||
<div>
|
||||
|
||||
|
||||
|
||||
<hr/>
|
||||
|
||||
<div class="form-group">
|
||||
<div class="col-sm-offset-2 col-sm-10">
|
||||
<div class="pull-right">
|
||||
<button type="submit" form="namespaces-delete" class="btn btn-danger"><i class="glyphicon glyphicon-remove"></i> {{#translate}}Delete Namespace{{/translate}}</button>
|
||||
</div>
|
||||
<button type="submit" class="btn btn-primary"><i class="glyphicon glyphicon-ok"></i> {{#translate}}Update{{/translate}}</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
111
views/namespaces/namespaces.hbs
Normal file
111
views/namespaces/namespaces.hbs
Normal file
|
@ -0,0 +1,111 @@
|
|||
<ol class="breadcrumb">
|
||||
<li><a href="/">{{#translate}}Home{{/translate}}</a></li>
|
||||
<li class="active">{{#translate}}Namespaces{{/translate}}</li>
|
||||
</ol>
|
||||
|
||||
<div class="pull-right">
|
||||
<a class="btn btn-primary" href="/reports/create" role="button"><i class="glyphicon glyphicon-plus"></i> {{#translate}}Create Namespace{{/translate}}</a>
|
||||
</div>
|
||||
|
||||
<h2>{{#translate}}Namespaces{{/translate}}</h2>
|
||||
|
||||
<hr>
|
||||
|
||||
<div id="tree">
|
||||
</div>
|
||||
|
||||
<div id="treetable-container" style="height: 100px; overflow: auto;">
|
||||
<table id="treetable" class="table table-hover table-striped table-condensed">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Name</th>
|
||||
<th>B</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td></td>
|
||||
<td></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
document.addEventListener('DOMContentLoaded', function() {
|
||||
|
||||
glyph_opts = {
|
||||
map: {
|
||||
expanderClosed: 'glyphicon glyphicon-menu-right',
|
||||
expanderLazy: 'glyphicon glyphicon-menu-right', // glyphicon-plus-sign
|
||||
expanderOpen: 'glyphicon glyphicon-menu-down', // glyphicon-collapse-down
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
$('#tree').fancytree({
|
||||
extensions: ['glyph'],
|
||||
glyph: glyph_opts,
|
||||
selectMode: 1,
|
||||
icon: false,
|
||||
autoScroll: true,
|
||||
source: [
|
||||
{title: 'A', key: '1', expanded: true},
|
||||
{title: 'B', key: '2', expanded: true, folder: true, children: [
|
||||
{title: 'BA', key: '3', expanded: true, folder: true, children: [
|
||||
{title: 'BAA', key: '4', expanded: true},
|
||||
{title: 'BAB', key: '5', expanded: true}
|
||||
]},
|
||||
{title: 'BB', key: '6', expanded: true, folder: true, children: [
|
||||
{title: 'BBA', key: '7', expanded: true},
|
||||
{title: 'BBB', key: '8', expanded: true}
|
||||
]}
|
||||
]}
|
||||
]
|
||||
});
|
||||
|
||||
/*
|
||||
$('#treetable').fancytree({
|
||||
extensions: ['glyph', 'table'],
|
||||
glyph: glyph_opts,
|
||||
selectMode: 1,
|
||||
icon: false,
|
||||
autoScroll: true,
|
||||
scrollParent: $("#treetable-container"),
|
||||
source: [
|
||||
{title: 'A', key: '1', expanded: true},
|
||||
{title: 'B', key: '2', expanded: true, folder: true, children: [
|
||||
{title: 'BA', key: '3', expanded: true, folder: true, children: [
|
||||
{title: 'BAA', key: '4', expanded: true},
|
||||
{title: 'BAB', key: '5', expanded: true}
|
||||
]},
|
||||
{title: 'BB', key: '6', expanded: true, folder: true, children: [
|
||||
{title: 'BBA', key: '7', expanded: true},
|
||||
{title: 'BBB', key: '8', expanded: true}
|
||||
]}
|
||||
]}
|
||||
],
|
||||
table: {
|
||||
nodeColumnIdx: 0
|
||||
}
|
||||
});
|
||||
*/
|
||||
|
||||
$('#treetable').fancytree({
|
||||
extensions: ['glyph', 'table'],
|
||||
glyph: glyph_opts,
|
||||
selectMode: 1,
|
||||
icon: false,
|
||||
autoScroll: true,
|
||||
scrollParent: $("#treetable-container"),
|
||||
source: {
|
||||
url: "/namespaces/list/ajax",
|
||||
cache: true
|
||||
},
|
||||
table: {
|
||||
nodeColumnIdx: 0
|
||||
}
|
||||
});
|
||||
|
||||
});
|
||||
</script>
|
Loading…
Add table
Add a link
Reference in a new issue