ConfigPage continuation

This commit is contained in:
Ziver Koc 2015-09-26 21:19:24 +00:00
parent e3497c4718
commit 224372f0ad
7 changed files with 448 additions and 55 deletions

View file

@ -4,31 +4,43 @@
<div class="panel-body">
<table class="table table-hover">
<thead><tr>
{{#headers}}<th>Service</th>{{#headers}}
{{#params}}<th>{{.getNiceName()}}</th>{{/params}}
</tr></thead>
{{#data}}
<tr {{^.enabled}}class="active"{{/.enabled}}>
{{#params}}
<tr {{#.disabled}}class="active"{{/.disabled}}>
{{#.getConfiguration()}}
<td>
{{#.isTypeBoolean()}}
<input type="checkbox" {{#.getValue()}}checked{{/.getValue()}} disabled />
<input type="checkbox" {{#.getBoolean()}}checked{{/.getBoolean()}} disabled />
{{/.isTypeBoolean()}}
{{^.isTypeBoolean()}}{{.getValue()}}{{/.isTypeBoolean()}}
{{^.isTypeBoolean()}}{{.getString()}}{{/.isTypeBoolean()}}
</td>
{{/params}}
{{/.getConfiguration()}}
<td class="text-right">
<button type="button" class="btn btn-primary btn-xs">Edit</button>
{{^.enabled}}<button type="button" class="btn btn-default btn-xs">Disable</button>{{/.enabled}}
{{#.enabled}}<button type="button" class="btn btn-success btn-xs">Activate</button>{{/.enabled}}
<button type="button" class="btn btn-danger btn-xs">Remove</button>
<button type="button" class="btn btn-primary btn-xs" title="Edit">
<span class="glyphicon glyphicon-wrench" aria-hidden="true"></span>&nbsp;
</button>
{{^.enabled}}
<button type="button" class="btn btn-default btn-xs" title="Disable">
<span class="glyphicon glyphicon-ban-circle" aria-hidden="true"></span>&nbsp;
</button>
{{/.enabled}}
{{#.enabled}}
<button type="button" class="btn btn-success btn-xs" title="Activate">
<span class="glyphicon glyphicon-ok-circle" aria-hidden="true"></span>&nbsp;
</button>
{{/.enabled}}
<button type="button" class="btn btn-danger btn-xs" title="Remove">
<span class="glyphicon glyphicon-remove" aria-hidden="true"></span>&nbsp;
</button>
</td>
</tr>
{{/data}}
</table>
</div>
<div class="panel-footer text-right">
<button type="button" class="btn btn-primary">Cancel</button>
<button type="button" class="btn btn-success">Save</button>
<div class="panel-footer clearfix">
<button type="button" class="btn btn-default pull-left" data-toggle="modal" data-target="#configureModal">+</button>
<button type="button" class="btn btn-primary pull-right">Apply Configuration</button>
</div>
</div>
</div>
@ -43,38 +55,33 @@
</div>
<div class="modal-body">
<form class="form-horizontal">
{{#params}}
<div class="form-group">
<label for="inputEmail" class="control-label col-xs-2">Email</label>
<div class="col-xs-10">
<input type="email" class="form-control" id="inputEmail" placeholder="Email">
</div>
</div>
<div class="form-group">
<label for="inputPassword" class="control-label col-xs-2">Password</label>
<div class="col-xs-10">
<input type="password" class="form-control" id="inputPassword" placeholder="Password">
</div>
</div>
<div class="form-group">
<label for="ccheckbox" class="control-label col-xs-2">ccheckbox</label>
<div class="col-xs-10">
<input type="checkbox" class="form-control" id="ccheckbox" placeholder="">
</div>
</div>
<div class="form-group">
<label for="sselect" class="control-label col-xs-2">sselect</label>
<label for="{{.getName()}}" class="control-label col-xs-2">{{.getNiceName()}}</label>
<div class="col-xs-10">
{{#.isTypeString()}}
<input type="text" class="form-control" id="{{.getName()}}">
{{/.isTypeString()}}
{{#.isTypeInt()}}
<input type="number" class="form-control" id="{{.getName()}}">
{{/.isTypeInt()}}
{{#.isTypeBoolean()}}
<input type="checkbox" class="form-control" id="{{.getName()}}">
{{/.isTypeBoolean()}}
<!--
<select class="form-control" id="sselect" placeholder="">
<option value="volvo">-- Chose an Option --</option>
<option value="saab">Saab</option>
</select>
-->
</div>
</div>
{{/params}}
</form>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-default" data-dismiss="modal">Cancel</button>
<button type="button" class="btn btn-primary">Save</button>
<button type="submit" class="btn btn-success">Save</button>
</div>
</div>
</div>