Fixed layout on contest:index page

This commit is contained in:
Sebastian Lohff 2017-02-01 18:29:19 +01:00
parent bf685e392c
commit de2a8ebb12
1 changed files with 65 additions and 59 deletions

View File

@ -4,75 +4,81 @@
<h2>Welcome, {{ user }}</h2> <h2>Welcome, {{ user }}</h2>
<div class="row"> <div class="row">
<div class="col-sm-6"> <div class="col-sm-6">
{% if user.ref %} {% if user.ref %}
{# user has a reference, we can start logging QSOs! #} {# user has a reference, we can start logging QSOs! #}
<div class="row"> <div class="row">
<div class="col-sm-12"> <div class="col-sm-12">
<div class="panel panel-success"> <div class="panel panel-success">
<div class="panel-heading">Ready for the contest!</div> <div class="panel-heading">Ready for the contest!</div>
<div class="panel-body"> <div class="panel-body">
<p> <p>
Hey {{ user }}, your exchange has been registered as {{ user.ref }}. Hey {{ user }}, your exchange has been registered as {{ user.ref }}.
You are all set for the contest! So go ahead and <a href="{% url "contest:log" %}">log some QSOs</a>! You are all set for the contest! So go ahead and <a href="{% url "contest:log" %}">log some QSOs</a>!
</p> </p>
</div>
</div>
</div> </div>
</div> </div>
</div> {% else %}
</div> <div class="row">
{% else %} <div class="col-sm-12">
<div class="row"> <div class="panel panel-danger">
<div class="col-sm-12"> <div class="panel-heading">You don't have an exchange</div>
<div class="panel panel-danger"> <div class="panel-body">
<div class="panel-heading">You don't have an exchange</div> <p>
<div class="panel-body"> Hey you, {{ user }}, you don't have an <abbr title="You know, like, location, where you are">Exchange</abbr>!
<p> Get yourself registered with the contest orga on {{ contest.callQrg }}. Once you have registered with your
Hey you, {{ user }}, you don't have an <abbr title="You know, like, location, where you are">Exchange</abbr>! callsign and your current location, it will appear on this website (after refreshing) and you will be
Get yourself registered with the contest orga on {{ contest.callQrg }}. Once you have registered with your all set for logging QSOs!
callsign and your current location, it will appear on this website (after refreshing) and you will be </p>
all set for logging QSOs! <p>
</p> Get yourself registered on <strong>{{ contest.callQrg }}</strong>!
<p> </p>
Get yourself registered on <strong>{{ contest.callQrg }}</strong>! </div>
</p> </div>
</div> </div>
</div> </div>
</div> {% endif %}
</div>
{% endif %}
{% if not user.cat %} {% if not user.cat %}
<div class="row"> <div class="row">
<div class="col-sm-12"> <div class="col-sm-12">
<div class="panel panel-warning"> <div class="panel panel-warning">
<div class="panel-heading">You don't have a category!</div> <div class="panel-heading">You don't have a category!</div>
<div class="panel-body"> <div class="panel-body">
<p> <p>
You don't have an <strong>entry category</strong>! Please set one in your <a href="{% url "profile" %}">profile</a>. You don't have an <strong>entry category</strong>! Please set one in your <a href="{% url "profile" %}">profile</a>.
</p> </p>
</div>
</div>
</div> </div>
</div> </div>
</div> {% endif %}
</div>
{% endif %}
{% if user.is_staff %} {% if user.is_staff %}
<div class="row"> <div class="row">
<div class="col-sm-12"> <div class="col-sm-12">
<div class="panel panel-primary"> <div class="panel panel-primary">
<div class="panel-heading">You are staff!</div> <div class="panel-heading">You are staff!</div>
<div class="panel-body"> <div class="panel-body">
<p>Hey, you are <strong>staff</strong>. Do you want to start <a href="{% url "contest:registerRefs" %}">registering people</a>?</p> <p>Hey, you are <strong>staff</strong>. Do you want to start <a href="{% url "contest:registerRefs" %}">registering people</a>?</p>
</div>
</div>
</div>
</div>
{% endif %}
</div>
<div class="col-sm-6">
<div class="row">
<div class="col-sm-12">
{% include "contest/contestPanel.html" with contest=contest %}
</div>
<div class="col-sm-12">
{% include "contest/qrgPanel.html" with contest=contest qrgs=qrgs %}
</div>
</div>
</div> </div>
</div> </div>
</div>
</div>
{% endif %}
</div>
<div class="col-sm-6">
{% include "contest/contestPanel.html" with contest=contest %}
</div>
<div class="col-sm-6">
{% include "contest/qrgPanel.html" with contest=contest qrgs=qrgs %}
</div> </div>
</div> </div>