Files
powerfulcomputermanager/admin/templates/admingroups.tmpl
2020-09-11 15:05:11 +02:00

63 lines
2.2 KiB
Cheetah

{# -*- coding: utf-8 -*- #}
{% extends 'baseadmin.tmpl' %}
{% block content %}
<!-- Modal Add New Group -->
<div class="modal fade" id="modalCreateGroup" tabindex="-1" role="dialog" aria-labelledby="modalCreateGroupLabel" aria-hidden="true">
<div class="modal-dialog" role="document">
<form method="get" action="/admin/group/addgroup">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title" id="modalCreateGroupLabel">Create new Group</h5>
</div>
<div class="modal-body">
<div class="form-group">
<p>Add group<br>
<label for="groupname" class="col-form-label">Group name:</label>
<input type="text" class="form-control" name="groupnameadd" id="groupnameadd"/>
</div>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-secondary" data-dismiss="modal">Close</button>
<button type="submit" class="btn btn-primary">Create</button>
</div>
</div>
</form>
</div>
</div>
<h2>Groups</h2>
<div class="table-responsive">
<table class="table table-striped table-sm">
<thead>
<tr>
<th>#</th>
<th>Group Name</th>
<th>Cooks</th>
<th>Computers</th>
</tr>
</thead>
<tbody>
<tr>
<td colspan="4"><a class="btn btn-outline-success btn-sm" data-toggle="modal" data-target="#modalCreateGroup">Create group</a></td>
</tr>
{% for item in tablegroups %} {#['ID_G','Name','Computers[ID_C,Name]','Cooks[CookName]']#}
<tr>
<td>{{item.0}}</td>
<td><a href="/admin/group?ID_G={{item.0}}">{{item.1}}</a></td>
<td style='width:50%;'>
{% for x in item.3 %}
{{x.0}},
{% endfor %}
</td>
<td>
{% for x in item.2 %}
{{x.1}},
{% endfor %}
</td>
</tr>
{% endfor %}
</tbody>
</table>
</div>
{% endblock %}