|
1 | | -{% macro rows(url, contest_url, translation, xsrf_form_html, |
| 1 | +{% macro rows(url, static_url, contest_url, translation, xsrf_form_html, |
2 | 2 | actual_phase, task, submissions, |
3 | 3 | can_use_tokens, can_play_token, can_play_token_now, |
4 | 4 | submissions_download_allowed, official) -%} |
5 | 5 | {# |
6 | 6 | Render a submission table with all (un)official submissions passed. |
7 | 7 |
|
8 | 8 | url (Url): the URL instance referring to the root of CWS. |
| 9 | +static_url: static url helper constructed from url |
9 | 10 | contest_url (Url): the URL instance referring to the main contest page. |
10 | 11 | translation (Translation): locale to use to show messages. |
11 | 12 | xsrf_form_html (str): input element for the XSRF protection. |
|
90 | 91 | {# loop.revindex is broken: https://github.com/pallets/jinja/issues/794 #} |
91 | 92 | {{ row( |
92 | 93 | url, |
| 94 | + static_url, |
93 | 95 | contest_url, |
94 | 96 | translation, |
95 | 97 | xsrf_form_html, |
|
108 | 110 | </table> |
109 | 111 | {%- endmacro %} |
110 | 112 |
|
111 | | -{% macro row(url, contest_url, translation, xsrf_form_html, |
| 113 | +{% macro row(url, static_url, contest_url, translation, xsrf_form_html, |
112 | 114 | actual_phase, s, opaque_id, show_date, |
113 | 115 | can_use_tokens, can_play_token, can_play_token_now, |
114 | 116 | submissions_download_allowed) -%} |
115 | 117 | {# |
116 | 118 | Render a row in a submission table. |
117 | 119 |
|
118 | 120 | url (Url): the URL instance referring to the root of CWS. |
| 121 | +static_url: static url helper constructed from url |
119 | 122 | contest_url (Url): the URL instance referring to the main contest page. |
120 | 123 | translation (Translation): locale to use to show messages. |
121 | 124 | xsrf_form_html (str): input element for the XSRF protection. |
|
146 | 149 | <td class="status"> |
147 | 150 | {% if status == SubmissionResult.COMPILING %} |
148 | 151 | {% trans %}Compiling...{% endtrans %} |
149 | | - <img class="details" src="{{ url("static", "loading.gif") }}" /> |
| 152 | + <img class="details" src="{{ static_url("static", "loading.gif") }}" /> |
150 | 153 | {% elif status == SubmissionResult.COMPILATION_FAILED %} |
151 | 154 | {% trans %}Compilation failed{% endtrans %} |
152 | 155 | <a class="details">{% trans %}details{% endtrans %}</a> |
153 | 156 | {% elif status == SubmissionResult.EVALUATING %} |
154 | 157 | {% trans %}Evaluating...{% endtrans %} |
155 | | - <img class="details" src="{{ url("static", "loading.gif") }}" /> |
| 158 | + <img class="details" src="{{ static_url("static", "loading.gif") }}" /> |
156 | 159 | {% elif status == SubmissionResult.SCORING %} |
157 | 160 | {% trans %}Scoring...{% endtrans %} |
158 | | - <img class="details" src="{{ url("static", "loading.gif") }}" /> |
| 161 | + <img class="details" src="{{ static_url("static", "loading.gif") }}" /> |
159 | 162 | {% elif status == SubmissionResult.SCORED %} |
160 | 163 | {% trans %}Evaluated{% endtrans %} |
161 | 164 | <a class="details">{% trans %}details{% endtrans %}</a> |
|
0 commit comments