Allow to create group and its contest on UI

This commit is contained in:
cuom1999 2022-09-15 02:05:02 -05:00
parent 196e2a9bb0
commit 67ef6b9111
28 changed files with 1029 additions and 556 deletions

View file

@ -1,9 +1,9 @@
{% extends "three-column-content.html" %}
{% extends "two-column-content.html" %}
{% block meta %}
<meta name="description" content="The {{ SITE_NAME }}'s contest list - past, present, and future.">
{% endblock %}
{% block three_col_media %}
{% block two_col_media %}
<style>
.time-left {
text-align: left;
@ -66,17 +66,10 @@
margin-left: 0.5em;
}
}
@media (min-width: 800px) {
.middle-content {
max-width: none;
padding-left: 1em;
}
}
</style>
{% endblock %}
{% block three_col_js %}
{% block two_col_js %}
<script src="{{ static('libs/featherlight/featherlight.min.js') }}" type="text/javascript"></script>
<script type="text/javascript">
$(document).ready(function () {
@ -127,19 +120,28 @@
<i class="fa fa-eye-slash"></i> {{ _('hidden') }}
</span>
{% endif %}
{% if contest.is_editable %}
<span style="background-color: green" class="contest-tag">
<a href="{{ url('organization_contest_edit', organization.id, organization.slug, contest.key) }}" style="color: white">
<i class="fa fa-edit"></i> {{ _('Edit') }}
</a>
</span>
{% endif %}
{% if contest.is_private %}
<span style="background-color: #666666; color: #ffffff" class="contest-tag">
<i class="fa fa-lock"></i> {{ _('private') }}
</span>
{% endif %}
{% if contest.is_organization_private %}
{% for org in contest.organizations.all() %}
<span style="background-color: #cccccc" class="contest-tag">
<a href="{{ org.get_absolute_url() }}" style="color: #000000">
<i class="fa fa-lock"></i> {{ org.name }}
</a>
</span>
{% endfor %}
{% if not hide_contest_orgs %}
{% if contest.is_organization_private %}
{% for org in contest.organizations.all() %}
<span style="background-color: #cccccc" class="contest-tag">
<a href="{{ org.get_absolute_url() }}" style="color: #000000">
<i class="fa fa-lock"></i> {{ org.name }}
</a>
</span>
{% endfor %}
{% endif %}
{% endif %}
{% if contest.is_rated %}
<span style="background-color: #e54c14; color: #ffffff" class="contest-tag">
@ -219,6 +221,9 @@
</select>
{% endif %}
<button id="search-btn" class="btn-green small"> {{ _('Search')}} </button>
{% if create_url %}
<a href="{{create_url}}" class="button small" style="float: right"><i class="fa fa-plus"></i> {{ _('Create')}}</a>
{% endif %}
</form>
{% if active_participations %}
<h4 class="toggle open">
@ -384,11 +389,12 @@
{{ user_count(contest, request.user) }}
</td>
{% if not request.in_contest %}
<td><form action="{{ url('contest_join', contest.key) }}" method="post">
<td><form action="{{ url('contest_join', contest.key) }}" method="post">
{% csrf_token %}
<input type="submit" class="unselectable button full small"
value="{{ _('Virtual join') }}">
</form></td>
</form>
</td>
{% endif %}
</tr>
{% endfor %}