{% extends "events/base.html" %}
{% load pagination_tags %}
{% load event_tags %}
{% load base_tags %}
{% load base_filters %}
{% load i18n %}
{% load perm_tags %}
{% load search_tags %}

{% block extra_head %}
{{ block.super }}
<link rel="stylesheet" href="{{ STATIC_URL }}css/events.css">
<link rel="stylesheet" href="{{ STATIC_URL }}css/events-my_events.css">
{% endblock %}

{% block body %}

<div class='t search-view'>
    {% event_nav request.user %}
    
    <div class="header" style="margin-bottom: 20px;">
        <h1>{% trans "My Upcoming Events" %}</h1>
        {% if show %}
            <a class="show-all-link" href="{% url event.myevents %}?all=true">{% trans "Show all my registered and attended events." %}</a>
        {% else %}
            <a class="show-all-link" href="{% url event.myevents %}">{% trans "Show upcoming events only." %}</a>
        {% endif %}
    </div>
    
    {% autopaginate events 10 %}
    
    <div class="events-wrap">
        {% for event in events %}
            {% search_result event %}
        {% empty %}
            {% trans "You're not registered for any upcoming events." %}<a href="{% url events %}">{% trans "View our upcoming events!" %}</a>            
        {% endfor %}
    </div>

    {% paginate %}
</div>

{% endblock %}
