129 lines
4.9 KiB
HTML
129 lines
4.9 KiB
HTML
<!DOCTYPE html>
|
|
<html lang="en">
|
|
<head>
|
|
<meta charset="UTF-8">
|
|
<title>Upravljanje institucije - Šolar</title>
|
|
<link rel="icon" href="/static/favicon.ico" type="image/x-icon" >
|
|
<link rel="icon" href="static/favicon.svg" sizes="any" type="image/svg+xml">
|
|
<link rel="stylesheet" href="{{ROUTE_PREFIX}}/static/css/header.css" type="text/css">
|
|
<link rel="stylesheet" href="{{ROUTE_PREFIX}}/static/css/form.css" type="text/css">
|
|
<link rel="stylesheet" href="{{ROUTE_PREFIX}}/static/css/simple-grid.css" type="text/css">
|
|
<link rel="stylesheet" href="{{ROUTE_PREFIX}}/static/css/slovenscina-admin.css" type="text/css">
|
|
<link rel="stylesheet" href="{{ROUTE_PREFIX}}/static/css/manage-institution.css" type="text/css">
|
|
|
|
|
|
</head>
|
|
<body>
|
|
<header>
|
|
<div class="logo"><a href="{{ROUTE_PREFIX}}/"><img src="{{ROUTE_PREFIX}}/static/image/logo-white.svg"/></a></div>
|
|
<div class="menu-items">
|
|
<a href="{{ROUTE_PREFIX}}/oddaja">Oddaja besedil</a>
|
|
{% if is_institution_coordinator %}
|
|
<a href="{{ROUTE_PREFIX}}/manage-institution">Upravljaj z ekipo</a>
|
|
{% endif %}
|
|
{% if is_admin %}
|
|
<a href="{{ROUTE_PREFIX}}/admin">Administracijski meni</a>
|
|
{% endif %}
|
|
<a href="https://slovenscina.eu/" target="_blank">Več informacij o sodelovanju</a>
|
|
<a href="{{ROUTE_PREFIX}}/logout">Odjava</a>
|
|
</div>
|
|
</header>
|
|
<div class="container" style="margin-top:8rem;">
|
|
{% with messages = get_flashed_messages() %}
|
|
{% if messages %}
|
|
<div>
|
|
{{ messages[0] }}
|
|
</div>
|
|
{% endif %}
|
|
{% endwith %}
|
|
|
|
<div class="row">
|
|
<div class="col-12">
|
|
<h1>{{institution.name}}</h1>
|
|
<h3>Seznam uporabnikov v vaši instituciji</h3>
|
|
<table class="tableFixHead">
|
|
<thead>
|
|
<tr>
|
|
<th>Ime in priimek</th>
|
|
<th>Email</th>
|
|
<th>Vloga</th>
|
|
<th>Akcije</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
{% for item in institution_users %}
|
|
<tr>
|
|
<td>{{item.name}}</td>
|
|
<td>{{item.email}}</td>
|
|
<td>
|
|
<div>
|
|
<a href="javascript:void(0);" onclick="toggleEditForm(this)" class="toggle-edit-role">Spremeni</a>
|
|
{{role_map[item.id]}}
|
|
</div>
|
|
<form action="{{ROUTE_PREFIX}}/changeuserrole-institution" method="post" style="display:none;">
|
|
<input type="hidden" id="user-id" name="user-id" value="{{item.id}}"/>
|
|
<select class="role" name="role">
|
|
<option value="coordinator">Koordinator/-ka</option>
|
|
<option value="mentor">Mentor/-ica</option>
|
|
<option value="other">Druga vloga</option>
|
|
</select>
|
|
<input type="submit" value="Shrani"/>
|
|
</form>
|
|
</td>
|
|
<td>
|
|
<form action="{{ROUTE_PREFIX}}/deluserfrominstitution" method="post">
|
|
<input type="hidden" id="user_id" name="user_id" value="{{item.id}}">
|
|
<input type="submit" value="Odstrani uporabnika">
|
|
</form>
|
|
</td>
|
|
</tr>
|
|
{% endfor %}
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
|
|
|
|
<form action="/institutionadduser" method="POST">
|
|
<div class="row">
|
|
<div class="col-6">
|
|
<h1>Dodaj uporabnika</h1>
|
|
<div class="form-wrapper">
|
|
<label for="regija">Ime</label>
|
|
<input type="text" name="name" />
|
|
</div>
|
|
<div class="form-wrapper">
|
|
<label for="regija">Email</label>
|
|
<input type="text" name="email" />
|
|
</div>
|
|
<div class="form-wrapper">
|
|
<label for="regija">Vloga</label>
|
|
<select class="role" name="role">
|
|
<option value="coordinator">Koordinator/-ka</option>
|
|
<option value="mentor">Mentor/-ica</option>
|
|
<option value="other">Druga vloga</option>
|
|
</select>
|
|
</div>
|
|
<input type="submit" class="btn" value="Dodaj"/>
|
|
</div>
|
|
</div>
|
|
|
|
</form>
|
|
|
|
<br>
|
|
|
|
|
|
</div>
|
|
</body>
|
|
<script>
|
|
var toggleEditForm = function(el) {
|
|
var td = el.closest("td");
|
|
el.closest("div").style.display = "none";
|
|
td.querySelector("form").style.display = "block";
|
|
};
|
|
|
|
|
|
|
|
</script>
|
|
</html>
|