diff options
author | root | 2019-02-19 18:53:50 +0100 |
---|---|---|
committer | root | 2019-02-19 18:53:50 +0100 |
commit | 0ad4c0f8196b61699754762aacbaab0223478ab9 (patch) | |
tree | de434c4aea8d07ecd01cd3badd48d057d62c2d1b /modules-available/locations/templates | |
parent | [usb-lock-off] Edit rule cleanup and fix of the dropdown boxes. (diff) | |
parent | [statistics] Fix RAM change warning to handle increase too (diff) | |
download | slx-admin-usb-lock-off.tar.gz slx-admin-usb-lock-off.tar.xz slx-admin-usb-lock-off.zip |
Merge branch 'master' into usb-lock-offusb-lock-off
Diffstat (limited to 'modules-available/locations/templates')
-rw-r--r-- | modules-available/locations/templates/location-subnets.html | 44 | ||||
-rw-r--r-- | modules-available/locations/templates/locations.html | 50 | ||||
-rw-r--r-- | modules-available/locations/templates/subnets.html | 8 |
3 files changed, 64 insertions, 38 deletions
diff --git a/modules-available/locations/templates/location-subnets.html b/modules-available/locations/templates/location-subnets.html index 2cc8e98b..69e369c2 100644 --- a/modules-available/locations/templates/location-subnets.html +++ b/modules-available/locations/templates/location-subnets.html @@ -8,17 +8,17 @@ <button type="submit" class="btn btn-primary">Save</button> </div> <div class="row"> - <div class="{{^editAllowed}}disabled{{/editAllowed}}"> + <div> <div class="col-sm-6"> <div class="input-group"> <span class="input-group-addon slx-ga">{{lang_name}}</span> - <input class="form-control" type="text" name="locationname" value="{{locationname}}" pattern=".*\S.*"> + <input {{perms.location.edit.name.disabled}} class="form-control" type="text" name="locationname" value="{{locationname}}" pattern=".*\S.*"> </div> </div> <div class="col-sm-6"> <div class="input-group"> <span class="input-group-addon slx-ga2">{{lang_parentLocation}}</span> - <select class="form-control" name="parentlocationid"> + <select class="form-control" name="parentlocationid" {{perms.location.edit.parent.disabled}}> {{#parents}} <option {{disabled}} value="{{locationid}}" {{#selected}}selected="selected"{{/selected}}>{{locationpad}} {{locationname}}</option> {{/parents}} @@ -40,11 +40,11 @@ {{#list}} <tr class="cidrmagic"> <td>{{subnetid}}</td> - <td class="{{^editSubnetAllowed}}disabled{{/editSubnetAllowed}}"><input class="form-control cidrstart" type="text" name="startaddr[{{subnetid}}]" value="{{startaddr}}" pattern="\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}"></td> - <td class="{{^editSubnetAllowed}}disabled{{/editSubnetAllowed}}"><input class="form-control cidrend" type="text" name="endaddr[{{subnetid}}]" value="{{endaddr}}" pattern="\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}"></td> + <td><input {{perms.location.edit.subnets.disabled}} class="form-control cidrstart" type="text" name="startaddr[{{subnetid}}]" value="{{startaddr}}" pattern="\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}"></td> + <td><input {{perms.location.edit.subnets.disabled}} class="form-control cidrend" type="text" name="endaddr[{{subnetid}}]" value="{{endaddr}}" pattern="\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}"></td> <td class="danger"> <div class="checkbox text-center" style="margin-left: 9px"> - <input {{^deleteSubnetAllowed}}disabled{{/deleteSubnetAllowed}} type="checkbox" name="deletesubnet[{{subnetid}}]" value="on"> + <input {{perms.location.edit.subnets.disabled}} type="checkbox" name="deletesubnet[{{subnetid}}]" value="on"> <label class="text-left"></label> </div> </td> @@ -52,7 +52,7 @@ {{/list}} <tr id="loc-sub-{{locationid}}"> <td colspan="4"> - <button {{^addSubnetAllowed}}disabled{{/addSubnetAllowed}} class="btn btn-success btn-sm pull-right" type="button" onclick="slxAddSubnetRow(this, {{locationid}})" title="{{lang_addNewSubnet}}"> + <button {{perms.location.edit.subnets.disabled}} class="btn btn-success btn-sm pull-right" type="button" onclick="slxAddSubnetRow(this, {{locationid}})" title="{{lang_addNewSubnet}}"> <span class="glyphicon glyphicon-plus"></span> {{lang_subnet}} </button> </td> @@ -69,24 +69,30 @@ {{/haveDozmod}} {{#haveStatistics}} <div> - <span class="slx-ga2">{{lang_matchingMachines}}:</span> <a href="?do=Statistics&show=list&filters=location={{locationid}}">{{machines}} / {{machines_online}} / {{machines_used}} ({{used_percent}}%)</a> + <span class="slx-ga2">{{lang_matchingMachines}}:</span> + {{#statsLink}} + <a href="?do=Statistics&show={{statsLink}}&filters=location={{locationid}}"> + {{/statsLink}} + {{machines}} / {{machines_online}} / {{machines_used}} ({{used_percent}}%) + {{#statsLink}} + </a> + {{/statsLink}} </div> {{/haveStatistics}} </div> <div class="col-md-4 text-center"> - <div class="btn-group"> - {{#roomplanner}} - <a class="btn btn-default" href="?do=roomplanner&locationid={{locationid}}" target="_blank" - onclick="window.open(this.href, '_blank', 'toolbar=0,scrollbars,resizable');return false"> - <span class="glyphicon glyphicon-move"></span> {{lang_editRoomplan}} - </a> - {{/roomplanner}} - </div> - + {{#roomplanner}} + <a class="btn btn-default" href="?do=roomplanner&locationid={{locationid}}" target="_blank" + onclick="window.open(this.href, '_blank', 'toolbar=0,scrollbars,resizable');return false"> + <span class="glyphicon glyphicon-move"></span> + {{^perms.roomplanner.edit.disabled}}{{lang_editRoomplan}}{{/perms.roomplanner.edit.disabled}} + {{#perms.roomplanner.edit.disabled}}{{lang_showRoomplan}}{{/perms.roomplanner.edit.disabled}} + </a> + {{/roomplanner}} </div> <div class="col-md-4 text-right"> - <button style="margin-right: 10px" {{^deleteAllowed}}disabled{{/deleteAllowed}} 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}}')" {{^saveButton}}disabled{{/saveButton}} type="button" class="btn btn-primary"><span class="glyphicon glyphicon-floppy-disk"></span> {{lang_save}}</button> + <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> </div> diff --git a/modules-available/locations/templates/locations.html b/modules-available/locations/templates/locations.html index be3d5115..06d32020 100644 --- a/modules-available/locations/templates/locations.html +++ b/modules-available/locations/templates/locations.html @@ -1,7 +1,13 @@ <div> <div class="btn-group pull-right"> - <a href="?do=Locations&action=showlocations" class="btn btn-default active"><span class="glyphicon glyphicon-home"></span> {{lang_thisListByLocation}}</a> - <a href="?do=Locations&action=showsubnets" class="btn btn-default"><span class="glyphicon glyphicon-list-alt"></span> {{lang_thisListBySubnet}}</a> + <a href="?do=Locations&action=showlocations" class="btn btn-default active"> + <span class="glyphicon glyphicon-home"></span> + {{lang_thisListByLocation}} + </a> + <a href="?do=Locations&action=showsubnets" class="btn btn-default {{perms.subnets.edit.disabled}}"> + <span class="glyphicon glyphicon-list-alt"></span> + {{lang_thisListBySubnet}} + </a> </div> <h1>{{lang_locationsMainHeading}}</h1> @@ -31,15 +37,25 @@ <th class="text-nowrap"> {{#havesysconfig}}{{lang_sysConfig}}{{/havesysconfig}} </th> + <th class="text-nowrap"> + {{#haveipxe}}{{lang_bootMenu}}{{/haveipxe}} + </th> </tr> {{#list}} <tr> <td> <div style="display:inline-block;width:{{depth}}em"></div> - <a href="#" class="{{linkClass}}" onclick="slxOpenLocation(this, {{locationid}}); return false">{{locationname}}{{^linkClass}} <b class="caret"></b>{{/linkClass}}</a> + {{#show-only}} + <span>{{locationname}}</span> + {{/show-only}} + {{^show-only}} + <a href="#" onclick="slxOpenLocation(this, {{locationid}}); return false"> + {{locationname}} + <b class="caret"></b> + </a> + {{/show-only}} </td> <td class="text-nowrap" align="right"> - {{^linkClass}} {{#havestatistics}} <a href="?do=Statistics&show=list&filters=location={{locationid}}"> {{clientCount}} </a> <span style="display:inline-block;width:5ex"> @@ -48,17 +64,13 @@ {{/hasChild}} </span> {{/havestatistics}} - {{/linkClass}} </td> <td class="text-nowrap" align="right"> - {{^linkClass}} {{#havestatistics}} {{clientLoad}} {{/havestatistics}} - {{/linkClass}} </td> - <td class="text-nowrap"> - {{^linkClass}} + <td class="text-nowrap {{overriddenClass}}"> {{#havebaseconfig}} <div class="pull-right" style="z-index:-1"> <a class="btn btn-default btn-xs" href="?do=baseconfig&module=locations&locationid={{locationid}}"><span class="glyphicon glyphicon-edit"></span></a> @@ -67,10 +79,8 @@ {{lang_overrideCount}}: {{overriddenVars}}   {{/overriddenVars}} {{/havebaseconfig}} - {{/linkClass}} </td> <td class="text-nowrap"> - {{^linkClass}} {{#havesysconfig}} <div class="pull-right"> <a class="btn btn-default btn-xs" href="?do=sysconfig&locationid={{locationid}}"><span class="glyphicon glyphicon-edit"></span></a> @@ -79,7 +89,16 @@ {{configName}}   </span> {{/havesysconfig}} - {{/linkClass}} + </td> + <td class="text-nowrap"> + {{#haveipxe}} + <div class="pull-right"> + <a class="btn btn-default btn-xs" href="?do=serversetup&show=assignlocation&locationid={{locationid}}"><span class="glyphicon glyphicon-edit"></span></a> + </div> + <span class="{{customMenuClass}}"> + {{customMenu}}   + </span> + {{/haveipxe}} </td> </tr> {{/list}} @@ -90,9 +109,10 @@ <a href="?do=Statistics&show=list&filters=location=0"> {{unassignedCount}} </a> + <span style="display:inline-block;width:5ex"></span> </td> <td class="text-nowrap" align="right"> - {{clientLoad}} + {{unassignedLoad}} </td> <td></td> <td>{{defaultConfig}}</td> @@ -106,7 +126,7 @@ <tr id="lasttr"> <td width="60%"> </td> <td class="text-right" colspan="2"> - <button {{^addAllowed}}disabled{{/addAllowed}} class="btn btn-success" type="button" onclick="slxAddLocationRow()"> + <button {{perms.location.add.disabled}} class="btn btn-success" type="button" onclick="slxAddLocationRow()"> <span class="glyphicon glyphicon-plus"></span> {{lang_location}} </button> <button id="saveLocationRows" type="submit" class="btn btn-primary collapse"> @@ -163,7 +183,7 @@ function slxOpenLocation(e, lid) { } return; } - var td = $('<td>').attr('colspan', '5').css('padding', '0px 0px 12px'); + var td = $('<td>').attr('colspan', '6').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/subnets.html b/modules-available/locations/templates/subnets.html index cb7fb758..d027d800 100644 --- a/modules-available/locations/templates/subnets.html +++ b/modules-available/locations/templates/subnets.html @@ -17,9 +17,9 @@ {{#list}} <tr class="cidrmagic"> <td>{{subnetid}}</td> - <td class="{{^editThisSubnetAllowed}}disabled{{/editThisSubnetAllowed}}"><input class="form-control cidrstart" type="text" name="startaddr[{{subnetid}}]" value="{{startaddr}}"></td> - <td class="{{^editThisSubnetAllowed}}disabled{{/editThisSubnetAllowed}}"><input class="form-control cidrend" type="text" name="endaddr[{{subnetid}}]" value="{{endaddr}}"></td> - <td class="{{^deleteThisSubnetAllowed}}disabled{{/deleteThisSubnetAllowed}}"> + <td><input class="form-control cidrstart" type="text" name="startaddr[{{subnetid}}]" value="{{startaddr}}"></td> + <td><input class="form-control cidrend" type="text" name="endaddr[{{subnetid}}]" value="{{endaddr}}"></td> + <td> <select class="form-control" name="location[{{subnetid}}]"> {{#locations}} <option {{disabled}} value="{{locationid}}" {{#selected}}selected="selected"{{/selected}}>{{locationpad}} {{locationname}}</option> @@ -30,7 +30,7 @@ {{/list}} </table> <div class="text-right" style="margin-bottom: 20px"> - <button {{^editSubnetAllowed}}disabled{{/editSubnetAllowed}} type="submit" class="btn btn-primary"><span class="glyphicon glyphicon-floppy-disk"></span> {{lang_save}}</button> + <button type="submit" class="btn btn-primary"><span class="glyphicon glyphicon-floppy-disk"></span> {{lang_save}}</button> </div> </form> </div> |