commit
8967d45f7c
@ -1,6 +1,6 @@
|
||||
<form action="{{ base }}/admin/{{ userID }}/addGroup" method="POST">
|
||||
<input name="num" type="text" placeholder="number" required>
|
||||
<input name="year" type="text" placeholder="year" required>
|
||||
<input name="sector" type="text" placeholder="sector" required>
|
||||
<input type="submit" value="Add">
|
||||
<input class="input-group-text d-inline" name="num" type="text" placeholder="number" required>
|
||||
<input class="input-group-text d-inline" name="year" type="text" placeholder="year" required>
|
||||
<input class="input-group-text d-inline" name="sector" type="text" placeholder="sector" required>
|
||||
<input class="btn btn-success" type="submit" value="Add">
|
||||
</form>
|
@ -1,58 +1,41 @@
|
||||
<table>
|
||||
{% if groups is defined %}
|
||||
{% for row in groups %}
|
||||
{% if selectedGroup is defined and selectedGroup == row.id %}
|
||||
<tr style="background-color:red;">
|
||||
{% else %}
|
||||
<tr>
|
||||
{% endif %}
|
||||
<td>ID</td>
|
||||
<td>Num</td>
|
||||
<td>Year</td>
|
||||
<td>Sector</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>{{ row.id }}</td>
|
||||
<td>{{ row.num }}</td>
|
||||
<td>{{ row.year }}</td>
|
||||
<td>{{ row.sector }}</td>
|
||||
|
||||
{% if actions is defined %}
|
||||
|
||||
{% if 'showGroupDetails' in actions %}
|
||||
<td>
|
||||
<a href="{{base}}/admin/{{userID}}/showGroupDetails?selectedGroup={{ row.id }}">
|
||||
<input class="btn-black" type="button" value="Show"/>
|
||||
</a>
|
||||
</td>
|
||||
{% endif %}
|
||||
|
||||
{% if 'removeGroup' in actions %}
|
||||
<td>
|
||||
<a href="{{base}}/admin/{{userID}}/removeGroup?selectedGroup={{ row.id }}">
|
||||
<input class="btn-black" type="button" value="Remove"/>
|
||||
</a>
|
||||
</td>
|
||||
{% endif %}
|
||||
|
||||
{% if 'removeVocabFromGroup' in actions %}
|
||||
<td>
|
||||
<a href="{{base}}/teacher/{{userID}}/removeVocabFromGroup?vocabID={{ vocabID }}&selectedGroup={{ row.id }}">
|
||||
<input class="btn-black" type="button" value="Remove from group"/>
|
||||
</a>
|
||||
</td>
|
||||
{% endif %}
|
||||
|
||||
{% if 'addVocabToGroup' in actions %}
|
||||
<td>
|
||||
<a href="{{base}}/teacher/{{userID}}/addVocabToGroup?vocabID={{ vocabID }}&selectedGroup={{ row.id }}">
|
||||
<input class="btn-black" type="button" value="Add to group"/>
|
||||
</a>
|
||||
</td>
|
||||
{% endif %}
|
||||
|
||||
{% endif %}
|
||||
</tr>
|
||||
{% endfor %}
|
||||
{% endif %}
|
||||
</table>
|
||||
<div class="container mt-5">
|
||||
<table class="table table-bordered thead-dark">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>ID</th>
|
||||
<th>Num</th>
|
||||
<th>Year</th>
|
||||
<th>Sector</th>
|
||||
<th>Actions</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% if groups is defined %}
|
||||
{% for row in groups %}
|
||||
<tr {% if selectedGroup is defined and selectedGroup == row.id %}class="table-danger"{% endif %}>
|
||||
<td>{{ row.id }}</td>
|
||||
<td>{{ row.num }}</td>
|
||||
<td>{{ row.year }}</td>
|
||||
<td>{{ row.sector }}</td>
|
||||
<td>
|
||||
{% if actions is defined %}
|
||||
{% if 'showGroupDetails' in actions %}
|
||||
<a href="{{ base }}/admin/{{ userID }}/showGroupDetails?selectedGroup={{ row.id }}" class="btn btn-primary fs-6">Show</a>
|
||||
{% endif %}
|
||||
{% if 'removeGroup' in actions %}
|
||||
<a href="{{ base }}/admin/{{ userID }}/removeGroup?selectedGroup={{ row.id }}" class="btn btn-danger fs-6">Remove</a>
|
||||
{% endif %}
|
||||
{% if 'removeVocabFromGroup' in actions %}
|
||||
<a href="{{ base }}/teacher/{{ userID }}/removeVocabFromGroup?vocabID={{ vocabID }}&selectedGroup={{ row.id }}" class="btn btn-warning fs-6">Remove from group</a>
|
||||
{% endif %}
|
||||
{% if 'addVocabToGroup' in actions %}
|
||||
<a href="{{ base }}/teacher/{{ userID }}/addVocabToGroup?vocabID={{ vocabID }}&selectedGroup={{ row.id }}" class="btn btn-success">Add to group</a>
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
{% endif %}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
@ -1,46 +1,46 @@
|
||||
<table>
|
||||
<tr>
|
||||
<td>ID</td>
|
||||
<td>Nickname</td>
|
||||
<td>Name</td>
|
||||
<td>Surname</td>
|
||||
<td>Mail</td>
|
||||
<td>Group</td>
|
||||
<td>Role</td>
|
||||
<td>Extra Time</td>
|
||||
</tr>
|
||||
{% if users is defined %}
|
||||
{% for row in users %}
|
||||
<tr>
|
||||
<td>{{row.id}}</td>
|
||||
<td>{{row.nickname}}</td>
|
||||
<td>{{row.name}}</td>
|
||||
<td>{{row.surname}}</td>
|
||||
<td>{{row.email}}</td>
|
||||
<td>{{row.group}}</td>
|
||||
<td>{{row.roles|join(', ')}}</td>
|
||||
<td>{{row.extraTime? 'yes' : 'no' }}</td>
|
||||
|
||||
{% if action is defined %}
|
||||
|
||||
{% if action == 'removeUserFromGroup' %}
|
||||
<td><a href="{{base}}/admin/{{ userID }}/removeUserFromGroup?userToRemove={{row.id}}&selectedGroup={{ selectedGroup }}">
|
||||
<input class="btn-black" type="button" value="Delete from group"/>
|
||||
</a></td>
|
||||
|
||||
{% elseif action == 'addUserToGroup' %}
|
||||
<td><a href="{{base}}/admin/{{ userID }}/addUserToGroup?userToAdd={{row.id}}&groupID={{selectedGroup}}">
|
||||
<input class="btn-black" type="button" value="Add to group"/>
|
||||
</a></td>
|
||||
|
||||
{% elseif action == 'removeUser' %}
|
||||
<td><a href="{{base}}/admin/{{ userID }}/removeUser?userToRemove={{row.id}}">
|
||||
<input class="btn-black" type="button" value="Delete"/>
|
||||
</a></td>
|
||||
<div class="container mt-5">
|
||||
<table class="table table-bordered">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>ID</th>
|
||||
<th>Nickname</th>
|
||||
<th>Name</th>
|
||||
<th>Surname</th>
|
||||
<th>Mail</th>
|
||||
<th>Group</th>
|
||||
<th>Role</th>
|
||||
<th>Extra Time</th>
|
||||
{% if action is defined %}
|
||||
<th>Action</th>
|
||||
{% endif %}
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% if users is defined %}
|
||||
{% for row in users %}
|
||||
<tr>
|
||||
<td>{{ row.id }}</td>
|
||||
<td>{{ row.nickname }}</td>
|
||||
<td>{{ row.name }}</td>
|
||||
<td>{{ row.surname }}</td>
|
||||
<td>{{ row.email }}</td>
|
||||
<td>{{ row.group }}</td>
|
||||
<td>{{ row.roles|join(', ') }}</td>
|
||||
<td>{{ row.extraTime ? 'yes' : 'no' }}</td>
|
||||
{% if action is defined %}
|
||||
<td>
|
||||
{% if action == 'removeUserFromGroup' %}
|
||||
<a href="{{ base }}/admin/{{ userID }}/removeUserFromGroup?userToRemove={{ row.id }}&selectedGroup={{ selectedGroup }}" class="btn btn-danger">Delete from group</a>
|
||||
{% elseif action == 'addUserToGroup' %}
|
||||
<a href="{{ base }}/admin/{{ userID }}/addUserToGroup?userToAdd={{ row.id }}&groupID={{ selectedGroup }}" class="btn btn-success">Add to group</a>
|
||||
{% elseif action == 'removeUser' %}
|
||||
<a href="{{ base }}/admin/{{ userID }}/removeUser?userToRemove={{ row.id }}" class="btn btn-warning">Delete</a>
|
||||
{% endif %}
|
||||
</td>
|
||||
{% endif %}
|
||||
|
||||
{% endif %}
|
||||
</tr>
|
||||
{% endfor %}
|
||||
{% endif %}
|
||||
</table>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
{% endif %}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
Loading…
Reference in new issue