{% extends 'web_template/index.html' %}
|
{% load i18n %}
|
{% load static %}
|
{% load problemparser %}
|
{% block stylesheets %}
|
{{ block.super }}
|
<link rel="stylesheet" type="text/css" href="{% static 'datatables/media/css/dataTables.bootstrap.min.css' %}">
|
<link rel="stylesheet" type="text/css" href="{% static 'exam/draggable.css' %}"> <!-- To get a tick mark if the answer is correct -->
|
<script type="text/x-mathjax-config">
|
MathJax.Hub.Config({
|
jax: ["input/TeX", "output/HTML-CSS"],
|
tex2jax: {inlineMath: [['$','$'], ['\\(','\\)']]}
|
});
|
</script>
|
<script type="text/javascript" src="{% static 'MathJax/MathJax.js' %}?config=TeX-AMS_CHTML"></script>
|
{% endblock %}
|
{% block page_name %}
|
{% trans "List of groups of problems" %}
|
{% endblock %}
|
{% block page_description %}
|
<a href='{% url 'problemgroupnew' %}' class="btn btn-default"><i class="fa fa-plus-circle"></i> {% trans "New Problem Group" %}</a>
|
{% endblock %}
|
{%block content %}
|
|
<div class="box">
|
<div class="box-header">
|
<h3 class="box-title">Hover Data Table</h3>
|
</div>
|
<!-- /.box-header -->
|
<div class="box-body">
|
<table id="problem_list" class="table table-bordered table-hover">
|
<thead>
|
<tr>
|
<th>{% trans "Group Name" %}</th>
|
<th>{% trans "Number of problems" %}</th>
|
<th>{% trans "Number of selected problems" %}</th>
|
|
<th>{%trans "Action" %}</th>
|
</tr>
|
</thead>
|
<tbody>
|
{% for problemgroup in problemgroup_list %}
|
<tr>
|
<td>{{ problemgroup.title }}</td>
|
<td>{{ problemgroup.problems_in_group }}</td>
|
<td>{{ problemgroup.amount }}</td>
|
<td>
|
<div class="btn-group">
|
<a href="{% url 'addgrouptoexam' problemgroup.id %}" class="btn btn-default"><i class="fa fa-plus-circle"></i> {% trans "Add to exam" %}</a>
|
<a href="{% url 'problemgroupdetail' problemgroup.id %}" class="btn btn-default"><i class="fa fa-edit"></i> {% trans "Detail/Edit" %}</a>
|
{% if not problem.is_locked %}
|
<button type="button" class="btn btn-default"><i class="fa fa-trash"></i> {% trans "Delete" %}</button>
|
{% endif %}
|
</div>
|
</td>
|
</tr>
|
{% endfor %}
|
<tfoot>
|
<tr>
|
<th>{% trans "Group Name" %}</th>
|
<th>{% trans "Number of problems" %}</th>
|
<th>{% trans "Number of selected problems" %}</th>
|
|
<th>{%trans "Action" %}</th>
|
</tr>
|
</tfoot>
|
</table>
|
</div>
|
<!-- /.box-body -->
|
</div>
|
<!-- /.box -->
|
|
|
{% endblock %}
|
|
{% block extra_foot %}
|
{{ block.super }}
|
<script src='{% static 'datatables/media/js/jquery.dataTables.min.js' %}'></script>
|
<script src='{% static 'datatables/media/js/dataTables.bootstrap.min.js' %}'></script>
|
<script>
|
$(function () {
|
$('#problem_list').DataTable()
|
});
|
|
</script>
|
{% endblock %}
|