Skip to content

Commit

Permalink
An actual solution without browserhack
Browse files Browse the repository at this point in the history
  • Loading branch information
vmcj committed Aug 27, 2023
1 parent 3dc4296 commit e5b3d20
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 249 deletions.
14 changes: 7 additions & 7 deletions webapp/public/style_jury.css
Original file line number Diff line number Diff line change
Expand Up @@ -203,6 +203,10 @@ table.submissions-table {
border-spacing: 0px 0px;
}

.table-full-clickable-cell tbody td:not(.testcase-results) {
padding: 0;
}

.table-full-clickable-cell tbody tr td:not(.testcase-results) a:not(.btn-sm), .table-full-clickable-cell tbody tr td:not(.testcase-results) a:hover:not(.btn-sm) {
display: table;
}
Expand All @@ -218,6 +222,7 @@ table.submissions-table {
padding: 0.25rem 0.5rem 0.25rem 0.5rem;
}

/* This is to re-align the `claim` button on the submission list overview */
table.table-full-clickable-cell thead.thead-light tr th.table-button-head-right {
padding-left: 0;
}
Expand All @@ -229,14 +234,9 @@ table.table-full-clickable-cell thead.thead-light tr th.table-button-head-left {
table.table-full-clickable-cell tr .table-button-head-right-right{
padding-left: 0.5rem;
}

.table-full-clickable-cell tbody td:not(.testcase-results) {
padding: 0;
}

/* This is to re-align the `claim` button on the submission list overview */

/*
.table-full-clickable-cell tbody td:not(.testcase-results) {
padding: 0;
height: 0;
Expand Down Expand Up @@ -275,4 +275,4 @@ table.table-full-clickable-cell tr .table-button-head-right-right{
display: table;
}
}
*/
*/
4 changes: 2 additions & 2 deletions webapp/templates/jury/jury_macros.twig
Original file line number Diff line number Diff line change
Expand Up @@ -74,9 +74,9 @@
padding-bottom: 1px;
}
/*.dataTables_filter {
.dataTables_filter {
text-align: inherit;
}*/
}
.table-wrapper {
display: inline-block;
Expand Down
241 changes: 1 addition & 240 deletions webapp/templates/jury/partials/submission_list.html.twig
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@
<td rowspan="{{ rowSpan }}" class="{{ tdExtraClass }}">
<a href="{{ link }}">{{ submission.submittime | printtime(null, submission.contest) }}</a>
</td>
<td rowspan="{{ rowSpan }}" class="{{ tdExtraClass }} entityButton">
<td rowspan="{{ rowSpan }}" class="{{ tdExtraClass }}" style="text-align: right;">
<a href="{{ link }}">
{{ submission.team | entityIdBadge('t') }}
</a>
Expand Down Expand Up @@ -280,245 +280,6 @@
{% endif %}
{%- endfor %}

</tbody>
</table>
<table class="data-table table table-hover table{% if showExternalResult and showExternalTestcases %}-3{% endif %}-striped table-sm submissions-table">
<thead class="thead-light">
<tr>
{% if showExternalResult and showExternalTestcases %}
<th scope="col" colspan="2">ID</th>
{% else %}
<th scope="col">ID</th>
{% endif %}
{%- if showContest %}

<th scope="col">contest</th>
{%- endif %}

<th scope="col">time</th>
<th scope="col" colspan="2">team</th>
<th scope="col">problem</th>
<th scope="col">lang</th>
{% if showExternalResult and showExternalTestcases %}
<th scope="col" colspan="2">result</th>
{% else %}
<th scope="col">result</th>
{% endif %}
{% if showExternalResult and not showExternalTestcases %}
<th scope="col">external result</th>
{% endif %}
{% if not showExternalResult or not showExternalTestcases %}
<th scope="col" class="table-button-head-left">verified</th>
<th scope="col" class="table-button-head-right">by</th>
{% endif %}
{%- if rejudging is defined %}

<th scope="col">old result</th>
{%- endif %}
{%- if showTestcases is defined and showTestcases %}

<th scope="col" class="not-sortable not-searchable">test results</th>
{%- endif %}

</tr>
</thead>
<tbody>
{%- for submission in submissions %}
{%- if rejudging is defined %}
{%- set link = path('jury_submission', {submitId: submission.submitid, rejudgingid: rejudging.rejudgingid}) %}
{%- else %}
{%- set link = path('jury_submission', {submitId: submission.submitid}) %}
{%- endif %}

<tr class="{% if not submission.valid %}ignore{% endif %}"
data-problem-id="{{ submission.problem.probid }}"
data-team-id="{{ submission.team.teamid }}"
data-category-id="{{ submission.team.category.categoryid }}"
data-affiliation-id="{{ submission.team.affiliationId }}"
data-language-id="{{ submission.language.langid }}"
data-submission-id="{{ submission.submitid }}"
data-result="{{ submission | printValidJurySubmissionResult(false) }}">
{% if showExternalResult and showExternalTestcases %}
<td class="{{ tdExtraClass }}">
<a href="{{ link }}">
Local
</a>
</td>
{% endif %}
<td class="{{ tdExtraClass }}">
<a href="{{ link }}">
s{{ submission.submitid }}
{% if submission.externalid %}
({{ submission.externalid }})
{% endif %}
</a>
</td>
{%- if showContest %}
<td class="{{ tdExtraClass }}"><a href="{{ link }}">c{{ submission.contest.cid }}</a></td>
{%- endif %}

<td rowspan="{{ rowSpan }}" class="{{ tdExtraClass }}">
<a href="{{ link }}">{{ submission.submittime | printtime(null, submission.contest) }}</a>
</td>
<td rowspan="{{ rowSpan }}" class="{{ tdExtraClass }} entityButton">
<a href="{{ link }}">
{{ submission.team | entityIdBadge('t') }}
</a>
</td>
<td rowspan="{{ rowSpan }}" class="{{ tdExtraClass }}">
<a href="{{ link }}">
{{ submission.team.effectiveName | u.truncate(teamname_max_length, '') }}
</a>
</td>
<td class="probid{{ tdExtraClass }}" rowspan="{{ rowSpan }}">
<a href="{{ link }}"
title="{{ submission.problem.name }}">{{ submission.contestProblem | problemBadge }}</a>
</td>
<td class="langid{{ tdExtraClass }}" rowspan="{{ rowSpan }}">
<a href="{{ link }}"
title="{{ submission.language.name }}">{{ submission.language.langid }}</a>
</td>
{% if showExternalResult and showExternalTestcases %}
<td class="{{ tdExtraClass }}">
<a href="{{ link }}">
Local
</a>
</td>
{% endif %}
<td class="{{ tdExtraClass }}">
<a href="{{ link }}">
{{ submission | printValidJurySubmissionResult }}
</a>
</td>
{% if showExternalResult and not showExternalTestcases %}
{% if submission.externalJudgements.empty %}
{% set externalJudgement = null %}
{% else %}
{% set externalJudgement = submission.externalJudgements.first %}
{% endif %}
<td class="{{ tdExtraClass }}">
<a href="{{ link }}">
{% if submission.externalid is null %}
{{- 'n / a' | printValidJuryResult -}}
{% elseif externalJudgement is null or externalJudgement.result is empty %}
{{- 'pending' | printValidJuryResult -}}
{% else %}
{{- externalJudgement.result | printValidJuryResult -}}
{% endif %}
</a>
</td>
{% endif %}
{% if not showExternalResult or not showExternalTestcases %}
{%- set claim = false %}
{%- if submission.judgings.first is empty or submission.judgings.first.result is empty -%}
{%- set verified = '' %}
{%- set juryMember = '' %}
{%- else %}
{%- set juryMember = submission.judgings.first.juryMember %}
{%- if submission.judgings.first.verified %}
{%- set verified = 'yes' %}
{%- else %}
{%- set verified = 'no' %}
{%- if submission.judgings.first.juryMember is empty %}
{%- set claim = true %}
{%- else %}
{%- set verified = 'claimed' %}
{%- endif %}
{%- endif %}
{%- endif %}
{%- if claim %}
{%- set claimArg = {claim: 1} %}
{%- else %}
{%- set claimArg = {unclaim: 1} %}
{%- endif %}
<td class="{{ tdExtraClass }}"><a href="{{ link }}">{{ verified }}</a></td>
{% if not showExternalResult or not showExternalTestcases %}
<td class="{{ tdExtraClass }}">
{%- if rejudging is defined %}
{%- set claimLink = path('jury_submission', claimArg | merge({submitId: submission.submitid, rejudgingid: rejudging.rejudgingid})) %}
{%- else %}
{%- set claimLink = path('jury_submission', claimArg | merge({submitId: submission.submitid})) %}
{%- endif %}
{%- if claim -%}
<a class="btn btn-outline-secondary btn-sm"
href="{{ claimLink }}">claim</a>
{%- elseif (not submission.judgings.first or not submission.judgings.first.verified) and juryMember == app.user.username -%}
<a class="btn btn-info btn-sm" href="{{ claimLink }}">unclaim</a>
{%- else -%}
<a href="{{ link }}">{{ juryMember }}</a>
{%- endif -%}
</td>
{% endif %}
{% endif %}
{%- if rejudging is defined %}

<td class="{{ tdExtraClass }}"><a href="{{ path('jury_submission', {submitId: submission.submitid}) }}">
{{ submission.oldResult | printValidJuryResult }}
</a></td>
{%- endif %}
{%- if showTestcases is defined and showTestcases %}

<td class="testcase-results{{ tdExtraClass }}">
{{- submission | testcaseResults -}}
</td>
{%- endif %}

</tr>
{% if showExternalResult and showExternalTestcases %}
<tr>
{% if submission.externalJudgements.empty %}
{% set externalJudgement = null %}
{% else %}
{% set externalJudgement = submission.externalJudgements.first %}
{% endif %}
{% if external_ccs_submission_url is not empty %}
{% set externalSubmissionUrl = submission | externalCcsUrl %}
{% else %}
{% set externalSubmissionUrl = null %}
{% endif %}
<td rowspan="2">
<a {% if externalSubmissionUrl is not null %}href="{{ externalSubmissionUrl }}"{% endif %}>
External
</a>
</td>
<td rowspan="2">
<a {% if externalSubmissionUrl is not null %}href="{{ externalSubmissionUrl }}"{% endif %}>
{{ submission.externalid }}
</a>
</td>
<td>
<a {% if externalSubmissionUrl is not null %}href="{{ externalSubmissionUrl }}"{% endif %}>
External
</a>
</td>
<td>
<a {% if externalSubmissionUrl is not null %}href="{{ externalSubmissionUrl }}"{% endif %}>
{% if externalJudgement is null or externalJudgement.result is empty %}
{{- 'pending' | printValidJuryResult -}}
{% else %}
{{- externalJudgement.result | printValidJuryResult -}}
{% endif %}
</a>
</td>
<td class="testcase-results">
{{- submission | testcaseResults(true) -}}
</td>
</tr>
<tr>
<td colspan="3" class="inline-verify-form">
{% if externalJudgement is not null and (not submission.judgings.first or submission.judgings.first.result != externalJudgement.result) %}
{% include 'jury/partials/verify_form.html.twig' with {
label: 'Shadow difference verified',
judging: externalJudgement,
form_action: path('jury_shadow_difference_verify', {extjudgementid: externalJudgement.extjudgementid}),
show_form: true,
show_icat: false} %}
{% endif %}
</td>
</tr>
{% endif %}
{%- endfor %}

</tbody>
</table>
{% endif %}

0 comments on commit e5b3d20

Please sign in to comment.