NDOJ/templates/internal/problem/problem.html

67 lines
1.7 KiB
HTML
Raw Permalink Normal View History

2023-01-27 23:11:10 +00:00
{% extends "three-column-content.html" %}
{% block three_col_media %}
<style>
.middle-content {
max-width: 50%;
}
ol {
padding-left: 1em;
}
</style>
{% endblock %}
2024-06-24 19:56:00 +00:00
{% block js_media %}
2023-01-27 23:11:10 +00:00
<script type="text/javascript">
$(function () {
$('.vote-detail').each(function() {
$(this).on('click', function() {
var pid = $(this).attr('pid');
2023-11-02 02:17:54 +00:00
$.get("{{url('internal_problem_votes')}}?id="+pid, function(data) {
$('#detail').html(data);
});
2023-01-27 23:11:10 +00:00
})
})
});
</script>
{% endblock %}
{% block left_sidebar %}
2023-03-07 07:19:45 +00:00
{% include "internal/left-sidebar.html" %}
2023-01-27 23:11:10 +00:00
{% endblock %}
{% block middle_content %}
2023-08-29 23:52:24 +00:00
<form>
<label for="name">{{_('Search')}}:</label>
<input type="text" name="q" value="{{query}}">
</form>
<br>
2023-01-27 23:11:10 +00:00
<table class="table">
<thead>
<tr>
<th>{{_('Problem')}}</th>
<th>{{_('Code')}}</th>
<th>{{_('Vote count')}}</th>
</tr>
</thead>
<tbody>
{% for problem in problems %}
<tr>
<td><a href="{{url('problem_detail', problem.code)}}">{{problem.name}}</a></td>
<td><a href="{{url('admin:judge_problem_change', problem.id)}}">{{problem.code}}</a></td>
<td><a href="#" class="vote-detail" pid="{{problem.id}}">{{problem.vote_count}}</a></td>
</tr>
{% endfor %}
</tbody>
</table>
{% if page_obj.num_pages > 1 %}
<div style="margin-top:10px;">{% include "list-pages.html" %}</div>
{% endif %}
{% endblock %}
{% block right_sidebar %}
<div style="display: block; width: 100%">
2023-11-02 02:17:54 +00:00
<a href="{{url('admin:judge_volunteerproblemvote_changelist')}}">{{_('Admin')}}</a>
<div class="detail" id="detail">
</div>
</div>
2022-05-03 02:44:14 +00:00
{% endblock %}