InQuire/templates/courses.html

59 lines
2.0 KiB
HTML

{% extends "index.html" %}
{% block title %}Lista kursów{% endblock %}
{% block content %}
<div class="container header__container">
<a href="/logout" id="btn--logout" class="btn-floating color--primary btn-small waves-effect waves-light" title="Wyloguj się"><i class="material-icons">power_settings_new</i></a>
<div class="row">
<div class="col s12">
<div class="card color--primary white-text">
<span class="card-title">Lista kursów</span>
</div>
</div>
</div>
</div>
<div class="container body__container">
<div class="row">
<div class="col s12 color--primary">
<div class="card color--primary white-text">
<div class="card-content">
<span class="card-title card-title__body"></span>
<ul id="questions-list">
{% for course in courses %}
<li class="row">
<span class="col s7" style="display:flex; align-items:center; text-align: left">
{{course[1]}}
</span>
<a id="{{course[0]}}" name="Tworzenie systemów informatycznych" class="col s5 btn--answer waves-effect waves-light btn-large red">OTWÓRZ</a>
</li>
{% endfor %}
</ul>
</div>
</div>
</div>
</div>
</div>
{% endblock %}
{% block script %}
<script>
/////////// DO OGARNIĘCIA /////////////
$('.btn--answer').on('click', function(event) {
event.preventDefault();
var link = '/lectures/' + event.target.id;
window.location.href = link;
/*
$.ajax({
url: link,
type: 'POST',
succes: function(response) {
location.reload();
}
});
alertify.notify('Pomyślnie oceniono pytanie', 'success', 3);
location.reload();
*/
});
</script>
{% endblock %}