Add related problems
This commit is contained in:
parent
03455fca2c
commit
ca13ee4e8d
7 changed files with 116 additions and 84 deletions
19
templates/problem/related_problems.html
Normal file
19
templates/problem/related_problems.html
Normal file
|
@ -0,0 +1,19 @@
|
|||
{% if related_problems %}
|
||||
<div class="content-description">
|
||||
<h4>{{_('Recommended problems')}}:</h4>
|
||||
<ul style="list-style-type: none; margin: 0.3em;">
|
||||
{% for problem in related_problems %}
|
||||
<li>
|
||||
{% if problem.id in completed_problem_ids %}
|
||||
<i class="solved-problem-color fa fa-check-circle"></i>
|
||||
{% elif problem.id in attempted_problems %}
|
||||
<i class="attempted-problem-color fa fa-minus-circle"></i>
|
||||
{% else %}
|
||||
<i class="unsolved-problem-color fa fa-minus-circle"></i>
|
||||
{% endif %}
|
||||
<a href="{{url('problem_detail', problem.code)}}">{{ problem.name }}</a>
|
||||
</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
</div>
|
||||
{% endif %}
|
Loading…
Add table
Add a link
Reference in a new issue