|
3 | 3 | {% block manage_content %} |
4 | 4 | <div class="section"> |
5 | 5 | <div class="section__header"> |
6 | | - <h1 class="section__title" data-heading>{{ _('Bulk Rejudge') }}</h1> |
| 6 | + <h1 class="section__title">{{ _('Bulk Rejudge') }}</h1> |
7 | 7 | </div> |
8 | 8 | <div class="section__body"> |
| 9 | + {% if error %} |
| 10 | + <p class="typo text-red">{{ error.split('\n')|join('<br>') }}</p> |
| 11 | + {% endif %} |
9 | 12 | <form> |
10 | 13 | <div class="row"> |
11 | | - <div class="medium-6 columns"> |
| 14 | + <div class="medium-3 columns"> |
12 | 15 | <label class="filter-user"> |
13 | 16 | {{ _('By Username / UID') }} |
14 | | - <input name="uidOrName" type="text" class="textbox" value="" autocomplete="off" data-autofocus> |
| 17 | + <input name="uidOrName" type="text" class="textbox" value="{{ uidOrName|default('') }}" autocomplete="off" data-autofocus> |
15 | 18 | </label> |
16 | 19 | </div> |
17 | | - <div class="medium-6 columns"> |
| 20 | + <div class="medium-3 columns"> |
18 | 21 | <label> |
19 | 22 | {{ _('By Problem') }} |
20 | | - <input name="pid" type="text" class="textbox" value=""> |
| 23 | + <input name="pid" type="text" class="textbox" value="{{ pid|default('') }}"> |
21 | 24 | </label> |
22 | 25 | </div> |
23 | | - </div> |
24 | | - <div class="row"> |
25 | | - <div class="medium-6 columns"> |
| 26 | + <div class="medium-3 columns"> |
26 | 27 | <label> |
27 | 28 | {{ _('By Contest') }} |
28 | | - <input name="tid" type="text" class="textbox" value=""> |
| 29 | + <input name="tid" type="text" class="textbox" value="{{ tid|default('') }}"> |
29 | 30 | </label> |
30 | 31 | </div> |
31 | | - <div class="medium-6 columns"> |
| 32 | + <div class="medium-3 columns"> |
32 | 33 | <label> |
33 | 34 | {{ _('By Language') }} |
34 | | - <input name="lang" type="text" class="textbox" value=""> |
| 35 | + <input name="lang" type="text" class="textbox" value="{{ lang|default('') }}"> |
35 | 36 | </label> |
36 | 37 | </div> |
37 | 38 | </div> |
38 | 39 | <div class="row"> |
39 | | - <div class="medium-6 columns"> |
| 40 | + {{ form.form_text({ |
| 41 | + columns:3, |
| 42 | + label:'Begin Date', |
| 43 | + name:'beginAtDate', |
| 44 | + placeholder:'YYYY-mm-dd', |
| 45 | + value:dateBeginText, |
| 46 | + date:true, |
| 47 | + row:false |
| 48 | + }) }} |
| 49 | + {{ form.form_text({ |
| 50 | + columns:2, |
| 51 | + label:'Begin Time', |
| 52 | + name:'beginAtTime', |
| 53 | + placeholder:'HH:MM', |
| 54 | + value:timeBeginText, |
| 55 | + time:true, |
| 56 | + row:false |
| 57 | + }) }} |
| 58 | + {{ form.form_text({ |
| 59 | + columns:3, |
| 60 | + label:'End Date', |
| 61 | + name:'endAtDate', |
| 62 | + placeholder:'YYYY-mm-dd', |
| 63 | + value:dateEndText, |
| 64 | + date:true, |
| 65 | + row:false |
| 66 | + }) }} |
| 67 | + {{ form.form_text({ |
| 68 | + columns:2, |
| 69 | + label:'End Time', |
| 70 | + name:'endAtTime', |
| 71 | + placeholder:'HH:MM', |
| 72 | + value:timeEndText, |
| 73 | + time:true, |
| 74 | + row:false |
| 75 | + }) }} |
| 76 | + </div> |
| 77 | + <div class="row"> |
| 78 | + <div class="medium-7 columns"> |
40 | 79 | <label> |
41 | 80 | {{ _('By Status') }} |
| 81 | + <input name="status" type="text" class="textbox" value="{{ status|default('') }}"> |
42 | 82 | </label> |
43 | | - <select class="select" name="status"> |
44 | | - <option value="" selected>{{ _('All Submissions') }}</option> |
45 | | - {%- for k,v in utils.status.STATUS_TEXTS -%} |
46 | | - <option value="{{k}}">{{v}}</option> |
47 | | - {%- endfor -%} |
48 | | - </select> |
49 | 83 | </div> |
50 | | - <div class="medium-6 columns"> |
| 84 | + <div class="medium-5 columns"> |
51 | 85 | <label> |
52 | | - {{ _('Apply') }} |
53 | | - <input name="apply" type="checkbox" class="checkbox" value="1"> |
| 86 | + <label class="checkbox"> |
| 87 | + {{ _('High priority') }} |
| 88 | + <input name="high_priority" type="checkbox" class="checkbox" {% if high_priority %}checked{% endif %}> |
| 89 | + </label> |
| 90 | + <br> |
| 91 | + <label class="checkbox"> |
| 92 | + {{ _('Apply result after rejudge') }} |
| 93 | + <input name="apply" type="checkbox" class="checkbox" {% if apply %}checked{% endif %}> |
| 94 | + </label> |
54 | 95 | </label> |
55 | 96 | </div> |
56 | 97 | </div> |
| 98 | + <div class="row"> |
| 99 | + <div class="medium-3 columns"> |
| 100 | + <button name="operation" value="preview" class="rounded button">{{ _('Preview') }}</button> |
| 101 | + <button name="operation" value="rejudge" class="rounded primary button">{{ _('Rejudge') }}</button> |
| 102 | + </div> |
| 103 | + </div> |
57 | 104 | <div class="row"><div class="columns"> |
58 | | - <button name="submit" class="rounded primary button">{{ _('Rejudge') }}</button> |
59 | 105 | </div></div> |
60 | 106 | </form> |
61 | 107 | </div> |
62 | 108 | </div> |
| 109 | +<div class="section"> |
| 110 | + <div class="section__header"> |
| 111 | + <h1 class="section__title">{{ _('Bulk Rejudge Result') }}</h1> |
| 112 | + </div> |
| 113 | + <div class="section__body no-padding"> |
| 114 | + <table class="data-table"> |
| 115 | + <colgroup> |
| 116 | + <col class="col--count"> |
| 117 | + <col class="col--beginAt"> |
| 118 | + <col class="col--status"> |
| 119 | + <col class="col--action"> |
| 120 | + </colgroup> |
| 121 | + <thead> |
| 122 | + <tr> |
| 123 | + <th>#</th> |
| 124 | + <th>{{ _('Operator') }}</th> |
| 125 | + <th>{{ _('Count') }}</th> |
| 126 | + <th>{{ _('Begin At') }}</th> |
| 127 | + <th>{{ _('Status') }}</th> |
| 128 | + <th>{{ _('Action') }}</th> |
| 129 | + </tr> |
| 130 | + </thead> |
| 131 | + <tbody> |
| 132 | + {%- for item in tasks -%} |
| 133 | + <tr> |
| 134 | + <td>{{ item._id.toHexString()|truncate(8,True,'') }}</td> |
| 135 | + <td>{{ user.render_inline(item.operator, badge=false) }}</td> |
| 136 | + <td>{{ item.count }}</td> |
| 137 | + <td>{{ item.beginAt }}</td> |
| 138 | + <td>{{ item.status }}</td> |
| 139 | + <td> |
| 140 | + <a class="typo-a" href="{{ url('manage_rejudge_detail', query={id: item._id.toHexString()}) }}">{{ _('View') }}</a> |
| 141 | + </td> |
| 142 | + </tr> |
| 143 | + {%- endfor -%} |
| 144 | + </tbody> |
| 145 | + </table> |
| 146 | + </div> |
| 147 | +</div> |
63 | 148 | {% endblock %} |
0 commit comments