Skip to content

Commit

Permalink
Simple UI improvements (#144)
Browse files Browse the repository at this point in the history
* Move teacher-specific actions in simple UI to the end

* Improve aesthetic and visual of Simple UI

* Fix typo in HTML
  • Loading branch information
top-sekret authored Mar 2, 2023
1 parent fc3e445 commit b1d88f3
Show file tree
Hide file tree
Showing 5 changed files with 33 additions and 44 deletions.
15 changes: 9 additions & 6 deletions oioioi/simpleui/templates/simpleui/contest/contest.html
Original file line number Diff line number Diff line change
Expand Up @@ -29,13 +29,14 @@
<div class="contest">
<header class="contest__header">
<h1 class="inline-menu__name contest__name">{{ contest }}</h1>
<div class="inline-menu">
<nav class="inline-menu nav d-inline-flex">
{% block contest-top-menu %}
<a href="{% url 'default_ranking' %}">{% trans "Ranking" %}</a>
|
<a href="{% url 'admin:contests_contest_change' contest.id %}">{% trans "Settings" %}</a>
<a class="nav-link" href="{% url 'problems_list' %}">{% trans "Problems" %}</a>
<a class="nav-link" href="{% url 'dashboard_message_edit' %}">{% trans "Edit dashboard message" %}</a>
<a class="nav-link" href="{% url 'default_ranking' %}">{% trans "Ranking" %}</a>
<a class="nav-link" href="{% url 'admin:contests_contest_change' contest.id %}">{% trans "Settings" %}</a>
{% endblock %}
</div>
</nav>
</header>

<section class="contest__rounds">
Expand All @@ -51,6 +52,8 @@ <h2 class="inline-menu__name">{% trans "Rounds" %}</h2>
<p>{% trans "There are no rounds in this contest." %}</p>
{% endif %}
</section>

<a href="{% url 'admin:contests_probleminstance_changelist' %}">{% trans "All problem settings" %}</a>
</section>

<section class="contest__submissions">
Expand All @@ -73,4 +76,4 @@ <h2 class="inline-menu__name">{% trans "Questions and news" %}</h2>
</div>
</section>
</div>
{% endblock %}
{% endblock %}
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,10 @@
{% endfor %}
</div>
</div>
<div class="round__menu">
<a href="{% url 'oioioiadmin:problems_problem_add' %}">{% trans "Add a problem" %}</a>
|
<a href="{% url 'admin:contests_contest_change' contest.id %}">{% trans "Settings" %}</a>
</div>
<nav class="nav round__menu d-inline-flex">
<a class="nav-link" href="{% url 'oioioiadmin:problems_problem_add' %}">{% trans "Add a problem" %}</a>
<a class="nav-link" href="{% url 'admin:contests_contest_change' contest.id %}">{% trans "Settings" %}</a>
</nav>
</div>

<div class="round__problems">
Expand All @@ -34,4 +33,4 @@
Recent activity is activity from last {{ RECENT_ACTIVITY_DAYS }} days.
{% endblocktrans %}
</small>
</p>
</p>
32 changes: 13 additions & 19 deletions oioioi/simpleui/templates/simpleui/main_dashboard/dashboard.html
Original file line number Diff line number Diff line change
Expand Up @@ -17,27 +17,21 @@
<div class="contest">
<header class="contest__header">
<h1 class="inline-menu__name contest__name">{% block dashboard-name %}{% trans "User dashboard" %}{% endblock %}</h1>
{% block dashboard-top-menu %}
{% if can_create_contest %}
<div class="inline-menu">
<a href="{% url 'oioioiadmin:contests_contest_add' %}">{% trans "Create contest" %}</a>
|
</div>
{% endif %}
{% if has_portal %}
<div class="inline-menu">
<a href="{% url 'global_portal' link_name='default' portal_path=portal_path %}">
<nav class="inline-menu nav d-inline-flex">
{% block dashboard-top-menu %}
{% if can_create_contest %}
<a class="nav-link" href="{% url 'oioioiadmin:contests_contest_add' %}">{% trans "Create contest" %}</a>
{% endif %}
{% if has_portal %}
<a class="nav-link" href="{% url 'global_portal' link_name='default' portal_path=portal_path %}">
{% trans "Homepage" %}
</a>
</div>
{% endif %}
<div class="inline-menu">
|
<a href="{% url 'problemset_main' %}">
{% trans "Problemset" %}
</a>
</div>
{% endblock %}
{% endif %}
<a class="nav-link" href="{% url 'problemset_main' %}">
{% trans "Problemset" %}
</a>
{% endblock %}
</nav>
</header>
<script type="text/javascript" src="{% static 'js/highcharts.js' %}"></script>
{% if contests|length == 0 %}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,7 @@
{% load i18n %}

{% block contest-top-menu %}
<div class="inline-menu">
<a href="{% url 'show_members' member_type='pupil' %}">{% trans "Pupils" %}</a>
|
<a href="{% url 'show_members' member_type='teacher' %}">{% trans "Teachers" %}</a>
|
{{ block.super }}
</div>
{{ block.super }}
<a class="nav-link" href="{% url 'show_members' member_type='pupil' %}">{% trans "Pupils" %}</a>
<a class="nav-link" href="{% url 'show_members' member_type='teacher' %}">{% trans "Teachers" %}</a>
{% endblock %}
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,8 @@
{% block dashboard-top-menu %}
{{ block.super }}
{% if usergroups_active %}
<div class="inline-menu">
|
<a href="{% url 'teacher_usergroups_list' %}">
{% trans "Your user groups" %}
</a>
</div>
<a class="nav-link" href="{% url 'teacher_usergroups_list' %}">
{% trans "Your user groups" %}
</a>
{% endif %}
{% endblock %}

0 comments on commit b1d88f3

Please sign in to comment.