Basic creating, editing and updating of organizers

This commit is contained in:
Raphael Michel
2015-05-24 13:58:30 +02:00
parent 1ed82a2c0e
commit 14d1a12a91
11 changed files with 255 additions and 18 deletions

View File

@@ -76,6 +76,12 @@
{% trans "Events" %}
</a>
</li>
<li>
<a href="{% url 'control:organizers' %}" {% if "organizer" in url_name %}class="active"{% endif %}>
<i class="fa fa-users fa-fw"></i>
{% trans "Organizers" %}
</a>
</li>
{% endblock %}
</ul>
</div>

View File

@@ -6,11 +6,6 @@
<h1>{% trans "Product category" %}</h1>
<form action="" method="post" class="form-horizontal">
{% csrf_token %}
{% if "success" in request.GET %}
<div class="alert alert-success">
{% trans "Your changes have been saved." %}
</div>
{% endif %}
<fieldset>
<legend>{% trans "General information" %}</legend>
{% bootstrap_field form.name layout="horizontal" %}

View File

@@ -0,0 +1,20 @@
{% extends "pretixcontrol/base.html" %}
{% load i18n %}
{% load bootstrap3 %}
{% block title %}{% trans "Create Organizer" %}{% endblock %}
{% block content %}
<h1>{% trans "Create Organizer" %}</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" %}
</fieldset>
<div class="form-group submit-group">
<button type="submit" class="btn btn-primary btn-save">
{% trans "Save" %}
</button>
</div>
</form>
{% endblock %}

View File

@@ -0,0 +1,20 @@
{% extends "pretixcontrol/base.html" %}
{% load i18n %}
{% load bootstrap3 %}
{% block title %}{% trans "Organizer" %}{% endblock %}
{% block content %}
<h1>{% trans "Organizer" %}</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" %}
</fieldset>
<div class="form-group submit-group">
<button type="submit" class="btn btn-primary btn-save">
{% trans "Save" %}
</button>
</div>
</form>
{% endblock %}

View File

@@ -0,0 +1,29 @@
{% extends "pretixcontrol/base.html" %}
{% load i18n %}
{% block title %}{% trans "Organizers" %}{% endblock %}
{% block content %}
<h1>{% trans "Organizers" %}</h1>
<p>{% trans "The list below shows all organizer accounts you have administrative access to." %}</p>
{% if request.user.is_superuser %}
<a href="{% url "control:organizers.add" %}" class="btn btn-primary">
<span class="fa fa-plus"></span>
{% trans "Create a new organizer" %}
</a>
{% endif %}
<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:organizer.edit" organizer=o.slug %}">{{ o.name }}</a>
</strong></td>
</tr>
{% endfor %}
</tbody>
</table>
{% endblock %}