64 lines
2.2 KiB
HTML
64 lines
2.2 KiB
HTML
{% extends "index.html" %}
|
|
{% block title %}Terminy wykładó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">Nazwa wykładu</span>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="container body__container">
|
|
<div class="row">
|
|
<div class="col s12">
|
|
<div class="card color--primary white-text">
|
|
<div class="card-content">
|
|
<span class="card-title card-title__body">Pytania studentów</span>
|
|
<ul id="questions-list">
|
|
{% for lecture in lectures %}
|
|
<li class="row">
|
|
<!--<span class="col s2" style="display:flex; align-items:center; text-align: left">
|
|
{{ lecture[1] }}
|
|
</span>-->
|
|
<span class="col s5" style="display:flex; align-items:center; text-align: left">
|
|
{{ lecture[3] }}
|
|
</span>
|
|
<a id="{{ lecture[0] }}" 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 = '/questions/' + 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 %} |