Skip to content

Commit cfcd534

Browse files
committed
Clean up team index page.
Changes: - the striped tables don't provide a lot of additional value (anymore?), and I think the gray bites with table header - perhaps do the same changes later on other pages - The bold-ing of the submissions that have not been clicked is unnecessary - there is no real additional content that we want teams to acknowledge. We probably should use the unread column in the database for notifications instead - Remove the from/to columns for the clarification side and also remove the word "problem" in the subject column. from/to makes sense for jury interface but not so much for teams.
1 parent db01ff3 commit cfcd534

File tree

2 files changed

+13
-30
lines changed

2 files changed

+13
-30
lines changed

webapp/templates/team/partials/clarification_list.html.twig

Lines changed: 11 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,10 @@
44
{% endif %}
55

66
<div class="table-wrapper">
7-
<table class="data-table table table-striped table-hover table-sm" style="width:100%;">
7+
<table class="data-table table table-hover table-sm" style="width:100%;">
88
<thead class="thead-light">
99
<tr>
1010
<th scope="col">time</th>
11-
<th scope="col">from</th>
12-
<th scope="col">to</th>
1311
{% if includeSubject %}
1412
<th scope="col">subject</th>
1513
{% endif %}
@@ -26,33 +24,16 @@
2624
{{ clarification.submittime | printtime(null, clarification.contest) }}
2725
</a>
2826
</td>
29-
{%- if clarification.sender is null %}
30-
{%- set sender = 'Jury' %}
31-
{%- if clarification.recipient is null %}
32-
{%- set recipient = 'All' %}
33-
{%- else %}
34-
{%- set recipient = clarification.recipient.effectiveName %}
35-
{%- endif %}
36-
{%- else %}
37-
{%- set recipient = 'Jury' %}
38-
{%- set sender = clarification.sender.effectiveName %}
27+
{%- set prefix = '' %}
28+
{%- if clarification.sender is null and clarification.recipient is not null %}
29+
{%- set prefix = 'Reply to ' ~ clarification.recipient.effectiveName ~ ': ' %}
3930
{%- endif %}
4031

41-
<td>
42-
<a data-ajax-modal data-ajax-modal-after="markSeen" href="{{ link }}" title="{{ sender }}">
43-
{{ sender | u.truncate(teamname_max_length, '') }}
44-
</a>
45-
</td>
46-
<td>
47-
<a data-ajax-modal data-ajax-modal-after="markSeen" href="{{ link }}" title="{{ recipient }}">
48-
{{ recipient | u.truncate(teamname_max_length, '') }}
49-
</a>
50-
</td>
5132
{% if includeSubject %}
5233
<td>
5334
<a data-ajax-modal data-ajax-modal-after="markSeen" href="{{ link }}">
5435
{%- if clarification.problem -%}
55-
problem {{ clarification.contestProblem | problemBadge -}}
36+
{{ clarification.contestProblem | problemBadge -}}
5637
{%- elseif clarification.category -%}
5738
{{- categories[clarification.category]|default('general') -}}
5839
{%- else -%}
@@ -64,7 +45,12 @@
6445

6546
<td>
6647
<a data-ajax-modal data-ajax-modal-after="markSeen" href="{{ link }}">
67-
{{ clarification.summary | markdown_to_html | sanitize_html('app.clarification_sanitizer') }}
48+
{{ prefix }} <i>{{ clarification.summary
49+
| markdown_to_html
50+
| replace({'<p>': '', '</p>': ''})
51+
| sanitize_html('app.clarification_sanitizer')
52+
| raw
53+
}}</i>
6854
</a>
6955
</td>
7056
</tr>

webapp/templates/team/partials/submission_list.html.twig

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
{% if submissions is empty %}
55
<div class="alert alert-warning">No submissions</div>
66
{% else %}
7-
<table class="data-table table table-hover table-striped table-sm submissions-table">
7+
<table class="data-table table table-hover table-sm submissions-table">
88
<thead class="thead-light">
99
<tr>
1010
<th scope="col">time</th>
@@ -30,9 +30,6 @@
3030
{% if not submission.valid %}
3131
{% set classes = classes ~ ' ignore' %}
3232
{% endif %}
33-
{% if submission.judgings.first is empty or not submission.judgings.first.seen %}
34-
{% set classes = classes ~ ' unseen' %}
35-
{% endif %}
3633
<tr class="{{ classes }}">
3734
<td>
3835
<a data-ajax-modal data-ajax-modal-after="markSeen" {% if link %}href="{{ link }}"{% endif %}>
@@ -81,7 +78,7 @@
8178
{% endif %}
8279
{% if allowDownload %}
8380
<td>
84-
<a title="Download submission ZIP" aria-label="download submission zip" class="btn btn-light" href="{{ path('team_submission_download', {'submitId': submission.submitid}) }}">
81+
<a title="Download submission ZIP" aria-label="download submission zip" href="{{ path('team_submission_download', {'submitId': submission.submitid}) }}">
8582
<i class="fa fa-file-archive"></i>
8683
</a>
8784
</td>

0 commit comments

Comments
 (0)