You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
124 lines
3.7 KiB
124 lines
3.7 KiB
<!DOCTYPE html>
|
|
<html lang="en">
|
|
<head>
|
|
<meta charset="UTF-8">
|
|
<title>Groups</title>
|
|
</head>
|
|
<body>
|
|
<style>
|
|
body{
|
|
display: flex;
|
|
justify-content: space-around;
|
|
flex-wrap: wrap;
|
|
}
|
|
section{
|
|
border: 1px solid black;
|
|
}
|
|
</style>
|
|
<section class="groupList">
|
|
<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>
|
|
<td><a href="index.php?action=showGroupDetails&selectedGroup={{row.id}}">
|
|
<input class="btn-black" type="button" value="Show"/>
|
|
</a></td>
|
|
<td><a href="index.php?action=removeGroup&selectedGroup={{row.id}}">
|
|
<input class="btn-black" type="button" value="Remove"/>
|
|
</a></td>
|
|
</tr>
|
|
{% endfor %}
|
|
{% endif %}
|
|
</table>
|
|
</section>
|
|
{% if selectedGroup is defined %}
|
|
<section class="users">
|
|
<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.role}}</td>
|
|
<td>{{row.extraTime}}</td>
|
|
<td><a href="index.php?action=removeUserFromGroup&id={{row.id}}&selectedGroup={{selectedGroup}}">
|
|
<input class="btn-black" type="button" value="Delete from group"/>
|
|
</a></td>
|
|
</tr>
|
|
{% endfor %}
|
|
{% endif %}
|
|
</table>
|
|
</section>
|
|
{% endif %}
|
|
<section class="addGroupForm">
|
|
<h2>Add group</h2>
|
|
<form action="index.php" method="GET">
|
|
<input type="hidden" name="action" value="addGroup">
|
|
<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">
|
|
</form>
|
|
</section>
|
|
<section class="unassignedUsers">
|
|
<h1>Unassigned users</h1>
|
|
<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 unassignedUsers is defined %}
|
|
{% for row in unassignedUsers %}
|
|
<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.role}}</td>
|
|
<td>{{row.extraTime}}</td>
|
|
<td><a href="index.php?action=addUserToGroup&userID={{row.id}}&groupID={{selectedGroup}}">
|
|
<input class="btn-black" type="button" value="Add to group"/>
|
|
</a></td>
|
|
</tr>
|
|
{% endfor %}
|
|
{% endif %}
|
|
</table>
|
|
</section>
|
|
</body>
|
|
</html> |