summaryrefslogtreecommitdiffstats
path: root/modules-available/locations/templates
diff options
context:
space:
mode:
Diffstat (limited to 'modules-available/locations/templates')
-rw-r--r--modules-available/locations/templates/ajax-opening-location.html55
-rw-r--r--modules-available/locations/templates/location-subnets.html23
-rw-r--r--modules-available/locations/templates/locations.html107
-rw-r--r--modules-available/locations/templates/mismatch-cleanup.html24
4 files changed, 105 insertions, 104 deletions
diff --git a/modules-available/locations/templates/ajax-opening-location.html b/modules-available/locations/templates/ajax-opening-location.html
index a2bb357d..861bef65 100644
--- a/modules-available/locations/templates/ajax-opening-location.html
+++ b/modules-available/locations/templates/ajax-opening-location.html
@@ -1,5 +1,10 @@
<div>
- <h3>{{lang_openingTime}}</h3>
+ <h4>{{lang_openingTime}}</h4>
+ <div class="checkbox">
+ <input id="oi{{id}}" class="openingtimes-inherited"
+ type="checkbox" name="openingtimes-inherited" value="1" {{openingtimes_inherited}}>
+ <label for="oi{{id}}">{{lang_inheritOpeningTimes}}</label>
+ </div>
{{^expertMode}}
<div class="simple-mode">
@@ -124,18 +129,18 @@
</div>
{{#rebootcontrol}}
-<hr>
+<h4>{{lang_automatedMachineActions}}</h4>
<div class="row wol">
<div class="col-sm-4">
<div class="checkbox checkbox-inline">
- <input id="wol-check-{{id}}" name="wol" type="checkbox" {{#wol}}checked{{/wol}}>
+ <input id="wol-check-{{id}}" name="wol" type="checkbox" {{#scheduler-options.wol}}checked{{/scheduler-options.wol}}>
<label for="wol-check-{{id}}">{{lang_wakeonlan}}</label>
</div>
</div>
<div class="col-sm-8">
<div class="input-group">
<input disabled type="number" id="wol-offset-{{id}}" name="wol-offset" class="form-control"
- value="{{wol-options.wol-offset}}" placeholder="0" min="0" max="15">
+ value="{{scheduler-options.wol-offset}}" placeholder="0" min="0" max="60">
<span class="input-group-addon slx-ga2">
<label for="wol-offset-{{id}}">{{lang_offsetEarly}}</label>
</span>
@@ -145,23 +150,46 @@
<div class="row shutdown">
<div class="col-sm-4">
<div class="checkbox checkbox-inline">
- <input id="sd-check-{{id}}" name="sd" type="checkbox" {{#sd}}checked{{/sd}}>
+ <input id="sd-check-{{id}}" name="sd" type="checkbox" {{#scheduler-options.sd}}checked{{/scheduler-options.sd}}>
<label for="sd-check-{{id}}">{{lang_shutdown}}</label>
</div>
</div>
<div class="col-sm-8">
<div class="input-group">
<input disabled type="number" id="sd-offset-{{id}}" name="sd-offset" class="form-control"
- value="{{sd-options.sd-offset}}" placeholder="0" min="0" max="15">
+ value="{{scheduler-options.sd-offset}}" placeholder="0" min="0" max="60">
<span class="input-group-addon slx-ga2">
<label for="sd-offset-{{id}}">{{lang_offsetLate}}</label>
</span>
</div>
</div>
</div>
+<h4>{{lang_remoteAccessConstraints}}</h4>
+<div class="slx-smallspace">
+ <div class="radio">
+ <input id="ra-ALWAYS-check-{{id}}" name="ra-mode" value="ALWAYS" type="radio"
+ {{scheduler_ALWAYS_checked}}>
+ <label for="ra-ALWAYS-check-{{id}}">{{lang_remoteAccessNoRestriction}}</label>
+ </div>
+</div>
+<div class="slx-smallspace">
+ <div class="radio">
+ <input id="ra-SELECTIVE-check-{{id}}" name="ra-mode" value="SELECTIVE" type="radio"
+ {{scheduler_SELECTIVE_checked}}>
+ <label for="ra-SELECTIVE-check-{{id}}">{{lang_remoteAccessOnlyWhenClosed}}</label>
+ </div>
+</div>
+<div class="slx-smallspace">
+ <div class="radio">
+ <input id="ra-NEVER-check-{{id}}" name="ra-mode" value="NEVER" type="radio"
+ {{scheduler_NEVER_checked}}>
+ <label for="ra-NEVER-check-{{id}}">{{lang_remoteAccessNever}}</label>
+ </div>
+</div>
+<p><i>{{lang_remoteAccessHelp}}</i></p>
{{/rebootcontrol}}
-<script type="application/javascript">
+<script>
(function() {
var $loc = $('#openingTimesModal{{id}}');
@@ -204,6 +232,7 @@
$loc.find('.new-openingtime').click(function (e) {
e.preventDefault();
setTimepicker(newOpeningTime($loc, {}).find('.timepicker2'));
+ setInputEnabled();
});
$loc.find('.btn-show-expert').click(function (e) {
@@ -214,9 +243,21 @@
}
$loc.find('.simple-mode').remove();
$loc.find('.expert-mode').show();
+ setInputEnabled();
});
$loc.find('form').submit(validateOpeningTimes);
+ var setInputEnabled = function () {
+ $loc.find('.expert-mode input, .simple-mode input').prop('disabled', $inheritCb.is(':checked') ? 'disabled' : false);
+ };
+ var $inheritCb = $loc.find('.openingtimes-inherited');
+ setInputEnabled();
+ $inheritCb.change(setInputEnabled);
+ $loc.find('.new-openingtime').click(function (e) {
+ if ($inheritCb.is(':checked')) {
+ $inheritCb.click();
+ }
+ });
})();
</script>
diff --git a/modules-available/locations/templates/location-subnets.html b/modules-available/locations/templates/location-subnets.html
index e954bf10..976c3cc7 100644
--- a/modules-available/locations/templates/location-subnets.html
+++ b/modules-available/locations/templates/location-subnets.html
@@ -62,7 +62,7 @@
<div class="slx-bold">{{lang_locationInfo}}</div>
<div class="row">
- <div class="col-md-3">
+ <div class="col-md-5">
{{#haveDozmod}}
<div>
<span class="slx-ga2">{{lang_referencingLectures}}:</span> {{lectures}}
@@ -80,14 +80,23 @@
{{/statsLink}}
</div>
{{/haveStatistics}}
+ {{#next_action}}
+ <div>
+ {{lang_nextEvent}}: {{next_action}} – {{next_time}}
+ </div>
+ {{/next_action}}
</div>
- <div class="col-md-3 text-center">
- <button type="button" class="btn btn-default" data-toggle="modal" data-target="#openingTimesModal{{locationid}}" onclick="loadOpeningTimes('{{locationid}}')">
+ <div class="col-md-7 text-right">
+ <button {{perms.location.edit.openingtimes.disabled}} type="button" class="btn btn-default" data-toggle="modal" data-target="#openingTimesModal{{locationid}}" onclick="loadOpeningTimes('{{locationid}}')">
<span class="glyphicon glyphicon-time"></span>
{{lang_openingTime}}
</button>
- </div>
- <div class="col-md-3 text-center">
+ {{#news}}
+ <a class="btn btn-default" href="?do=news&amp;locationid={{locationid}}">
+ <span class="glyphicon glyphicon-pencil"></span>
+ {{lang_editNews}}
+ </a>
+ {{/news}}
{{#roomplanner}}
<a class="btn btn-default" href="?do=roomplanner&amp;locationid={{locationid}}" target="_blank"
onclick="window.open(this.href, '_blank', 'toolbar=0,scrollbars,resizable');return false">
@@ -96,8 +105,6 @@
{{#perms.roomplanner.edit.disabled}}{{lang_showRoomplan}}{{/perms.roomplanner.edit.disabled}}
</a>
{{/roomplanner}}
- </div>
- <div class="col-md-3 text-right">
<button {{perms.location.delete.disabled}} type="button" class="btn btn-danger" data-toggle="modal" data-target="#deleteLocationModal{{locationid}}"><span class="glyphicon glyphicon-trash"></span> {{lang_deleteLocation}}</button>
<button onclick="deleteSubnetWarning('{{locationid}}')" {{perms.save_button.disabled}} type="button" class="btn btn-primary"><span class="glyphicon glyphicon-floppy-disk"></span> {{lang_save}}</button>
</div>
@@ -149,7 +156,7 @@
<input type="hidden" name="openingtimes" value="">
<input type="hidden" name="locationid" value="{{locationid}}">
- <div class="modal-header">{{locationname}}</div>
+ <div class="modal-header"><h3>{{locationname}}</h3></div>
<div class="modal-body"></div>
<div class="modal-footer">
<button type="button" class="btn btn-default" data-dismiss="modal">{{lang_close}}</button>
diff --git a/modules-available/locations/templates/locations.html b/modules-available/locations/templates/locations.html
index 125c101a..efd48216 100644
--- a/modules-available/locations/templates/locations.html
+++ b/modules-available/locations/templates/locations.html
@@ -31,21 +31,11 @@
<table class="table table-condensed table-hover locations" style="margin-bottom:0">
<tr>
<th width="100%">{{lang_locationName}}</th>
- <th>
- {{#havestatistics}}{{lang_machineCount}}{{/havestatistics}}
- </th>
- <th>
- {{#havestatistics}}{{lang_machineLoad}}{{/havestatistics}}
- </th>
- <th class="text-nowrap">
- {{#havebaseconfig}}{{lang_editConfigVariables}}{{/havebaseconfig}}
- </th>
+ {{#plugins}}
<th class="text-nowrap">
- {{#havesysconfig}}{{lang_sysConfig}}{{/havesysconfig}}
- </th>
- <th class="text-nowrap">
- {{#haveipxe}}{{lang_bootMenu}}{{/haveipxe}}
+ {{header}}
</th>
+ {{/plugins}}
</tr>
{{#list}}
<tr>
@@ -61,85 +51,30 @@
</a>
{{/show-only}}
</td>
- <td class="text-nowrap" align="right">
- {{#havestatistics}}
- <a href="?do=Statistics&amp;show=list&amp;filters=location={{locationid}}">&nbsp;{{clientCount}}&nbsp;</a>
- <span style="display:inline-block;width:5ex">
- {{#hasChild}}
- (<a href="?do=Statistics&amp;show=list&amp;filters=location~{{locationid}}">&downarrow;{{clientCountSum}}</a>)
- {{/hasChild}}
- </span>
- {{/havestatistics}}
- </td>
- <td class="text-nowrap load-col" {{#clientCount}} style="background:linear-gradient(to right, #f97, #f97 {{clientLoad}}%, #6fa {{clientLoad}}%, #6fa {{clientIdle}}%, #eee {{clientIdle}}%)"{{/clientCount}}>
- {{#clientCount}}
- {{clientLoad}}&thinsp;%
- {{/clientCount}}
- </td>
- <td class="text-nowrap {{overriddenClass}}">
- {{#havebaseconfig}}
- <div class="pull-right" style="z-index:-1">
- <a class="btn btn-default btn-xs" href="?do=baseconfig&amp;module=locations&amp;locationid={{locationid}}"><span class="glyphicon glyphicon-edit"></span></a>
- </div>
- {{#overriddenVars}}
- <span class="badge" title="{{lang_overridenVarsForLocation}}">
- <span class="glyphicon glyphicon-home"></span> {{.}}
- </span>
- {{/overriddenVars}}
- {{#machineVarsOverrideCount}}
- <span class="badge" title="{{lang_numMachinesWithOverrides}}">
- <span class="glyphicon glyphicon-tasks"></span> {{.}}
- </span>
- {{/machineVarsOverrideCount}}
- &emsp;&emsp;
- {{/havebaseconfig}}
- </td>
- <td class="text-nowrap">
- {{#havesysconfig}}
- <div class="pull-right">
- <a class="btn btn-default btn-xs" href="?do=sysconfig&amp;locationid={{locationid}}"><span class="glyphicon glyphicon-edit"></span></a>
- </div>
- <span class="{{configClass}}">
- {{configName}}&emsp;&emsp;
- </span>
- {{/havesysconfig}}
- </td>
- <td class="text-nowrap">
- {{#haveipxe}}
- <div class="pull-right">
- <a class="btn btn-default btn-xs" href="?do=serversetup&amp;show=assignlocation&amp;locationid={{locationid}}"><span class="glyphicon glyphicon-edit"></span></a>
- </div>
- <span class="{{customMenuClass}}">
- {{customMenu}}&emsp;&emsp;
- </span>
- {{/haveipxe}}
+ {{#plugins}}
+ <td>
+ <table width="100%"><tr>
+ <td class="text-nowrap {{class}}">{{{html}}}</td>
+ {{#url}}
+ <td class="edit-btn">
+ <a class="btn btn-default btn-xs" href="{{.}}">
+ <span class="glyphicon glyphicon-edit"></span>
+ </a>
+ </td>
+ {{/url}}
+ </tr></table>
</td>
+ {{/plugins}}
</tr>
{{/list}}
- {{#unassignedCount}}
<tr>
<td>{{lang_unassignedMachines}}</td>
- <td class="text-nowrap" align="right">
- <a href="?do=Statistics&amp;show=list&amp;filters=location=0">
- &nbsp;{{unassignedCount}}&nbsp;
- </a>
- <span style="display:inline-block;width:5ex"></span>
- </td>
- <td class="text-nowrap load-col"{{#unassignedCount}} style="background:linear-gradient(to right, #f97, #f97 {{unassignedLoad}}%, #6fa {{unassignedLoad}}%, #6fa {{unassignedIdle}}%, #eee {{unassignedIdle}}%)"{{/unassignedCount}}>
- {{#unassignedCount}}
- {{unassignedLoad}}&thinsp;%
- {{/unassignedCount}}
- </td>
- <td>
- {{#unassignedOverrides}}
- <span class="badge" title="{{lang_numMachinesWithOverrides}}">
- <span class="glyphicon glyphicon-tasks"></span> {{.}}
- </span>
- {{/unassignedOverrides}}
+ {{#plugins}}
+ <td class="text-nowrap">
+ {{{propagateDefaultHtml}}}
</td>
- <td>{{defaultConfig}}</td>
+ {{/plugins}}
</tr>
- {{/unassignedCount}}
</table>
<form method="post" action="?do=Locations">
<input type="hidden" name="token" value="{{token}}">
@@ -214,7 +149,7 @@ function slxOpenLocation(e, lid) {
}
return;
}
- var td = $('<td>').attr('colspan', '6').css('padding', '0px 0px 12px');
+ var td = $('<td>').attr('colspan', '{{colspan}}').css('padding', '0px 0px 12px');
var tr = $('<tr>').attr('id', 'location-details-' + lid);
tr.append(td);
$(e).closest('tr').addClass('active slx-bold').after(tr);
diff --git a/modules-available/locations/templates/mismatch-cleanup.html b/modules-available/locations/templates/mismatch-cleanup.html
index a6f45d27..53a956df 100644
--- a/modules-available/locations/templates/mismatch-cleanup.html
+++ b/modules-available/locations/templates/mismatch-cleanup.html
@@ -32,7 +32,7 @@
<tr>
<td>
<div class="checkbox checkbox-inline">
- <input id="machine-{{machineuuid}}" type="checkbox" name="machines[]" value="{{machineuuid}}" {{disabled}}>
+ <input class="mcb {{#canmove}}cmov{{/canmove}}" id="machine-{{machineuuid}}" type="checkbox" name="machines[]" value="{{machineuuid}}" {{disabled}}>
<label for="machine-{{machineuuid}}">{{hostname}}{{^hostname}}{{clientip}}{{/hostname}}</label>
</div>
</td>
@@ -60,10 +60,28 @@
<span class="glyphicon glyphicon-repeat"></span>
{{lang_resetMachines}}
</button>
- <button type="submit" class="btn btn-success" name="action" value="movemachines">
+ {{#canmove}}
+ <button id="btn-move" type="submit" class="btn btn-success" name="action" value="movemachines">
<span class="glyphicon glyphicon-arrow-right"></span>
{{lang_moveMachines}}
</button>
+ {{/canmove}}
</div>
</form>
-<div class="clearfix"></div> \ No newline at end of file
+<div class="clearfix"></div>
+
+<script>
+ document.addEventListener('DOMContentLoaded', function () {
+ var $btn = $('#btn-move');
+ if ($btn.length === 0)
+ return;
+ var ccheck = function() {
+ var $e = $('input.mcb:checked');
+ var nope = $e.is(':not(.cmov)');
+ var yep = $e.is('.cmov');
+ $btn.prop('disabled', nope || !yep);
+ };
+ ccheck();
+ $('input.mcb').change(ccheck);
+ });
+</script> \ No newline at end of file