Finished manage institution site. Redone how cooperation history works.
This commit is contained in:
@@ -258,50 +258,6 @@
|
||||
</select>
|
||||
<input type="submit" value="Spremeni">
|
||||
</form>
|
||||
<h2>Zgodovina sodelovanja</h2>
|
||||
<div class="tableFixHead">
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
<th>ID</th>
|
||||
<th>ID uporabnika</th>
|
||||
<th>ID institucije</th>
|
||||
<th>Vloga</th>
|
||||
<th>Šolsko leto</th>
|
||||
<th>Besedilo značke</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for item in user_cooperation_history %}
|
||||
<tr>
|
||||
<td>{{item.id}}</td>
|
||||
<td>{{item.user}}</td>
|
||||
<td>{{item.institution}}</td>
|
||||
<td>{{item.role}}</td>
|
||||
<td>{{item.school_year}}</td>
|
||||
<td>{{item.badge_text}}</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</table>
|
||||
</div>
|
||||
<h3>Dodaj vnos</h3>
|
||||
<form action="../addcooperationhistoryitem" method="post">
|
||||
<label for="user">ID uporabnika</label>
|
||||
<input type="text" id="user" name="user"><br>
|
||||
<label for="institution">ID institucije</label>
|
||||
<input type="text" id="institution" name="institution"><br>
|
||||
<label for="role">Vloga</label>
|
||||
<select name="role" id="role">
|
||||
<option value="coordinator">Koordinator/-ka</option>
|
||||
<option value="mentor">Mentor/-ica</option>
|
||||
<option value="other">Druga vloga</option>
|
||||
</select><br>
|
||||
<label for="school-year">Šolsko leto (npr. "2021/22")</label>
|
||||
<input type="text" id="school-year" name="school-year"><br>
|
||||
<label for="badge-text">Besedilo značke</label>
|
||||
<input type="text" id="badge-text" name="badge-text"><br>
|
||||
<input type="submit" value="Dodaj">
|
||||
</form>
|
||||
<h3>Odstrani vnos</h3>
|
||||
<form action="../delcooperationhistoryitem" method="post">
|
||||
<label for="entry-id">ID vnosa</label>
|
||||
|
||||
@@ -44,7 +44,7 @@
|
||||
{% endif %}
|
||||
{% endwith %}
|
||||
|
||||
<h1>TODO ime institucije</h1>
|
||||
<h1>{{institution.name}}</h1>
|
||||
<h3>Seznam uporabnikov v vaši instituciji</h3>
|
||||
<table class="tableFixHead">
|
||||
<thead>
|
||||
@@ -62,11 +62,12 @@
|
||||
<td>{{item.email}}</td>
|
||||
<td>
|
||||
<div>
|
||||
TODO: izpiši vlogo <a href="javascript:void(0);" onclick="toggleEditForm(this)" class="toggle-edit-role">Spremeni</a>
|
||||
<a href="javascript:void(0);" onclick="toggleEditForm(this)" class="toggle-edit-role">Spremeni</a>
|
||||
{{role_map[item.id]}}
|
||||
</div>
|
||||
<form action="../changeuserrole" method="post" style="display:none;">
|
||||
<form action="../changeuserrole-institution" method="post" style="display:none;">
|
||||
<input type="hidden" id="user-id" name="user-id" value="{{item.id}}"/>
|
||||
<select class="role">
|
||||
<select class="role" name="role">
|
||||
<option value="coordinator">Koordinator/-ka</option>
|
||||
<option value="mentor">Mentor/-ica</option>
|
||||
<option value="other">Druga vloga</option>
|
||||
@@ -98,4 +99,4 @@
|
||||
|
||||
|
||||
</script>
|
||||
</html>
|
||||
</html>
|
||||
|
||||
@@ -69,22 +69,24 @@
|
||||
</div>
|
||||
{% set vars = {'prev_schoolyear': ''} %}
|
||||
{% for item in cooperation_history %}
|
||||
{% if item.school_year != vars.prev_schoolyear %}
|
||||
{% if item[0] != vars.prev_schoolyear %}
|
||||
<div class="row">
|
||||
<div class="col-12">
|
||||
<h2>Šolsko leto {{item.school_year}}</h2>
|
||||
<h2>Šolsko leto {{item[0]}}</h2>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{% if vars.update({'prev_schoolyear': item.school_year}) %} {% endif %}
|
||||
{% if vars.update({'prev_schoolyear': item[0]}) %} {% endif %}
|
||||
{% endif %}
|
||||
{% for entry in item[1] %}
|
||||
<div class="row">
|
||||
<div class="col-6">
|
||||
<div class="team-item">
|
||||
<div class="team-item-name">{{item.name}} <span class="team-item-role">{%if item.role == "mentor" %}Mentor{%elif item.role == "coordinator" %}Koordinator{%elif item.role == "other" %}{{item.badge_text}}{%endif%}</span></div>
|
||||
<div class="team-item-name">{{entry.name}} <span class="team-item-role">{%if entry.role == "mentor" %}Mentor{%elif entry.role == "coordinator" %}Koordinator{%elif entry.role == "other" %}Druga vloga{%endif%}</span></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% endfor %}
|
||||
{% endfor %}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user