111 lines
3.3 KiB
HTML
111 lines
3.3 KiB
HTML
<!DOCTYPE html>
|
|
<html lang="en">
|
|
<head>
|
|
<meta charset="UTF-8">
|
|
<title>Admin panel - Šolar</title>
|
|
<style>
|
|
.tableFixHead {
|
|
overflow-y: auto;
|
|
height: 106px;
|
|
}
|
|
.tableFixHead thead th {
|
|
position: sticky;
|
|
top: 0;
|
|
}
|
|
table {
|
|
border-collapse: collapse;
|
|
width: 100%;
|
|
}
|
|
th,
|
|
td {
|
|
padding: 8px 16px;
|
|
border: 1px solid #ccc;
|
|
}
|
|
th {
|
|
background: #eee;
|
|
}
|
|
</style>
|
|
</head>
|
|
<body>
|
|
<h2>Uporabniki</h2>
|
|
<h3>Dodaj uporabnika</h3>
|
|
<form action="/solar/adduser" method="post">
|
|
<label for="name">Ime in priimek:</label><br>
|
|
<input type="text" id="name" name="name"><br>
|
|
<label for="email">Email:</label><br>
|
|
<input type="text" id="email" name="email"><br>
|
|
<label for="password">Geslo:</label><br>
|
|
<input type="text" id="password" name="password"><br>
|
|
<input type="submit" value="Dodaj">
|
|
</form>
|
|
<!--<h3>Odstrani uporabnika</h3>
|
|
<form action="/solar/deluser" method="post">
|
|
<label for="user_id">ID uporabnika:</label><br>
|
|
<input type="text" id="user_id" name="user_id"><br>
|
|
<input type="submit" value="Odstrani">
|
|
</form>-->
|
|
<h3>Seznam vseh aktivnih uporabnikov</h3>
|
|
<div class="tableFixHead">
|
|
<table>
|
|
<thead>
|
|
<tr>
|
|
<th>ID</th>
|
|
<th>Ime in priimek</th>
|
|
<th>Email</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
{% for item in users %}
|
|
<tr>
|
|
<td>{{item.id}}</td>
|
|
<td>{{item.name}}</td>
|
|
<td>{{item.email}}</td>
|
|
</tr>
|
|
{% endfor %}
|
|
</table>
|
|
</div>
|
|
<h3>Dodeli uporabnika instituciji</h3>
|
|
<form action="/solar/addusertoinstitution" method="post">
|
|
<label for="user_id">ID uporabnika:</label>
|
|
<input type="text" id="user_id" name="user_id"><br>
|
|
<label for="institution_id">ID institucije:</label>
|
|
<input type="text" id="institution_id" name="institution_id"><br>
|
|
<label for="role">Vloga v instituciji:</label>
|
|
<select name="role" id="role">
|
|
<option value="moderator">Moderator</option>
|
|
<option value="user">Uporabnik</option>
|
|
</select>
|
|
<input type="submit" value="Dodeli">
|
|
</form>
|
|
<div> </div>
|
|
<h2>Institucije</h2>
|
|
<h3>Dodaj institucijo</h3>
|
|
<form action="/solar/addinstitution" method="post">
|
|
<label for="name">Naziv:</label>
|
|
<input type="text" id="name" name="name"><br>
|
|
<label for="region">Regija:</label>
|
|
<input type="text" id="region" name="region"><br>
|
|
<input type="submit" value="Dodaj">
|
|
</form>
|
|
<h3>Seznam vseh instituticij</h3>
|
|
<div class="tableFixHead">
|
|
<table>
|
|
<thead>
|
|
<tr>
|
|
<th>ID</th>
|
|
<th>Naziv</th>
|
|
<th>Regija</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
{% for item in institutions %}
|
|
<tr>
|
|
<td>{{item.id}}</td>
|
|
<td>{{item.name}}</td>
|
|
<td>{{item.region}}</td>
|
|
</tr>
|
|
{% endfor %}
|
|
</table>
|
|
</div>
|
|
</body>
|