2023-02-20 23:15:13 +00:00
|
|
|
{% for problem in problems %}
|
|
|
|
<div class="blog-box">
|
|
|
|
<h3 class="problem-feed-name">
|
|
|
|
<a href="{{ url('problem_detail', problem.code) }}">
|
|
|
|
{{ problem.i18n_name }}
|
|
|
|
</a>
|
|
|
|
{% 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 %}
|
|
|
|
</h3>
|
2024-04-13 22:02:54 +00:00
|
|
|
{% with authors=problem.get_authors() %}
|
2023-02-20 23:15:13 +00:00
|
|
|
{% if authors %}
|
|
|
|
<div class="problem-feed-info-entry">
|
2024-06-05 03:00:23 +00:00
|
|
|
<i class="far fa-pen-to-square"></i>
|
2023-02-20 23:15:13 +00:00
|
|
|
<span class="pi-value">{{ link_users(authors) }}</span>
|
|
|
|
</div>
|
|
|
|
{% endif %}
|
|
|
|
{% endwith %}
|
|
|
|
{% if show_types %}
|
|
|
|
<div class="problem-feed-types">
|
|
|
|
<i class="fa fa-tag"></i>
|
|
|
|
{% for type in problem.types_list %}
|
|
|
|
<span class="type-tag">{{ type }}</span>{% if not loop.last %}, {% endif %}
|
|
|
|
{% endfor %}, *{{problem.points | int}}
|
|
|
|
</div>
|
|
|
|
{% endif %}
|
|
|
|
<div class="blog-description">
|
|
|
|
<div class='content-description'>
|
2024-02-28 20:13:59 +00:00
|
|
|
{% cache 86400 'problem_html' problem.id LANGUAGE_CODE %}
|
2023-02-20 23:15:13 +00:00
|
|
|
{{ problem.description|markdown(lazy_load=True)|reference|str|safe }}
|
|
|
|
{% endcache %}
|
|
|
|
{% if problem.pdf_description %}
|
|
|
|
<embed src="{{url('problem_pdf_description', problem.code)}}" width="100%" height="500" type="application/pdf"
|
|
|
|
style="margin-top: 0.5em">
|
|
|
|
{% endif %}
|
|
|
|
</div>
|
|
|
|
{% if feed_type=='volunteer' and request.user.has_perm('judge.suggest_problem_changes') %}
|
|
|
|
<br>
|
|
|
|
<a href="#" class="view-statement-src">{{ _('View source') }}</a>
|
|
|
|
<pre class="statement-src" style="display: none">{{ problem.description|str }}</pre>
|
|
|
|
<hr>
|
|
|
|
<center>
|
|
|
|
<h3>{{_('Volunteer form')}}</h3>
|
|
|
|
</center>
|
|
|
|
<br>
|
|
|
|
<button class="edit-btn" id="edit-{{problem.id}}" pid="{{problem.id}}" style="float: right">{{_('Edit')}}</button>
|
|
|
|
<form class="volunteer-form" id="form-{{problem.id}}" pid="{{problem.id}}" style="display: none;" method="POST">
|
|
|
|
<input type="submit" class="volunteer-submit-btn" id="submit-{{problem.id}}" pid="{{problem.id}}"
|
|
|
|
pcode="{{problem.code}}" style="float: right" value="{{_('Submit')}}">
|
|
|
|
<table class="table">
|
|
|
|
<thead>
|
|
|
|
<tr>
|
|
|
|
<th>
|
|
|
|
</th>
|
|
|
|
<th>
|
|
|
|
{{_('Value')}}
|
|
|
|
</th>
|
|
|
|
</tr>
|
|
|
|
</thead>
|
|
|
|
<tbody>
|
|
|
|
<tr>
|
|
|
|
<td width="30%">
|
|
|
|
<label for="knowledge_point-{{problem.id}}"><i>{{ _('Knowledge point') }}</i></label>
|
|
|
|
</td>
|
|
|
|
<td>
|
|
|
|
<input id="knowledge_point-{{problem.id}}" type="number" class="point-input" required>
|
|
|
|
</td>
|
|
|
|
</tr>
|
|
|
|
<tr>
|
|
|
|
<td width="30%">
|
|
|
|
<label for="thinking_point-{{problem.id}}"><i>{{ _('Thinking point') }}</i></label>
|
|
|
|
</td>
|
|
|
|
<td>
|
|
|
|
<input id="thinking_point-{{problem.id}}" type="number" class="point-input" required>
|
|
|
|
</td>
|
|
|
|
</tr>
|
|
|
|
<tr>
|
|
|
|
<td width="30%">
|
|
|
|
<label for="types"><i>{{ _('Problem types') }}</i></label>
|
|
|
|
</td>
|
|
|
|
<td>
|
|
|
|
<select id="volunteer-types-{{problem.id}}" name="types" multiple>
|
|
|
|
{% for type in problem_types %}
|
|
|
|
<option value="{{ type.id }}" {% if type in problem.types.all() %} selected{% endif %}>
|
|
|
|
{{ type.full_name }}
|
|
|
|
</option>
|
|
|
|
{% endfor %}
|
|
|
|
</select>
|
|
|
|
</td>
|
|
|
|
</tr>
|
|
|
|
<tr>
|
|
|
|
<td width="30%">
|
|
|
|
<label for="feedback"><i>{{ _('Feedback') }}</i></label>
|
|
|
|
</td>
|
|
|
|
<td>
|
|
|
|
<textarea id="feedback-{{problem.id}}" rows="2" style="width: 100%"
|
|
|
|
placeholder="{{_('Any additional note here')}}"></textarea>
|
|
|
|
</td>
|
|
|
|
</tr>
|
|
|
|
</tbody>
|
|
|
|
</table>
|
|
|
|
</form>
|
|
|
|
<center id="thank-{{problem.id}}" style="display: none; margin-top: 3em"></center>
|
|
|
|
{% endif %}
|
|
|
|
<div class="show-more"> {{_("...More")}} </div>
|
|
|
|
</div>
|
|
|
|
<div class="actionbar-box">
|
2023-08-03 09:04:39 +00:00
|
|
|
{% set pagevote = problem.get_or_create_pagevote() %}
|
|
|
|
{% set bookmark = problem.get_or_create_bookmark() %}
|
2023-02-20 23:15:13 +00:00
|
|
|
{% set hide_actionbar_comment = True %}
|
|
|
|
{% set include_hr = False %}
|
|
|
|
{% set share_url = request.build_absolute_uri(problem.get_absolute_url()) %}
|
|
|
|
{% include "actionbar/list.html" %}
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
{% endfor %}
|
|
|
|
{% include "feed/has_next.html" %}
|