Reformat html files

This commit is contained in:
cuom1999 2023-01-27 17:11:10 -06:00
parent 9a208ca108
commit 52f1e77fe1
205 changed files with 11096 additions and 11086 deletions

View file

@ -1,9 +1,9 @@
{% extends "organization/home-base.html" %}
{% block org_js %}
{{ form.media.js }}
{% endblock %}
{% block middle_content %}
{% include "organization/form.html" %}
{% endblock %}
{% extends "organization/home-base.html" %}
{% block org_js %}
{{ form.media.js }}
{% endblock %}
{% block middle_content %}
{% include "organization/form.html" %}
{% endblock %}

View file

@ -1,18 +1,18 @@
{% extends "two-column-content.html" %}
{% block two_col_js %}
{{ form.media.js }}
{% endblock %}
{% block two_col_media %}
{{ form.media.css }}
{% endblock %}
{% block left_sidebar %}
{% include "user/user-left-sidebar.html" %}
{% endblock %}
{% block middle_content %}
<center><h2>{{title}}</h2></center>
{% include "organization/form.html" %}
{% endblock %}
{% extends "two-column-content.html" %}
{% block two_col_js %}
{{ form.media.js }}
{% endblock %}
{% block two_col_media %}
{{ form.media.css }}
{% endblock %}
{% block left_sidebar %}
{% include "user/user-left-sidebar.html" %}
{% endblock %}
{% block middle_content %}
<center><h2>{{title}}</h2></center>
{% include "organization/form.html" %}
{% endblock %}

View file

@ -1,14 +1,14 @@
{% extends "organization/home-base.html" %}
{% block three_col_js %}
{{ form.media.js }}
{% include "organization/home-js.html" %}
{% endblock %}
{% block three_col_media %}
{{ form.media.css }}
{% endblock %}
{% block middle_content %}
{% include "organization/form.html" %}
{% extends "organization/home-base.html" %}
{% block three_col_js %}
{{ form.media.js }}
{% include "organization/home-js.html" %}
{% endblock %}
{% block three_col_media %}
{{ form.media.css }}
{% endblock %}
{% block middle_content %}
{% include "organization/form.html" %}
{% endblock %}

View file

@ -1,39 +1,39 @@
{% extends "organization/home-base.html" %}
{% block three_col_js %}
{{ form.media.js }}
{% include "organization/home-js.html" %}
{{ form.media.js }}
{% include "organization/home-js.html" %}
{% endblock %}
{% block three_col_media %}
{{ form.media.css }}
{{ form.media.css }}
{% endblock %}
{% block middle_content %}
<form action="" method="post">
<form action="" method="post">
{% csrf_token %}
{% if form.errors %}
<div class="alert alert-danger alert-dismissable">
<a href="#" class="close">x</a>
{{ form.non_field_errors() }}
{{ form.errors }}
</div>
<div class="alert alert-danger alert-dismissable">
<a href="#" class="close">x</a>
{{ form.non_field_errors() }}
{{ form.errors }}
</div>
{% endif %}
{% for field in form %}
{% if not field.is_hidden %}
<div style="margin-bottom: 1em;">
{{ field.errors }}
<label for="{{field.id_for_label }}"><b>{{ field.label }}{% if field.field.required %}<span style="color:red"> * </span>{% endif %}:</b> </label>
<div class="org-field-wrapper" id="org-field-wrapper-{{field.html_name }}">
{{ field }}
</div>
{% if field.help_text %}
<i style="display: block">{{ field.help_text|safe }}</i>
{% endif %}
</div>
{% endif %}
{% if not field.is_hidden %}
<div style="margin-bottom: 1em;">
{{ field.errors }}
<label for="{{field.id_for_label }}"><b>{{ field.label }}{% if field.field.required %}<span style="color:red"> * </span>{% endif %}:</b> </label>
<div class="org-field-wrapper" id="org-field-wrapper-{{field.html_name }}">
{{ field }}
</div>
{% if field.help_text %}
<i style="display: block">{{ field.help_text|safe }}</i>
{% endif %}
</div>
{% endif %}
{% endfor %}
<button type="submit" style="display: inline;" name="action" value="Save" >{{ _('Save') }} </button>
<button type="submit" style="background-color: red; float: right;" name="action" value="Delete" > {{ _('Delete') }} </button>
</form>
</form>
{% endblock %}

View file

@ -1,28 +1,28 @@
{% extends "organization/home-base.html" %}
{% block middle_content %}
<table class="table">
<thead>
<tr>
<th>
{{_('Blog')}}
</th>
<th>
{{_('Author')}}
</th>
<th>
{{_('Post time')}}
</th>
</tr>
</thead>
<tbody>
{% for blog in blogs %}
<tr>
<td><a href="{{url('edit_organization_blog', organization.id, organization.slug, blog.id)}}">{{blog.title}}</a></td>
<td>{{link_users(blog.authors.all())}}</td>
<td>{{- blog.publish_on|date(_("N j, Y, g:i a")) -}}</td>
</tr>
{% endfor %}
</tbody>
</table>
{% extends "organization/home-base.html" %}
{% block middle_content %}
<table class="table">
<thead>
<tr>
<th>
{{_('Blog')}}
</th>
<th>
{{_('Author')}}
</th>
<th>
{{_('Post time')}}
</th>
</tr>
</thead>
<tbody>
{% for blog in blogs %}
<tr>
<td><a href="{{url('edit_organization_blog', organization.id, organization.slug, blog.id)}}">{{blog.title}}</a></td>
<td>{{link_users(blog.authors.all())}}</td>
<td>{{- blog.publish_on|date(_("N j, Y, g:i a")) -}}</td>
</tr>
{% endfor %}
</tbody>
</table>
{% endblock %}

View file

@ -1,38 +1,38 @@
{% extends "organization/home-base.html" %}
{% block three_col_js %}
{{ form.media.js }}
{% endblock %}
{% block three_col_media %}
{{ form.media.css }}
{% endblock %}
{% block middle_content %}
<form action="" method="post">
{% csrf_token %}
{% if form.errors %}
<div class="alert alert-danger alert-dismissable">
<a href="#" class="close">x</a>
{{ form.non_field_errors() }}
{{ form.errors }}
</div>
{% endif %}
{% for field in form %}
{% if not field.is_hidden %}
<div style="margin-bottom: 1em;">
{{ field.errors }}
<label for="{{field.id_for_label }}"><b>{{ field.label }}{% if field.field.required %}<span class="red"> * </span>{% endif %}:</b> </label>
<div class="org-field-wrapper" id="org-field-wrapper-{{field.html_name }}">
{{ field }}
</div>
{% if field.help_text %}
<i style="display: block">{{ field.help_text|safe }}</i>
{% endif %}
</div>
{% endif %}
{% endfor %}
<button type="submit">{{ _('Save') }}</button>
</form>
{% extends "organization/home-base.html" %}
{% block three_col_js %}
{{ form.media.js }}
{% endblock %}
{% block three_col_media %}
{{ form.media.css }}
{% endblock %}
{% block middle_content %}
<form action="" method="post">
{% csrf_token %}
{% if form.errors %}
<div class="alert alert-danger alert-dismissable">
<a href="#" class="close">x</a>
{{ form.non_field_errors() }}
{{ form.errors }}
</div>
{% endif %}
{% for field in form %}
{% if not field.is_hidden %}
<div style="margin-bottom: 1em;">
{{ field.errors }}
<label for="{{field.id_for_label }}"><b>{{ field.label }}{% if field.field.required %}<span class="red"> * </span>{% endif %}:</b> </label>
<div class="org-field-wrapper" id="org-field-wrapper-{{field.html_name }}">
{{ field }}
</div>
{% if field.help_text %}
<i style="display: block">{{ field.help_text|safe }}</i>
{% endif %}
</div>
{% endif %}
{% endfor %}
<button type="submit">{{ _('Save') }}</button>
</form>
{% endblock %}

View file

@ -1,88 +1,88 @@
{% extends "organization/home-base.html" %}
{% block three_col_js %}
{{ form.media.js }}
{% endblock %}
{% block three_col_media %}
{{ form.media.css }}
<style>
#org-field-wrapper-scoreboard_visibility,
#org-field-wrapper-points_precision,
#org-field-wrapper-start_time,
#org-field-wrapper-end_time,
#org-field-wrapper-time_limit,
#org-field-wrapper-format_name {
display: inline-flex;
}
.problems-problem {
width: 40%;
}
input[type=number] {
width: 5em;
}
.middle-content {
z-index: 1;
}
#three-col-container {
overflow: auto;
}
</style>
{% endblock %}
{% block middle_content %}
<form action="" method="post">
{% csrf_token %}
{% if form.errors %}
<div class="alert alert-danger alert-dismissable">
<a href="#" class="close">x</a>
{{ form.non_field_errors() }}
{{ form.errors }}
</div>
{% endif %}
{% for field in form %}
{% if not field.is_hidden %}
<div style="margin-bottom: 1em;">
{{ field.errors }}
<label for="{{field.id_for_label }}"><b>{{ field.label }}{% if field.field.required %}<span class="red"> * </span>{% endif %}:</b> </label>
<div class="org-field-wrapper" id="org-field-wrapper-{{field.html_name }}">
{{ field }}
</div>
{% if field.help_text %}
<i style="display: block">{{ field.help_text|safe }}</i>
{% endif %}
</div>
{% endif %}
{% endfor %}
<hr><br>
{{ problems_form.management_form }}
<i>{{_('If you run out of rows, click Save')}}</i>
<table class="table">
<thead>
<tr>
{% for field in problems_form[0] %}
{% if not field.is_hidden %}
<th>
{{field.label}}
</th>
{% endif %}
{% endfor %}
</tr>
</thead>
<tbody>
{% for form in problems_form %}
<tr>
{% for field in form %}
<td class="problems-{{field.name}}" title="
{{ field.help_text|safe if field.help_text }}"
style="{{ 'display:none' if field.is_hidden }}"
>{{field}}<div class="red">{{field.errors}}</div></td>
{% endfor %}
</tr>
{% endfor %}
</tbody>
</table>
<button type="submit">{{ _('Save') }}</button>
</form>
{% extends "organization/home-base.html" %}
{% block three_col_js %}
{{ form.media.js }}
{% endblock %}
{% block three_col_media %}
{{ form.media.css }}
<style>
#org-field-wrapper-scoreboard_visibility,
#org-field-wrapper-points_precision,
#org-field-wrapper-start_time,
#org-field-wrapper-end_time,
#org-field-wrapper-time_limit,
#org-field-wrapper-format_name {
display: inline-flex;
}
.problems-problem {
width: 40%;
}
input[type=number] {
width: 5em;
}
.middle-content {
z-index: 1;
}
#three-col-container {
overflow: auto;
}
</style>
{% endblock %}
{% block middle_content %}
<form action="" method="post">
{% csrf_token %}
{% if form.errors %}
<div class="alert alert-danger alert-dismissable">
<a href="#" class="close">x</a>
{{ form.non_field_errors() }}
{{ form.errors }}
</div>
{% endif %}
{% for field in form %}
{% if not field.is_hidden %}
<div style="margin-bottom: 1em;">
{{ field.errors }}
<label for="{{field.id_for_label }}"><b>{{ field.label }}{% if field.field.required %}<span class="red"> * </span>{% endif %}:</b> </label>
<div class="org-field-wrapper" id="org-field-wrapper-{{field.html_name }}">
{{ field }}
</div>
{% if field.help_text %}
<i style="display: block">{{ field.help_text|safe }}</i>
{% endif %}
</div>
{% endif %}
{% endfor %}
<hr><br>
{{ problems_form.management_form }}
<i>{{_('If you run out of rows, click Save')}}</i>
<table class="table">
<thead>
<tr>
{% for field in problems_form[0] %}
{% if not field.is_hidden %}
<th>
{{field.label}}
</th>
{% endif %}
{% endfor %}
</tr>
</thead>
<tbody>
{% for form in problems_form %}
<tr>
{% for field in form %}
<td class="problems-{{field.name}}" title="
{{ field.help_text|safe if field.help_text }}"
style="{{ 'display:none' if field.is_hidden }}"
>{{field}}<div class="red">{{field.errors}}</div></td>
{% endfor %}
</tr>
{% endfor %}
</tbody>
</table>
<button type="submit">{{ _('Save') }}</button>
</form>
{% endblock %}

View file

@ -1,4 +1,4 @@
{% extends "contest/list.html" %}
{% block left_sidebar %}
{% include "organization/org-left-sidebar.html" %}
{% extends "contest/list.html" %}
{% block left_sidebar %}
{% include "organization/org-left-sidebar.html" %}
{% endblock %}

View file

@ -1,36 +1,36 @@
{% extends "organization/home-base.html" %}
{% block org_js %}
{{ form.media.js }}
<script type="text/javascript">
window.django = {jQuery: $};
{{ form.media.js }}
<script type="text/javascript">
window.django = {jQuery: $};
function pluralidx(count) {
return (count == 1) ? 0 : 1;
}
function pluralidx(count) {
return (count == 1) ? 0 : 1;
}
function gettext(msgid) {
return msgid;
}
function gettext(msgid) {
return msgid;
}
function interpolate(fmt, obj, named) {
if (named) {
return fmt.replace(/%\(\w+\)s/g, function (match) {
return String(obj[match.slice(2, -2)])
});
} else {
return fmt.replace(/%s/g, function (match) {
return String(obj.shift())
});
}
}
</script>
function interpolate(fmt, obj, named) {
if (named) {
return fmt.replace(/%\(\w+\)s/g, function (match) {
return String(obj[match.slice(2, -2)])
});
} else {
return fmt.replace(/%s/g, function (match) {
return String(obj.shift())
});
}
}
</script>
{% endblock %}
{% block three_col_media %}
{{ form.media.css }}
{{ form.media.css }}
{% endblock %}
{% block middle_content %}
{% include "organization/form.html" %}
{% include "organization/form.html" %}
{% endblock %}

View file

@ -1,25 +1,25 @@
<form action="" method="post">
{% csrf_token %}
{% if form.errors %}
<div class="alert alert-danger alert-dismissable">
<a href="#" class="close">x</a>
{{ form.non_field_errors() }}
{{ form.errors }}
{% csrf_token %}
{% if form.errors %}
<div class="alert alert-danger alert-dismissable">
<a href="#" class="close">x</a>
{{ form.non_field_errors() }}
{{ form.errors }}
</div>
{% endif %}
{% for field in form %}
{% if not field.is_hidden %}
<div style="margin-bottom: 1em;">
{{ field.errors }}
<label for="{{field.id_for_label }}"><b>{{ field.label }}{% if field.field.required %}<span class="red"> * </span>{% endif %}:</b> </label>
<div class="org-field-wrapper" id="org-field-wrapper-{{field.html_name }}">
{{ field }}
</div>
{% endif %}
{% for field in form %}
{% if not field.is_hidden %}
<div style="margin-bottom: 1em;">
{{ field.errors }}
<label for="{{field.id_for_label }}"><b>{{ field.label }}{% if field.field.required %}<span class="red"> * </span>{% endif %}:</b> </label>
<div class="org-field-wrapper" id="org-field-wrapper-{{field.html_name }}">
{{ field }}
</div>
{% if field.help_text %}
<i style="display: block">{{ field.help_text|safe }}</i>
{% endif %}
</div>
{% if field.help_text %}
<i style="display: block">{{ field.help_text|safe }}</i>
{% endif %}
{% endfor %}
<button type="submit" style="display: inline;" name="action" value="Save" >{{ _('Save') }} </button>
</div>
{% endif %}
{% endfor %}
<button type="submit" style="display: inline;" name="action" value="Save" >{{ _('Save') }} </button>
</form>

View file

@ -1,21 +1,21 @@
{% extends "three-column-content.html" %}
{% block three_col_js %}
{% include "organization/home-js.html" %}
{% block org_js %}{% endblock %}
{% endblock %}
{% block left_sidebar %}
{% include "organization/org-left-sidebar.html" %}
{% endblock %}
{% block right_sidebar %}
{% include "organization/org-right-sidebar.html" %}
{% endblock %}
{% block middle_title %}
{% if title or content_title %}
<center><h2>{{ content_title if content_title else title }}</h2></center>
<br/>
{% endif %}
{% endblock %}
{% extends "three-column-content.html" %}
{% block three_col_js %}
{% include "organization/home-js.html" %}
{% block org_js %}{% endblock %}
{% endblock %}
{% block left_sidebar %}
{% include "organization/org-left-sidebar.html" %}
{% endblock %}
{% block right_sidebar %}
{% include "organization/org-right-sidebar.html" %}
{% endblock %}
{% block middle_title %}
{% if title or content_title %}
<center><h2>{{ content_title if content_title else title }}</h2></center>
<br/>
{% endif %}
{% endblock %}

View file

@ -1,23 +1,23 @@
<script type="text/javascript">
$(function () {
$('.time-remaining').each(function () {
count_down($(this));
});
$('.leave-organization').click(function () {
if (confirm('{{ _('Are you sure you want to leave this organization?') }}\n' +
{% if organization.is_open %}
'{{ _('You will have to rejoin to show up on the organization leaderboard.') }}'
{% else %}
'{{ _('You will have to request membership in order to join again.') }}'
{% endif %}
)) {
$(this).parent().submit();
}
});
$('#control-panel a').on('click', function(e) {
e.preventDefault();
navigateTo($(this));
})
});
<script type="text/javascript">
$(function () {
$('.time-remaining').each(function () {
count_down($(this));
});
$('.leave-organization').click(function () {
if (confirm('{{ _('Are you sure you want to leave this organization?') }}\n' +
{% if organization.is_open %}
'{{ _('You will have to rejoin to show up on the organization leaderboard.') }}'
{% else %}
'{{ _('You will have to request membership in order to join again.') }}'
{% endif %}
)) {
$(this).parent().submit();
}
});
$('#control-panel a').on('click', function(e) {
e.preventDefault();
navigateTo($(this));
})
});
</script>

View file

@ -3,62 +3,62 @@
{% block title_ruler %}{% endblock %}
{% block org_js %}
{% include "actionbar/media-js.html" %}
{% include "actionbar/media-js.html" %}
{% endblock %}
{% block three_col_media %}
{% include "actionbar/media-css.html" %}
{% include "actionbar/media-css.html" %}
{% endblock %}
{% block middle_title %}
<div class="page-title">
<div class="tabs" style="border: none;">
<h2><img src="{{logo_override_image}}" style="height: 3rem; vertical-align: middle">
{{title}}
</h2>
{% if is_member %}
<div>
<a href="{{organization_subdomain}}" target="_blank">(Subdomain)</a>
</div>
{% endif %}
<span class="spacer"></span>
{% if request.user.is_authenticated %}
{% if is_member %}
{% elif organization.is_open or can_edit %}
<form method="post" action="{{ url('join_organization', organization.id, organization.slug) }}">
{% csrf_token %}
<input type="submit" class="unselectable button" value="{{ _('Join') }}">
</form>
{% else %}
<a href="{{ url('request_organization', organization.id, organization.slug) }}"
class="unselectable button">{{ _('Request membership') }}</a>
{% endif %}
{% endif %}
<div class="page-title">
<div class="tabs" style="border: none;">
<h2><img src="{{logo_override_image}}" style="height: 3rem; vertical-align: middle">
{{title}}
</h2>
{% if is_member %}
<div>
<a href="{{organization_subdomain}}" target="_blank">(Subdomain)</a>
</div>
{% endif %}
<span class="spacer"></span>
{% if request.user.is_authenticated %}
{% if is_member %}
{% elif organization.is_open or can_edit %}
<form method="post" action="{{ url('join_organization', organization.id, organization.slug) }}">
{% csrf_token %}
<input type="submit" class="unselectable button" value="{{ _('Join') }}">
</form>
{% else %}
<a href="{{ url('request_organization', organization.id, organization.slug) }}"
class="unselectable button">{{ _('Request membership') }}</a>
{% endif %}
{% endif %}
</div>
</div>
{% endblock %}
{% block middle_content %}
{% block before_posts %}{% endblock %}
{% if is_member or can_edit %}
{% for post in posts %}
{% include "blog/content.html" %}
{% endfor %}
{% if posts.paginator.num_pages > 1 %}
<div style="margin-bottom:10px;margin-top:10px">{% include "list-pages.html" %}</div>
{% endif %}
{% else %}
<div class="blog-sidebox sidebox">
<h3>{{ _('About') }}<i class="fa fa-info-circle"></i></h3>
<div class="sidebox-content">
<div style="margin: 0.3em;">
{% cache 3600 'organization_html' organization.id MATH_ENGINE %}
{{ organization.about|markdown|reference|str|safe }}
{% endcache %}
</div>
</div>
</div>
{% block before_posts %}{% endblock %}
{% if is_member or can_edit %}
{% for post in posts %}
{% include "blog/content.html" %}
{% endfor %}
{% if posts.paginator.num_pages > 1 %}
<div style="margin-bottom:10px;margin-top:10px">{% include "list-pages.html" %}</div>
{% endif %}
{% block after_posts %}{% endblock %}
{% else %}
<div class="blog-sidebox sidebox">
<h3>{{ _('About') }}<i class="fa fa-info-circle"></i></h3>
<div class="sidebox-content">
<div style="margin: 0.3em;">
{% cache 3600 'organization_html' organization.id MATH_ENGINE %}
{{ organization.about|markdown|reference|str|safe }}
{% endcache %}
</div>
</div>
</div>
{% endif %}
{% block after_posts %}{% endblock %}
{% endblock %}

View file

@ -1,49 +1,49 @@
{% extends "two-column-content.html" %}
{% block two_col_media %}
<style>
.organization-container .organization-row:last-child {
border-bottom: none;
}
.org-logo {
vertical-align: middle;
height: 2em;
width: 2em;
display: inline-block;
margin-right: 1em;
margin-left: 0.5em;
}
.toggle {
cursor: pointer;
}
</style>
<style>
.organization-container .organization-row:last-child {
border-bottom: none;
}
.org-logo {
vertical-align: middle;
height: 2em;
width: 2em;
display: inline-block;
margin-right: 1em;
margin-left: 0.5em;
}
.toggle {
cursor: pointer;
}
</style>
{% endblock %}
{% block title_ruler %}{% endblock %}
{% block left_sidebar %}
{% include "user/user-left-sidebar.html" %}
{% include "user/user-left-sidebar.html" %}
{% endblock %}
{% macro org_list(title, queryset) %}
{% if queryset %}
<h3 style="padding-bottom: 1em" class="toggle open"><i class="fa fa-chevron-right fa-fw"></i> {{title}} ({{queryset.count()}})</h3>
<div class="organization-container toggled">
{% for org in queryset %}
<a href="{{ org.get_absolute_url() }}" class="organization-row" title="{{org.about}}">
<img class="org-logo" data-src="{{ org.logo_override_image or static('icons/icon.png') }}">
<span style="margin-right: auto">{{ org.name }}</span>
<span style="font-weight: normal"><i>{{ org.member_count }} {{_('members')}}</i></span>
</a>
{% endfor %}
</div>
{% endif %}
{% if queryset %}
<h3 style="padding-bottom: 1em" class="toggle open"><i class="fa fa-chevron-right fa-fw"></i> {{title}} ({{queryset.count()}})</h3>
<div class="organization-container toggled">
{% for org in queryset %}
<a href="{{ org.get_absolute_url() }}" class="organization-row" title="{{org.about}}">
<img class="org-logo" data-src="{{ org.logo_override_image or static('icons/icon.png') }}">
<span style="margin-right: auto">{{ org.name }}</span>
<span style="font-weight: normal"><i>{{ org.member_count }} {{_('members')}}</i></span>
</a>
{% endfor %}
</div>
{% endif %}
{% endmacro %}
{% block middle_content %}
<a style="float: right" class="button small" href="{{url('organization_add')}}">{{_("Create group")}}</a>
{{ org_list(_('My groups'), my_organizations) }}
{{ org_list(_('Open groups'), open_organizations) }}
{{ org_list(_('Private groups'), private_organizations) }}
<a style="float: right" class="button small" href="{{url('organization_add')}}">{{_("Create group")}}</a>
{{ org_list(_('My groups'), my_organizations) }}
{{ org_list(_('Open groups'), open_organizations) }}
{{ org_list(_('Private groups'), private_organizations) }}
{% endblock %}

View file

@ -4,9 +4,9 @@
{% block media %}{{ form.media.css }}{% endblock %}
{% block body %}
<form action="" method="post" class="form-area">
{% csrf_token %}
<table border="0" style="text-align:left">{{ form.as_table() }}</table>
<button type="submit">{{ _('Create') }}</button>
</form>
<form action="" method="post" class="form-area">
{% csrf_token %}
<table border="0" style="text-align:left">{{ form.as_table() }}</table>
<button type="submit">{{ _('Create') }}</button>
</form>
{% endblock %}

View file

@ -1,14 +1,14 @@
<div class="left-sidebar">
{{ make_tab_item('home', 'fa fa-home', organization.get_absolute_url(), _('Home')) }}
{% if is_member or can_edit %}
{{ make_tab_item('problems', 'fa fa-list', organization.get_problems_url(), _('Problems')) }}
{{ make_tab_item('contests', 'fa fa-trophy', organization.get_contests_url(), _('Contests')) }}
{{ make_tab_item('submissions', 'fa fa-book', organization.get_submissions_url(), _('Submissions')) }}
{% endif %}
{% if is_member or can_edit or organization.is_open %}
{{ make_tab_item('users', 'fa fa-user', organization.get_users_url(), _('Members')) }}
{% endif %}
{% if perms.judge.change_organization %}
{{ make_tab_item('admin', 'fa fa-edit', url('admin:judge_organization_change', organization.id), _('Admin')) }}
{% endif %}
<div class="left-sidebar">
{{ make_tab_item('home', 'fa fa-home', organization.get_absolute_url(), _('Home')) }}
{% if is_member or can_edit %}
{{ make_tab_item('problems', 'fa fa-list', organization.get_problems_url(), _('Problems')) }}
{{ make_tab_item('contests', 'fa fa-trophy', organization.get_contests_url(), _('Contests')) }}
{{ make_tab_item('submissions', 'fa fa-book', organization.get_submissions_url(), _('Submissions')) }}
{% endif %}
{% if is_member or can_edit or organization.is_open %}
{{ make_tab_item('users', 'fa fa-user', organization.get_users_url(), _('Members')) }}
{% endif %}
{% if perms.judge.change_organization %}
{{ make_tab_item('admin', 'fa fa-edit', url('admin:judge_organization_change', organization.id), _('Admin')) }}
{% endif %}
</div>

View file

@ -1,83 +1,83 @@
<div class="right-sidebar">
{% if (is_member or can_edit) %}
{% include 'contests-countdown.html' %}
{% endif %}
{% if can_edit or is_member %}
<div id="control-panel" class="blog-sidebox sidebox no-dot-blog-sidebox">
<h3>{{ _('Controls') }} <i class="fa fa-cog"></i></h3>
<ul id="control-list" class="sidebox-content" style="padding: 1em;">
{% if can_edit %}
<li>
<div>
<a href="{{ url('edit_organization', organization.id, organization.slug) }}">{{ _('Edit group') }}</a>
</div>
</li>
{% endif %}
{% if can_edit and not organization.is_open %}
<li>
<div>
<a href="{{ url('organization_requests_pending', organization.id, organization.slug) }}">{{ _('View requests') }}</a>
{% if pending_count > 0 %}
<span id="pending-count-box">
{{pending_count}}
</span>
{% endif %}
</div>
</li>
{% endif %}
{% if can_edit %}
<li>
<div>
<a href="{{ url('add_organization_member', organization.id, organization.slug) }}">{{ _('Add members') }}</a>
</div>
</li>
{% endif %}
{% if is_member %}
<li>
<div>
<a href="{{ url('add_organization_blog', organization.id, organization.slug) }}">{{ _('Add blog') }}</a>
</div>
</li>
{% endif %}
<li>
<div>
<a href="{{ url('organization_pending_blogs', organization.id, organization.slug) }}">{{ _('Pending blogs') }}</a>
{% if pending_blog_count > 0 %}
<span id="pending-count-box">
{{pending_blog_count}}
</span>
{% endif %}
</div>
</li>
{% if can_edit %}
<li>
<div>
<a href="{{ url('organization_contest_add', organization.id, organization.slug) }}">{{ _('Add contest') }}</a>
</div>
</li>
{% endif %}
{% if is_member and not can_edit %}
<li>
<form method="post" action="{{ url('leave_organization', organization.id, organization.slug) }}">
{% csrf_token %}
<a href="#" class="leave-organization">{{ _('Leave group') }}</a>
</form>
</li>
{% endif %}
</ul>
</div>
<div class="blog-sidebox sidebox">
<h3>{{ _('About') }}<i class="fa fa-info-circle"></i></h3>
<div class="sidebox-content">
<div style="margin: 0.3em;">
{% cache 3600 'organization_html' organization.id MATH_ENGINE %}
{{ organization.about|markdown|reference|str|safe }}
{% endcache %}
</div>
</div>
</div>
{% endif %}
{% if is_member or can_edit or organization.is_open %}
{% include 'top-users.html' %}
{% endif %}
<div class="right-sidebar">
{% if (is_member or can_edit) %}
{% include 'contests-countdown.html' %}
{% endif %}
{% if can_edit or is_member %}
<div id="control-panel" class="blog-sidebox sidebox no-dot-blog-sidebox">
<h3>{{ _('Controls') }} <i class="fa fa-cog"></i></h3>
<ul id="control-list" class="sidebox-content" style="padding: 1em;">
{% if can_edit %}
<li>
<div>
<a href="{{ url('edit_organization', organization.id, organization.slug) }}">{{ _('Edit group') }}</a>
</div>
</li>
{% endif %}
{% if can_edit and not organization.is_open %}
<li>
<div>
<a href="{{ url('organization_requests_pending', organization.id, organization.slug) }}">{{ _('View requests') }}</a>
{% if pending_count > 0 %}
<span id="pending-count-box">
{{pending_count}}
</span>
{% endif %}
</div>
</li>
{% endif %}
{% if can_edit %}
<li>
<div>
<a href="{{ url('add_organization_member', organization.id, organization.slug) }}">{{ _('Add members') }}</a>
</div>
</li>
{% endif %}
{% if is_member %}
<li>
<div>
<a href="{{ url('add_organization_blog', organization.id, organization.slug) }}">{{ _('Add blog') }}</a>
</div>
</li>
{% endif %}
<li>
<div>
<a href="{{ url('organization_pending_blogs', organization.id, organization.slug) }}">{{ _('Pending blogs') }}</a>
{% if pending_blog_count > 0 %}
<span id="pending-count-box">
{{pending_blog_count}}
</span>
{% endif %}
</div>
</li>
{% if can_edit %}
<li>
<div>
<a href="{{ url('organization_contest_add', organization.id, organization.slug) }}">{{ _('Add contest') }}</a>
</div>
</li>
{% endif %}
{% if is_member and not can_edit %}
<li>
<form method="post" action="{{ url('leave_organization', organization.id, organization.slug) }}">
{% csrf_token %}
<a href="#" class="leave-organization">{{ _('Leave group') }}</a>
</form>
</li>
{% endif %}
</ul>
</div>
<div class="blog-sidebox sidebox">
<h3>{{ _('About') }}<i class="fa fa-info-circle"></i></h3>
<div class="sidebox-content">
<div style="margin: 0.3em;">
{% cache 3600 'organization_html' organization.id MATH_ENGINE %}
{{ organization.about|markdown|reference|str|safe }}
{% endcache %}
</div>
</div>
</div>
{% endif %}
{% if is_member or can_edit or organization.is_open %}
{% include 'top-users.html' %}
{% endif %}
</div>

View file

@ -1,4 +1,4 @@
{{ preview_data|markdown|reference|str|safe }}
{% if REQUIRE_JAX %}
<div data-config="{{ static('mathjax3_config.js') }}" class="require-mathjax-support"></div>
<div data-config="{{ static('mathjax3_config.js') }}" class="require-mathjax-support"></div>
{% endif %}

View file

@ -1,4 +1,4 @@
{% extends "problem/list.html" %}
{% block left_sidebar %}
{% include "organization/org-left-sidebar.html" %}
{% extends "problem/list.html" %}
{% block left_sidebar %}
{% include "organization/org-left-sidebar.html" %}
{% endblock %}

View file

@ -1,26 +1,26 @@
{% extends "organization/home-base.html" %}
{% block middle_content %}
<table class="table">
<tr>
<th>{{ _('User:') }}</th>
<td>{{ link_user(object.user) }}</td>
</tr>
<tr>
<th>{{ _('Organization:') }}</th>
<td>
{% with org=object.organization %}
<a href="{{ org.get_absolute_url() }}">{{ org.name }}</a>
{% endwith %}
</td>
</tr>
<tr>
<th>{{ _('Time:') }}</th>
<td>{{ object.time|date(_("N j, Y, g:i a")) }}</td>
</tr>
<tr>
<th>{{ _('Reason:') }}</th>
<td>{{ object.reason }}</td>
</tr>
</table>
<table class="table">
<tr>
<th>{{ _('User:') }}</th>
<td>{{ link_user(object.user) }}</td>
</tr>
<tr>
<th>{{ _('Organization:') }}</th>
<td>
{% with org=object.organization %}
<a href="{{ org.get_absolute_url() }}">{{ org.name }}</a>
{% endwith %}
</td>
</tr>
<tr>
<th>{{ _('Time:') }}</th>
<td>{{ object.time|date(_("N j, Y, g:i a")) }}</td>
</tr>
<tr>
<th>{{ _('Reason:') }}</th>
<td>{{ object.reason }}</td>
</tr>
</table>
{% endblock %}

View file

@ -1,30 +1,30 @@
{% extends "organization/home-base.html" %}
{% block middle_content %}
{% include "organization/requests/tabs.html" %}
{% include "organization/requests/tabs.html" %}
{% if requests %}
<table class="table">
<tr>
<th>{{ _('User') }}</th>
<th>{{ _('Time') }}</th>
<th>{{ _('State') }}</th>
<th>{{ _('Reason') }}</th>
</tr>
{% for r in requests %}
<tr id="request-{{ r.id }}">
<td>{{ link_user(r.user) }}</td>
<td>
<a href="{{ url('request_organization_detail', object.id, object.slug, r.id) }}">
{{- r.time|date(_("N j, Y, g:i a")) -}}
</a>
</td>
<td>{{ r.state }}</td>
<td>{{ r.reason|truncatechars(50) }}</td>
</tr>
{% endfor %}
</table>
{% else %}
<p>{{ _('There are no requests to approve.') }}</p>
{% endif %}
{% if requests %}
<table class="table">
<tr>
<th>{{ _('User') }}</th>
<th>{{ _('Time') }}</th>
<th>{{ _('State') }}</th>
<th>{{ _('Reason') }}</th>
</tr>
{% for r in requests %}
<tr id="request-{{ r.id }}">
<td>{{ link_user(r.user) }}</td>
<td>
<a href="{{ url('request_organization_detail', object.id, object.slug, r.id) }}">
{{- r.time|date(_("N j, Y, g:i a")) -}}
</a>
</td>
<td>{{ r.state }}</td>
<td>{{ r.reason|truncatechars(50) }}</td>
</tr>
{% endfor %}
</table>
{% else %}
<p>{{ _('There are no requests to approve.') }}</p>
{% endif %}
{% endblock %}

View file

@ -1,46 +1,46 @@
{% extends "organization/home-base.html" %}
{% block org_js %}
<script type="text/javascript">
$(function() {
$("select").select2();
});
</script>
{% endblock %}
<script type="text/javascript">
$(function() {
$("select").select2();
});
</script>
{% endblock %}
{% block middle_content %}
{% include "messages.html" %}
{% include "organization/requests/tabs.html" %}
{% include "messages.html" %}
{% include "organization/requests/tabs.html" %}
{% if formset.forms %}
<form action="" method="post">
{% csrf_token %}
{{ formset.management_form }}
<table class="table">
<tr>
<th>{{ _('User') }}</th>
<th>{{ _('Time') }}</th>
<th>{{ _('State') }}</th>
<th>{{ _('Reason') }}</th>
{% if formset.can_delete %}
<th>{{ _('Delete?') }}</th>
{% endif %}
</tr>
{% for form in formset %}
<tr id="request-{{ form.instance.id }}">
<td>{{ form.id }}{{ link_user(form.instance.user) }}</td>
<td><a href="{{ url('request_organization_detail', object.id, object.slug, form.instance.id) }}">
{{ form.instance.time|date(_("N j, Y, g:i a")) }}
</a></td>
<td>{{ form.state }}</td>
<td>{{ form.instance.reason|truncatechars(50) }}</td>
{% if formset.can_delete %}
<td>{{ form.DELETE }}</td>
{% endif %}
</tr>
{% endfor %}
</table>
<button type="submit">{{ _('Update') }}</button>
</form>
{% else %}
<p>{{ _('There are no requests to approve.') }}</p>
{% endif %}
{% if formset.forms %}
<form action="" method="post">
{% csrf_token %}
{{ formset.management_form }}
<table class="table">
<tr>
<th>{{ _('User') }}</th>
<th>{{ _('Time') }}</th>
<th>{{ _('State') }}</th>
<th>{{ _('Reason') }}</th>
{% if formset.can_delete %}
<th>{{ _('Delete?') }}</th>
{% endif %}
</tr>
{% for form in formset %}
<tr id="request-{{ form.instance.id }}">
<td>{{ form.id }}{{ link_user(form.instance.user) }}</td>
<td><a href="{{ url('request_organization_detail', object.id, object.slug, form.instance.id) }}">
{{ form.instance.time|date(_("N j, Y, g:i a")) }}
</a></td>
<td>{{ form.state }}</td>
<td>{{ form.instance.reason|truncatechars(50) }}</td>
{% if formset.can_delete %}
<td>{{ form.DELETE }}</td>
{% endif %}
</tr>
{% endfor %}
</table>
<button type="submit">{{ _('Update') }}</button>
</form>
{% else %}
<p>{{ _('There are no requests to approve.') }}</p>
{% endif %}
{% endblock %}

View file

@ -1,22 +1,22 @@
{% extends "organization/home-base.html" %}
{% block org_js %}
<script type="text/javascript">
$(function () {
$('#id_reason').keydown(function (e) {
if (e.ctrlKey && (e.keyCode === 13 || e.keyCode === 10)) {
$(this).closest('form').submit();
}
});
});
</script>
<script type="text/javascript">
$(function () {
$('#id_reason').keydown(function (e) {
if (e.ctrlKey && (e.keyCode === 13 || e.keyCode === 10)) {
$(this).closest('form').submit();
}
});
});
</script>
{% endblock %}
{% block middle_content %}
<form action="" method="post" class="form-area">
{% csrf_token %}
<p><label for="{{ form.reason.id_for_label }}"><b>{{ _('Your reason for joining:') }}</b></label></p>
<p>{{ form.reason }}</p>
<button type="submit">{{ _('Request') }}</button>
</form>
<form action="" method="post" class="form-area">
{% csrf_token %}
<p><label for="{{ form.reason.id_for_label }}"><b>{{ _('Your reason for joining:') }}</b></label></p>
<p>{{ form.reason }}</p>
<button type="submit">{{ _('Request') }}</button>
</form>
{% endblock %}

View file

@ -1,16 +1,16 @@
<div class="tabs">
<ul>
<li{% if tab == 'pending' %} class="active"{% endif %}>
<a href="{{ url('organization_requests_pending', object.id, object.slug) }}">{{ _('Pending') }}</a>
</li>
<li{% if tab == 'log' %} class="active"{% endif %}>
<a href="{{ url('organization_requests_log', object.id, object.slug) }}">{{ _('Log') }}</a>
</li>
<li{% if tab == 'approved' %} class="active"{% endif %}>
<a href="{{ url('organization_requests_approved', object.id, object.slug) }}">{{ _('Approved') }}</a>
</li>
<li{% if tab == 'rejected' %} class="active"{% endif %}>
<a href="{{ url('organization_requests_rejected', object.id, object.slug) }}">{{ _('Rejected') }}</a>
</li>
</ul>
<ul>
<li{% if tab == 'pending' %} class="active"{% endif %}>
<a href="{{ url('organization_requests_pending', object.id, object.slug) }}">{{ _('Pending') }}</a>
</li>
<li{% if tab == 'log' %} class="active"{% endif %}>
<a href="{{ url('organization_requests_log', object.id, object.slug) }}">{{ _('Log') }}</a>
</li>
<li{% if tab == 'approved' %} class="active"{% endif %}>
<a href="{{ url('organization_requests_approved', object.id, object.slug) }}">{{ _('Approved') }}</a>
</li>
<li{% if tab == 'rejected' %} class="active"{% endif %}>
<a href="{{ url('organization_requests_rejected', object.id, object.slug) }}">{{ _('Rejected') }}</a>
</li>
</ul>
</div>

View file

@ -1,4 +1,4 @@
{% extends "submission/list.html" %}
{% block left_sidebar %}
{% include "organization/org-left-sidebar.html" %}
{% extends "submission/list.html" %}
{% block left_sidebar %}
{% include "organization/org-left-sidebar.html" %}
{% endblock %}

View file

@ -1,19 +1,19 @@
{% extends "user/users-table.html" %}
{% block before_point_head %}
{% if can_edit %}
<th class="header"></th>
{% endif %}
{% if can_edit %}
<th class="header"></th>
{% endif %}
{% endblock %}
{% block before_point %}
{% if can_edit %}
<td>
<form action="{{ kick_url }}" method="POST" class="kick-form">
{% csrf_token %}
<input type="hidden" name="user" value="{{ user.id }}">
<a href="#" class="button small">{{ _('Kick') }}</a>
</form>
</td>
{% endif %}
{% if can_edit %}
<td>
<form action="{{ kick_url }}" method="POST" class="kick-form">
{% csrf_token %}
<input type="hidden" name="user" value="{{ user.id }}">
<a href="#" class="button small">{{ _('Kick') }}</a>
</form>
</td>
{% endif %}
{% endblock %}

View file

@ -1,46 +1,46 @@
{% extends "user/base-users-two-col.html" %}
{% block users_media %}
<style>
.kick-form .button {
margin: -8px 0;
padding: 3px 12px;
}
#users-table td:nth-child(3), #users-table th:nth-child(3) {
text-align: left;
}
#users-table td:nth-child(2), #users-table th:nth-child(2) {
border-right: none;
}
.rank-td {
font-family: "Jersey M54";
font-size: large;
}
.user-points, .user-problem-count, .rating-td {
font-family: cursive;
}
</style>
<style>
.kick-form .button {
margin: -8px 0;
padding: 3px 12px;
}
#users-table td:nth-child(3), #users-table th:nth-child(3) {
text-align: left;
}
#users-table td:nth-child(2), #users-table th:nth-child(2) {
border-right: none;
}
.rank-td {
font-family: "Jersey M54";
font-size: large;
}
.user-points, .user-problem-count, .rating-td {
font-family: cursive;
}
</style>
{% if can_edit %}
<style>#users-table td:nth-child(3), #users-table th:nth-child(3) {
border-right: none;
}
</style>
{% endif %}
{% if can_edit %}
<style>#users-table td:nth-child(3), #users-table th:nth-child(3) {
border-right: none;
}
</style>
{% endif %}
{% endblock %}
{% block users_js_media %}
<script type="text/javascript">
$(function () {
$('form.kick-form').find('a.button').click(function () {
$(this).parent().submit();
return false;
})
});
</script>
<script type="text/javascript">
$(function () {
$('form.kick-form').find('a.button').click(function () {
$(this).parent().submit();
return false;
})
});
</script>
{% endblock %}
{% block left_sidebar %}
{% include "organization/org-left-sidebar.html" %}
{% include "organization/org-left-sidebar.html" %}
{% endblock %}
{% block users_table %}{% include "organization/users-table.html" %}{% endblock %}