使用url()来构建url

This commit is contained in:
masnn committed 2020-06-12 13:37:19 +08:00
1 parent 0efac48bde
commit 86f67a0ec3
61 files changed
+262 -275

No files matched your search

+5 -4
View File
@@ -31,7 +31,7 @@
<div class="section__body no-padding">
<ol class="menu">
<li class="menu__item">
<form method="post" action="/r/{{ rdoc._id }}/rejudge">
<form method="post" action="{{ url('record_rejudge', rid=rdoc._id) }}">
<input type="hidden" name="csrfToken" value="{{ handler.csrfToken }}">
<button type="submit" class="menu__link">
<span class="icon icon-refresh"></span> {{ _('Rejudge') }}
@@ -39,7 +39,8 @@
</form>
</li>
<li class="menu__item">
<form method="post" action="/judge/end">
<form method="post" action="{{ url('judge') }}">
<input type="hidden" name="action" value="end">
<input type="hidden" name="rid" value="{{ rdoc._id }}">
<input type="hidden" name="csrfToken" value="{{ handler.csrfToken }}">
<input type="hidden" name="score" value="0">
@@ -65,12 +66,12 @@
{% if tdoc %}
<dt>{{ _('Contest') }}</dt>
<dd>
<a href="/c/{{ tdoc.docId }}">{{ tdoc.title }}</a>
<a href="{{ url('contest_detail', tid=tdoc.docId) }}">{{ tdoc.title }}</a>
</dd>
{% endif %}
{% if pdoc and (handler.user._id == pdoc.owner or handler.hasPerm(perm.PERM_READ_PROBLEM_DATA)) %}
<dt>{{ _('Problem Data') }}</dt>
<dd><a href="/p/{{ pdoc.pid }}/data"><span class="icon icon-download"></span> {{ _('Download') }}</a></dd>
<dd><a href="{{ url('problem_data', pid=pdoc.pid) }}"><span class="icon icon-download"></span> {{ _('Download') }}</a></dd>
{% endif %}
<dt>{{ _('Language') }}</dt>
<dd>