2019-06-15 21:31:31 +00:00
|
|
|
|
|
|
|
{% extends "core/base.jinja" %}
|
|
|
|
|
|
|
|
{% block title %}
|
|
|
|
{% trans %}UV Guide{% endtrans %}
|
|
|
|
{% endblock %}
|
|
|
|
|
|
|
|
{% block content %}
|
2019-07-05 13:39:11 +00:00
|
|
|
<form action="{{ url('pedagogy:guide') }}" method="get">
|
|
|
|
<p>
|
|
|
|
<input type="text" name="search">
|
|
|
|
<button>{% trans %}Details{% endtrans %}</button>
|
|
|
|
</p>
|
|
|
|
<p>
|
|
|
|
<input type="radio" name="department" value="EDIM">{% trans %}EDIM{% endtrans %}
|
|
|
|
<input type="radio" name="department" value="EE">{% trans %}ENERGIE{% endtrans %}
|
|
|
|
<input type="radio" name="department" value="IMSI">{% trans %}IMSI{% endtrans %}
|
|
|
|
<input type="radio" name="department" value="GI">{% trans %}INFO{% endtrans %}
|
|
|
|
<input type="radio" name="department" value="MC">{% trans %}GMC{% endtrans %}
|
|
|
|
<input type="radio" name="department" value="HUMA">{% trans %}HUMA{% endtrans %}
|
|
|
|
<input type="radio" name="department" value="TC">{% trans %}TC{% endtrans %}
|
|
|
|
</p>
|
|
|
|
<p>
|
|
|
|
<input type="radio" name="credit_type" value="CS">{% trans %}CS{% endtrans %}
|
|
|
|
<input type="radio" name="credit_type" value="TM">{% trans %}TM{% endtrans %}
|
|
|
|
<input type="radio" name="credit_type" value="EC">{% trans %}EC{% endtrans %}
|
|
|
|
<input type="radio" name="credit_type" value="QC">{% trans %}QC{% endtrans %}
|
|
|
|
<input type="radio" name="credit_type" value="TM">{% trans %}TM{% endtrans %}
|
|
|
|
|
|
|
|
<input type="checkbox" name="semester" value="AUTUMN">A
|
|
|
|
<input type="checkbox" name="semester" value="SPRING">P
|
|
|
|
</p>
|
|
|
|
</form>
|
2019-06-15 22:04:36 +00:00
|
|
|
{% if can_create_uv(user) %}
|
|
|
|
<p>
|
|
|
|
<a href="{{ url('pedagogy:uv_create') }}">{% trans %}Create UV{% endtrans %}</a>
|
|
|
|
</p>
|
|
|
|
{% endif %}
|
2019-06-15 21:31:31 +00:00
|
|
|
{% for uv in object_list %}
|
2019-06-15 22:04:36 +00:00
|
|
|
<p>
|
2019-06-16 15:02:45 +00:00
|
|
|
<a href="{{ url('pedagogy:uv_detail', uv_id=uv.id) }}">{{ uv.code }}</a>
|
2019-06-15 22:04:36 +00:00
|
|
|
{% if user.is_owner(uv) -%}
|
|
|
|
<a href="{{ url('pedagogy:uv_update', uv_id=uv.id) }}">{% trans %}Edit{% endtrans %}</a>
|
|
|
|
<a href="{{ url('pedagogy:uv_delete', uv_id=uv.id) }}">{% trans %}Delete{% endtrans %}</a>
|
|
|
|
{%- endif -%}
|
|
|
|
</p>
|
2019-06-15 21:31:31 +00:00
|
|
|
{% endfor %}
|
2019-07-05 13:39:11 +00:00
|
|
|
|
|
|
|
<script>
|
|
|
|
// Allow unchecking a radio button when we click on it
|
|
|
|
// Keep a state of what is checked
|
|
|
|
var formStates = {};
|
|
|
|
function radioCheckToggle(e){
|
|
|
|
if (formStates[this.name] == this.value){
|
|
|
|
this.checked = false;
|
|
|
|
formStates[this.name] = "";
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
formStates[this.name] = this.value;
|
|
|
|
}
|
|
|
|
|
|
|
|
$("input[type='radio']").each(function() {
|
|
|
|
$(this).on("click", radioCheckToggle);
|
|
|
|
// Get current state
|
|
|
|
if ($(this).prop("checked")){
|
|
|
|
formStates[$(this).attr("name")] = $(this).attr("value");
|
|
|
|
}
|
|
|
|
});
|
|
|
|
</script>
|
2019-06-15 21:31:31 +00:00
|
|
|
{% endblock content %}
|