{% extends 'sc2clanman/base.html' %}
{% load staticfiles i18n %}

{% block content %}
    <div class="container">
        <div class="row">
            <div class="col-xs-12">
                <a class="btn btn-primary pull-right" href="#">{% trans 'New practice event' %}</a>
            </div>
        </div>
        <div class="row">
            <div class="col-xs-12">
                <table class="table table-hover">
                    <thead>
                        <tr>
                            <th>{% trans 'Date' %}</th>
                            <th>{% trans 'Notes' %}</th>
                        </tr>
                    </thead>
                    <tbody>
                    {% for event in object_list %}
                        <tr>
                            <td><a href="#">{{ event.date|date:"SHORT_DATETIME_FORMAT" }}</a></td>
                            <td>{{ event.bleached_notes|linebreaks }}</td>
                        </tr>
                    {% empty %}
                        <tr>
                            <td colspan="2">{% trans 'No practice events' %}</td>
                        </tr>
                    {% endfor %}
                    </tbody>
                </table>
            </div>
        </div>
    </div>
{% endblock %}
{% extends 'sc2clanman/base.html' %}
{% load i18n %}

{% block content %}
    <div class="container">
        {% if user.is_authenticated %}
        {% if user.is_superuser or user.is_staff %}
        <div class="row">
            <div class="col-xs-12">
                <a class="btn btn-primary pull-right" href="#">{% trans 'New practice event' %}</a>
            </div>
        </div>
        {% endif %}
        {% endif %}
        <div class="row">
            <div class="col-xs-12">
                <table class="table table-hover">
                    <thead>
                        <tr>
                            <th>{% trans 'Date' %}</th>
                            <th>{% trans 'Notes' %}</th>
                        </tr>
                    </thead>
                    <tbody>
                    {% for event in object_list %}
                        <tr>
                            <td><a href="{% url 'practice_edit' event.id %}">{{ event.date|date:"SHORT_DATETIME_FORMAT" }}</a></td>
                            <td>{{ event.bleached_notes|linebreaks }}</td>
                        </tr>
                    {% empty %}
                        <tr>
                            <td colspan="2">{% trans 'No practice events' %}</td>
                        </tr>
                    {% endfor %}
                    </tbody>
                </table>
            </div>
        </div>
    </div>
{% endblock %}
Add Practice event button now shows up only if user is logged in and is an admin or staff.
Add Practice event button now shows up only if user is logged in and is an admin or staff.
