diff options
author | Simon Rettberg | 2016-05-03 19:03:09 +0200 |
---|---|---|
committer | Simon Rettberg | 2016-05-03 19:03:09 +0200 |
commit | 50404f3b23b7fd6aeae4c9d2f6df0ea25e984e66 (patch) | |
tree | 05e99fdffa696434960d7c77966c0bc36d6339e8 /modules-available/sysconfignew/templates/_pagenew.html | |
parent | Second half of merge.... (diff) | |
download | slx-admin-50404f3b23b7fd6aeae4c9d2f6df0ea25e984e66.tar.gz slx-admin-50404f3b23b7fd6aeae4c9d2f6df0ea25e984e66.tar.xz slx-admin-50404f3b23b7fd6aeae4c9d2f6df0ea25e984e66.zip |
WIP
Diffstat (limited to 'modules-available/sysconfignew/templates/_pagenew.html')
-rw-r--r-- | modules-available/sysconfignew/templates/_pagenew.html | 190 |
1 files changed, 190 insertions, 0 deletions
diff --git a/modules-available/sysconfignew/templates/_pagenew.html b/modules-available/sysconfignew/templates/_pagenew.html new file mode 100644 index 00000000..98881ae3 --- /dev/null +++ b/modules-available/sysconfignew/templates/_pagenew.html @@ -0,0 +1,190 @@ +<div class="row"> + <div class="col-md-6"> + <div class="panel panel-default"> + <div class="panel-heading" > + <div class="panel-title">{{lang_configurations}}</div> + </div> + <div class="panel-body"> + {{lang_configsDescription}} + </div> + <table class="table table-striped"> + <thead> + <th style="width: 70%">{{lang_configName}}</th> + <th></th> + <th></th> + </thead> + <tbody> + {{#configs}} + <tr> + <td>{{name}}</td> + <td> + <button type="button" class="btn btn-xs btn-primary" onclick="loadConfig('{{name}}')" data-toggle="modal" data-target="#edit-modal" > + <span class="glyphicon glyphicon-edit" aria-hidden="true"></span> + {{lang_edit}} + </button> + </td> + <td> + <button type="button" class="btn btn-xs btn-danger"> + <span class="glyphicon glyphicon-remove" aria-hidden="true"></span> + {{lang_remove}} + </button> + </td> + </tr> + {{/configs}} + </tbody> + </table> + <div class="panel-footer"> + <button id="new-config-button" type="button" class="btn btn-primary" data-toggle="modal" data-target="#new-config-modal" > + <span class="glyphicon glyphicon-plus" aria-hidden="true"></span> + {{lang_newConfig}} + </button> + </div> + </div> + </div> + <div class="col-md-6"> + <div class="panel panel-default"> + <div class="panel-heading" > + <div class="panel-title">{{lang_modules}}</div> + </div> + <div class="panel-body"> + {{lang_modulesDescription}} + </div> + <table class="table table-striped"> + <thead> + <th style="width: 70%">{{lang_configName}}</th> + <th></th> + <th></th> + </thead> + <tbody> + {{#modules}} + <tr> + <td>{{name}}</td> + <td> + <button type="button" class="btn btn-xs btn-primary" onclick="loadModule('{{name}}')" > + <span class="glyphicon glyphicon-edit" aria-hidden="true"></span> + {{lang_edit}} + </button> + </td> + <td> + <button type="button" class="btn btn-xs btn-danger"> + <span class="glyphicon glyphicon-remove" aria-hidden="true"></span> + {{lang_remove}} + </button> + </td> + </tr> + {{/modules}} + </tbody> + </table> + <div class="panel-footer"> + <button id="new-module-button" type="button" class="btn btn-primary" data-toggle="modal" data-target="#new-module-modal" > + <span class="glyphicon glyphicon-plus" aria-hidden="true"></span> + {{lang_newModule}} + </button> + </div> + </div> + </div> +</div> + +<!-- Generic modal, will have its content changed dynamically --> +<div class="modal fade" id="edit-modal" tabindex="-1" role="dialog" aria-labelledby="edit-modal-label" aria-hidden="true"> + <div class="modal-dialog"> + <div class="modal-content"> + <!-- Header --> + <div class="modal-header" id="edit-modal-header"> + <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span></button> + <h4 class="modal-title" id="edit-modal-label">{{lang_compilingIpxe}}</h4> + </div> + <!-- Body --> + <div class="modal-body" id="edit-modal-body" style="overflow: auto;"> + {{lang_loading}} <img src='fonts/loader.gif'/> + + </div> + <!-- Footer --> + <div class="modal-footer"> + <button type="button" class="btn btn-default" data-dismiss="modal">{{lang_cancel}}</button> + <button type="button" class="btn btn-primary" disabled="disabled">{{lang_save}}</button> + </div> + </div> + </div> +</div> + +<!-- New config modal --> +<form action="" method="POST"> + <div class="modal fade" id="new-config-modal" tabindex="-1" role="dialog" aria-labelledby="new-config-modal-label" aria-hidden="true"> + <form action="#" method="post"> + <div class="modal-dialog"> + <div class="modal-content"> + <!-- Header --> + <div class="modal-header"> + <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span></button> + <h4 class="modal-title" id="new-config-modal-label">{{lang_compilingIpxe}}</h4> + </div> + <!-- Body --> + <div class="modal-body" id="new-config-modal-body" style="overflow: auto;"> + <div> + <label for="new-config-name">{{lang_name}}</label> + <input type="text" name="new-config-name" class="form-control"> + </div> + <hr> + <div> + <label>{{lang_modules}}</label> + </div> + {{#modules}} + <button name="{{name}}" type='button' class='select-item' onclick='select(this)' >{{name}}</button> + {{/modules}} + </div> + <!-- Footer --> + <div class="modal-footer"> + <button type="button" class="btn btn-default" data-dismiss="modal">{{lang_cancel}}</button> + <input type="submit" class="btn btn-primary" value="{{lang_create}}"> + </div> + </div> + </div> + </form> + </div> +</form> +<!-- New module modal --> +<div class="modal fade" id="new-module-modal" tabindex="-1" role="dialog" aria-labelledby="new-module-modal-label" aria-hidden="true"> + <form action="#" method="post"> + <div class="modal-dialog"> + <div class="modal-content"> + <!-- Header --> + <div class="modal-header"> + <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span></button> + <h4 class="modal-title" id="new-module-modal-label">{{lang_compilingIpxe}}</h4> + </div> + <!-- Body --> + <div class="modal-body" id="new-module-modal-body"> + <textarea class="form-control" style="resize:none"></textarea> + </div> + <!-- Footer --> + <div class="modal-footer"> + <button type="button" class="btn btn-default" data-dismiss="modal">{{lang_cancel}}</button> + <button type="button" class="btn btn-primary" disabled="disabled">{{lang_save}}</button> + </div> + </div> + </div> + </form> +</div> + + +<script> + function loadConfig(config){ + $.ajax({ + method: "GET", + url: "?do=SysConfig", + data: { request:"configs", async: "True", config: config } + }).done(function( msg ) { + $("#edit-modal-body").html( msg ); + $("#edit-modal-header").html( '<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span></button> <h4 class="modal-title" id="edit-modal-label">' + config + '</h4>' ); + }); + } + + function loadModule(module){ + window.location = "?do=SysConfig&module=" + module; + } + + function select(element){0 + element.className = (element.className == 'select-item') ? 'select-item select-item-selected' : 'select-item'; + } +</script>
\ No newline at end of file |