Create new events

This commit is contained in:
Raphael Michel
2015-05-27 23:09:33 +02:00
parent 79dfe7a084
commit 3ac26f64f3
10 changed files with 185 additions and 16 deletions

View File

@@ -3,11 +3,6 @@
{% load bootstrap3 %}
{% block inside %}
<form action="" method="post" class="form-horizontal">
{% if "success" in request.GET %}
<div class="alert alert-success">
{% trans "Your changes have been saved." %}
</div>
{% endif %}
{% csrf_token %}
<fieldset>
<legend>{% trans "General information" %}</legend>

View File

@@ -0,0 +1,33 @@
{% extends "pretixcontrol/base.html" %}
{% load i18n %}
{% load bootstrap3 %}
{% block title %}{% trans "Create a new event" %}{% endblock %}
{% block content %}
<h1>{% trans "Create a new event" %}</h1>
<form action="" method="post" class="form-horizontal">
{% csrf_token %}
<fieldset>
<legend>{% trans "General information" %}</legend>
{% bootstrap_field form.name layout="horizontal" %}
{% bootstrap_field form.slug layout="horizontal" %}
{% bootstrap_field form.date_from layout="horizontal" %}
{% bootstrap_field form.date_to layout="horizontal" %}
{% bootstrap_field form.currency layout="horizontal" %}
</fieldset>
<fieldset>
<legend>{% trans "Timeline" %}</legend>
{% bootstrap_field form.presale_start layout="horizontal" %}
{% bootstrap_field form.presale_end layout="horizontal" %}
</fieldset>
<p>
{% blocktrans trimmed %}
You will be able to adjust further settings in the next step.
{% endblocktrans %}
</p>
<div class="form-group submit-group">
<button type="submit" class="btn btn-primary btn-save">
{% trans "Save" %}
</button>
</div>
</form>
{% endblock %}

View File

@@ -4,6 +4,10 @@
{% block content %}
<h1>{% trans "Events" %}</h1>
<p>{% trans "The list below shows all events you have administrative access to. Click on the event name to access event details." %}</p>
<a href="{% url "control:events.add" %}" class="btn btn-default">
<span class="fa fa-plus"></span>
{% trans "Create a new event" %}
</a>
<table class="table table-condensed table-hover">
<thead>
<tr>

View File

@@ -0,0 +1,30 @@
{% extends "pretixcontrol/base.html" %}
{% load i18n %}
{% block title %}{% trans "Create a new event" %}{% endblock %}
{% block content %}
<h1>{% trans "Create a new event" %}</h1>
{% if organizers|length == 0 %}
<div class="alert alert-info">
{% trans "You are not permitted to create new events in the name of any organizer." %}
</div>
{% else %}
<p>{% trans "Please choose the organizer of this event from the list below." %}</p>
<table class="table table-condensed table-hover">
<thead>
<tr>
<th>{% trans "Organizer name" %}</th>
</tr>
</thead>
<tbody>
{% for o in organizers %}
<tr>
<td><strong>
<a href="{% url "control:events.create" organizer=o.slug %}">{{ o.name }}</a>
</strong></td>
</tr>
{% endfor %}
</tbody>
</table>
{% include "pretixcontrol/pagination.html" %}
{% endif %}
{% endblock %}

View File

@@ -1,9 +1,9 @@
{% extends "pretixcontrol/base.html" %}
{% load i18n %}
{% load bootstrap3 %}
{% block title %}{% trans "Create Organizer" %}{% endblock %}
{% block title %}{% trans "Create a new organizer" %}{% endblock %}
{% block content %}
<h1>{% trans "Create Organizer" %}</h1>
<h1>{% trans "Create a new organizer" %}</h1>
<form action="" method="post" class="form-horizontal">
{% csrf_token %}
<fieldset>