Added an organizer overview page

This commit is contained in:
Raphael Michel
2015-10-22 17:45:19 +02:00
parent 0b4cae07c4
commit 232c42b265
23 changed files with 400 additions and 92 deletions

View File

@@ -0,0 +1,49 @@
{% load compress %}
{% load staticfiles %}
{% load i18n %}
<!DOCTYPE html>
<html>
<head>
<title>{% block thetitle %}{% endblock %}</title>
{% compress css %}
<link rel="stylesheet" type="text/less" href="{% static "pretixpresale/less/main.less" %}" />
{% endcompress %}
{% compress js %}
<script type="text/javascript" src="{% static "jquery/js/jquery-2.1.1.min.js" %}"></script>
<script type="text/javascript" src="{% static "js/jquery.formset.js" %}"></script>
<script type="text/javascript" src="{% static "bootstrap/dist/js/bootstrap.js" %}"></script>
<script type="text/javascript" src="{% static "pretixpresale/js/ui/main.js" %}"></script>
<script type="text/javascript" src="{% static "pretixpresale/js/ui/asynctask.js" %}"></script>
{% endcompress %}
{{ html_head|safe }}
<meta name="viewport" content="width=device-width, initial-scale=1">
</head>
<body>
<div class="container">
{% block page %}
{% endblock %}
</div>
<footer>
{% block footer %}
{% endblock %}
{% with "href='http://pretix.eu'" as a_attr %}
{% blocktrans trimmed %}
powered by <a {{ a_attr }}>pretix</a>
{% endblocktrans %}
{% endwith %}
</footer>
<script type="text/javascript">
var default_loading_message = '{% trans "We are processing your request…" %}';
</script>
<div id="loadingmodal">
<i class="fa fa-cog big-rotating-icon"></i>
<h1>{% trans "We are processing your request…" %}</h1>
<p>
{% trans "If this takes longer than a few minutes, please contact us." %}
</p>
</div>
{% compress js %}
<script type="text/javascript" src="{% static "lightbox/js/lightbox.min.js" %}"></script>
{% endcompress %}
</body>
</html>

View File

@@ -1,26 +1,11 @@
{% load compress %}
{% load staticfiles %}
{% extends "pretixpresale/base.html" %}
{% load i18n %}
{% load static %}
{% load eventurl %}
<!DOCTYPE html>
<html>
<head>
<title>{% block title %}{% endblock %}{% if url_name != "event.index" %} :: {% endif %}{{ event.name }}</title>
{% compress css %}
<link rel="stylesheet" type="text/less" href="{% static "pretixpresale/less/main.less" %}" />
{% endcompress %}
{% compress js %}
<script type="text/javascript" src="{% static "jquery/js/jquery-2.1.1.min.js" %}"></script>
<script type="text/javascript" src="{% static "js/jquery.formset.js" %}"></script>
<script type="text/javascript" src="{% static "bootstrap/dist/js/bootstrap.js" %}"></script>
<script type="text/javascript" src="{% static "pretixpresale/js/ui/main.js" %}"></script>
<script type="text/javascript" src="{% static "pretixpresale/js/ui/asynctask.js" %}"></script>
{% endcompress %}
{{ html_head|safe }}
<meta name="viewport" content="width=device-width, initial-scale=1">
</head>
<body>
<div class="container event">
{% block thetitle %}
{% block title %}{% endblock %}{% if url_name != "event.index" %} :: {% endif %}{{ event.name }}
{% endblock %}
{% block page %}
<div class="page-header">
<h1 class="pull-left">
<a href="{% eventurl event "presale:event.index" %}">{{ event.name }}</a>
@@ -50,8 +35,8 @@
{% endif %}
{% block content %}
{% endblock %}
</div>
<footer>
{% endblock %}
{% block footer %}
{% if request.event.settings.contact_mail %}
<a href="mailto:{{ request.event.settings.contact_mail }}">{% trans "Contact event organizer" %}</a> &middot;
{% endif %}
@@ -59,24 +44,4 @@
<a href="{{ request.event.settings.imprint_url }}" target="_blank">{% trans "Imprint" %}</a>
&middot;
{% endif %}
{% with "href='http://pretix.eu'" as a_attr %}
{% blocktrans trimmed %}
powered by <a {{ a_attr }}>pretix</a>
{% endblocktrans %}
{% endwith %}
</footer>
<script type="text/javascript">
var default_loading_message = '{% trans "We are processing your request…" %}';
</script>
<div id="loadingmodal">
<i class="fa fa-cog big-rotating-icon"></i>
<h1>{% trans "We are processing your request…" %}</h1>
<p>
{% trans "If this takes longer than a few minutes, please contact us." %}
</p>
</div>
{% compress js %}
<script type="text/javascript" src="{% static "lightbox/js/lightbox.min.js" %}"></script>
{% endcompress %}
</body>
</html>
{% endblock %}

View File

@@ -0,0 +1,26 @@
{% extends "pretixpresale/base.html" %}
{% load i18n %}
{% load static %}
{% load eventurl %}
{% block thetitle %}
{% block title %}{% endblock %}{% if url_name != "organizer.index" %} :: {% endif %}{{ organizer.name }}
{% endblock %}
{% block page %}
<div class="page-header">
<h1 class="pull-left">
<a href="{% eventurl organizer "presale:organizer.index" %}">{{ organizer.name }}</a>
</h1>
<div class="clearfix"></div>
</div>
{% if messages %}
{% for message in messages %}
<div class="alert {{ message.tags }}">
{{ message }}
</div>
{% endfor %}
{% endif %}
{% block content %}
{% endblock %}
{% endblock %}
{% block footer %}
{% endblock %}

View File

@@ -0,0 +1,61 @@
{% extends "pretixpresale/organizers/base.html" %}
{% load i18n %}
{% load eventurl %}
{% block title %}Event list{% endblock %}
{% block content %}
{% if "old" in request.GET %}
<h3>Past events</h3>
<p>
<small><a href="?">{% trans "Show upcoming" %}</a></small>
</p>
{% else %}
<h3>Upcoming events </h3>
<p>
<small><a href="?old=1">{% trans "Show past events" %}</a></small>
</p>
{% endif %}
<div class="table-responsive">
<table class="table">
<thead>
<tr>
<th>{% trans "Name" %}</th>
<th>{% trans "Date" %}</th>
<th></th>
</tr>
</thead>
<tbody>
{% for e in events %}{% eventurl e "presale:event.index" as url %}
<tr>
<td><a href="{{ url }}">{{ e.name }}</a></td>
<td>
{{ e.date_from|date:"DATE_FORMAT" }}
{% if e.settings.show_date_to %} {{ e.date_to|date:"DATE_FORMAT" }}{% endif %}
</td>
<td class="text-right">
<a class="btn btn-primary" href="{{ url }}">
{% if e.presale_is_running %}{% trans "Buy tickets" %}
{% else %}{% trans "More info" %}
{% endif %}
</a>
</td>
</tr>
{% empty %}
{% if "old" in request.GET %}
<tr>
<td colspan="3">
<em>{% trans "No archived events found." %}</em>
</td>
</tr>
{% else %}
<tr>
<td colspan="3">
<em>{% trans "No public upcoming events found." %}</em>
</td>
</tr>
{% endif %}
{% endfor %}
</tbody>
</table>
</div>
{% include "pretixpresale/pagination.html" %}
{% endblock %}

View File

@@ -0,0 +1,27 @@
{% load i18n %}
{% load urlreplace %}
{% if is_paginated %}
<nav class="text-center">
<ul class="pagination">
{% if page_obj.has_previous %}
<li>
<a href="?{% url_replace request 'page' page_obj.previous_page_number %}">
<span>&laquo;</span>
</a>
</li>
{% endif %}
<li class="page-current"><a>
{% blocktrans trimmed with page=page_obj.number of=page_obj.paginator.num_pages %}
Page {{ page }} of {{ of }}
{% endblocktrans %}
</a></li>
{% if page_obj.has_next %}
<li>
<a href="?{% url_replace request 'page' page_obj.next_page_number %}">
<span>&raquo;</span>
</a>
</li>
{% endif %}
</ul>
</nav>
{% endif %}