Skip to content

Demo using bootstrap in team page #3030

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 5 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion webapp/public/js/domjudge.js
Original file line number Diff line number Diff line change
Expand Up @@ -617,7 +617,7 @@ function enableRefresh($url, $after, usingAjax) {
}
};
refreshHandler = setTimeout(refresh, $after * 1000);
refreshEnabled = true;
refreshEnabled = false;
setCookie('domjudge_refresh', 1);

if(window.location.href == localStorage.getItem('lastUrl')) {
Expand Down
11 changes: 0 additions & 11 deletions webapp/templates/base.html.twig
Original file line number Diff line number Diff line change
Expand Up @@ -48,17 +48,6 @@
{% endif %}
var markdownPreviewUrl = "{{ path('markdown_preview') }}";
$(function () {
/* toggle refresh if set */
{% if refresh is defined and refresh %}
$('#refresh-navitem').on('click', function () {
toggleRefresh('{{ refresh.url | raw }}', {{ refresh.after }}, {{ refresh.ajax | default(0) }});
});
{% endif %}
/* Enable page refresh if set if wanted by the page, and wanted by the user */
{% if refresh is defined and refresh and refresh_flag %}
enableRefresh('{{ refresh.url | raw }}', {{ refresh.after }}, {{ refresh.ajax | default(0) }});
{% endif %}

initializeAjaxModals();
});
</script>
Expand Down
79 changes: 69 additions & 10 deletions webapp/templates/team/partials/index_content.html.twig
Original file line number Diff line number Diff line change
Expand Up @@ -8,18 +8,77 @@
</h2>
{% else %}

<div id="teamscoresummary">
{% set displayRank = not contest.freezeData.showFrozen %}
{% include 'partials/scoreboard_table.html.twig' with {displayRank: displayRank, jury: false, public: false} %}
<div class="row equal mt-3">
<div class="col-sm-6">
<div class="card mb-3">
<div class="card-header">
Submissions
</div>
<div class="card-body">
{% include 'team/partials/submission_list.html.twig' %}
</div>
</div>
<div class="card mb-3">
<div class="card-header">
Clarifications
</div>
<div class="card-body">
{% if clarifications is empty %}
<p class="nodata">No clarifications.</p>
{% else %}
{% include 'team/partials/clarification_list.html.twig' with {clarifications: clarifications} %}
{% endif %}
</div>
</div>
<div class="card mb-3">
<div class="card-header">
Clarification Requests
</div>
<div class="card-body">
{% if clarificationRequests is empty %}
<p class="nodata">No clarification request.</p>
{% else %}
{% include 'team/partials/clarification_list.html.twig' with {clarifications: clarificationRequests} %}
{% endif %}
</div>
<div class="card-footer">
<a href="{{ path('team_clarification_add') }}" class="btn btn-secondary btn-sm" data-ajax-modal data-ajax-modal-after="initModalClarificationPreviewAdd">
Request clarification
</a>
</div>
</div>
</div>

<div class="mt-4" data-flash-messages>
{% include 'partials/messages.html.twig' %}
{% if not contest.allowSubmit %}
{% include 'partials/alert.html.twig' with {'type': 'danger', 'message': 'Submissions (temporarily) disabled.'} %}
{% endif %}
<div class="col-sm-6">
<div class="card mb-3" style="margin: 0; background-color: #c4d8ff;">
<div class="center card-header" style="background-color: inherit; border-bottom: 0 solid red;">
Clarifications
</div>
<div class="card-body" style="padding: 0">
{% if clarifications is empty %}
<p class="nodata">No clarifications.</p>
{% else %}
{% include 'team/partials/clarification_list_suggested.html.twig' with {clarifications: clarifications} %}
{% endif %}
</div>
</div>
<div class="card mb-3" style="padding: 0; background-color: #c4d8ff;"">
<div class="card-header">
Clarification Requests
<a style="float: right;" href="{{ path('team_clarification_add') }}" class="btn btn-secondary btn-sm" data-ajax-modal data-ajax-modal-after="initModalClarificationPreviewAdd">
Request clarification
</a>
</div>
<div class="card-body" style="padding: 0">
{% if clarificationRequests is empty %}
<p class="nodata">No clarification request.</p>
{% else %}
{% include 'team/partials/clarification_list_suggested.html.twig' with {clarifications: clarificationRequests} %}
{% endif %}
</div>
</div>
</div>

</div>
<div>
<div class="row">
<div class="col">
<h1 class="teamoverview">Submissions</h1>
Expand Down
Loading