Make navigation structure more approachable to new users (#1083)

* Move event selector to sidebar

* Unify navigation

* Fix confusing icons
This commit is contained in:
Raphael Michel
2018-11-12 11:30:36 +01:00
committed by GitHub
parent b9534f23f5
commit 09a9d610f8
46 changed files with 831 additions and 557 deletions

View File

@@ -3,65 +3,6 @@
{% load bootstrap3 %}
{% block title %}{% trans "Organizer" %}{% endblock %}
{% block content %}
<h1>
{% blocktrans with name=organizer.name %}Organizer: {{ name }}{% endblocktrans %}
{% if 'can_change_organizer_settings' in request.orgapermset %}
<a href="{% url "control:organizer.edit" organizer=organizer.slug %}"
class="btn btn-default hidden-print">
<span class="fa fa-edit"></span>
{% trans "Edit" %}
</a>
{% endif %}
{% if request.user.is_staff and staff_session %}
<a href="{% url "control:organizer.delete" organizer=organizer.slug %}"
class="btn btn-danger hidden-print">
<span class="fa fa-trash"></span>
</a>
{% endif %}
</h1>
<ul class="nav nav-pills hidden-print">
<li {% if "organizer" == url_name %}class="active"{% endif %}>
<a href="{% url "control:organizer" organizer=organizer.slug %}">
{% trans "Events" %}
</a>
</li>
{% if 'can_change_teams' in request.orgapermset %}
<li {% if "organizer.team" in url_name %}class="active"{% endif %}>
<a href="{% url "control:organizer.teams" organizer=organizer.slug %}">
{% trans "Teams" %}
</a>
</li>
{% endif %}
{% if 'can_change_organizer_settings' in request.orgapermset %}
<li {% if "organizer.display" in url_name %}class="active"{% endif %}>
<a href="{% url "control:organizer.display" organizer=organizer.slug %}">
{% trans "Display" %}
</a>
</li>
{% endif %}
{% if 'can_change_organizer_settings' in request.orgapermset %}
<li {% if "organizer.device" in url_name %}class="active"{% endif %}>
<a href="{% url "control:organizer.devices" organizer=organizer.slug %}">
{% trans "Devices" %}
</a>
</li>
{% endif %}
{% if 'can_change_organizer_settings' in request.orgapermset %}
<li {% if "organizer.webhook" in url_name %}class="active"{% endif %}>
<a href="{% url "control:organizer.webhooks" organizer=organizer.slug %}">
{% trans "Webhooks" %}
</a>
</li>
{% endif %}
{% for nav in nav_organizer %}
<li {% if nav.active %}class="active"{% endif %}>
<a href="{{ nav.url }}">
{{ nav.label }}
</a>
</li>
{% endfor %}
</ul>
{% block inner %}
{% endblock %}

View File

@@ -2,6 +2,9 @@
{% load i18n %}
{% load bootstrap3 %}
{% block inner %}
<h1>
{% blocktrans with name=organizer.name %}Organizer: {{ name }}{% endblocktrans %}
</h1>
{% if events|length == 0 %}
<p>
<em>{% trans "You currently do not have access to any events." %}</em>

View File

@@ -3,7 +3,7 @@
{% load staticfiles %}
{% load bootstrap3 %}
{% block inner %}
<legend>{% trans "Connect to device:" %} {{ device.name }}</legend>
<h1>{% trans "Connect to device:" %} {{ device.name }}</h1>
<div>
<ol>

View File

@@ -3,9 +3,9 @@
{% load bootstrap3 %}
{% block inner %}
{% if device %}
<legend>{% trans "Device:" %} {{ device.name }}</legend>
<h1>{% trans "Device:" %} {{ device.name }}</h1>
{% else %}
<legend>{% trans "Connect a new device" %}</legend>
<h1>{% trans "Connect a new device" %}</h1>
{% endif %}
<form class="form-horizontal" action="" method="post">
{% if device %}

View File

@@ -2,20 +2,20 @@
{% load i18n %}
{% load bootstrap3 %}
{% block inner %}
<h2>{% trans "Revoke device access:" %} {{ device.name }}</h2>
<form action="" method="post" class="form-horizontal">
{% csrf_token %}
<p>
<strong>{% blocktrans %}Are you sure you want remove access for this device?{% endblocktrans %}</strong>
{% trans "All data of this device will stay available, but you can't use the device any more." %}
</p>
<div class="form-group submit-group">
<a href="{% url "control:organizer.devices" organizer=request.organizer.slug%}" class="btn btn-default btn-cancel">
{% trans "Cancel" %}
</a>
<button type="submit" class="btn btn-danger btn-save">
{% trans "Revoke" %}
</button>
</div>
</form>
<h1>{% trans "Revoke device access:" %} {{ device.name }}</h1>
<form action="" method="post" class="form-horizontal">
{% csrf_token %}
<p>
<strong>{% blocktrans %}Are you sure you want remove access for this device?{% endblocktrans %}</strong>
{% trans "All data of this device will stay available, but you can't use the device any more." %}
</p>
<div class="form-group submit-group">
<a href="{% url "control:organizer.devices" organizer=request.organizer.slug %}" class="btn btn-default btn-cancel">
{% trans "Cancel" %}
</a>
<button type="submit" class="btn btn-danger btn-save">
{% trans "Revoke" %}
</button>
</div>
</form>
{% endblock %}

View File

@@ -2,9 +2,9 @@
{% load i18n %}
{% load bootstrap3 %}
{% block inner %}
<legend>
<h1>
{% trans "Connected devices" %}
</legend>
</h1>
<div class="alert alert-info">
{% blocktrans trimmed %}
This menu allows you to connect hardware devices such as box office terminals or scanning terminals to

View File

@@ -2,6 +2,7 @@
{% load i18n %}
{% load bootstrap3 %}
{% block inner %}
<h1>{% trans "Display settings" %}</h1>
<form action="" method="post" class="form-horizontal" enctype="multipart/form-data">
{% csrf_token %}
<fieldset>

View File

@@ -4,7 +4,16 @@
{% load formset_tags %}
{% block title %}{% trans "Organizer" %}{% endblock %}
{% block content %}
<h1>{% trans "Organizer" %}</h1>
<h1>
{% blocktrans with name=organizer.name %}Organizer settings{% endblocktrans %}
{% if request.user.is_staff and staff_session %}
<a href="{% url "control:organizer.delete" organizer=organizer.slug %}"
class="btn btn-danger hidden-print">
<span class="fa fa-trash"></span>
</a>
{% endif %}
</h1>
<form action="" method="post" class="form-horizontal" enctype="multipart/form-data">
{% csrf_token %}
<fieldset>

View File

@@ -2,7 +2,7 @@
{% load i18n %}
{% load bootstrap3 %}
{% block inner %}
<h2>{% trans "Delete team:" %} {{ team.name }}</h2>
<h1>{% trans "Delete team:" %} {{ team.name }}</h1>
{% if not possible %}
<p>{% blocktrans %}You cannot delete the team because there would be no one left who could change team permissions afterwards.{% endblocktrans %}</p>
<div class="form-group submit-group">

View File

@@ -3,9 +3,9 @@
{% load bootstrap3 %}
{% block inner %}
{% if team %}
<h2>{% trans "Team:" %} {{ team.name }}</h2>
<h1>{% trans "Team:" %} {{ team.name }}</h1>
{% else %}
<h2>{% trans "Create a new team" %}</h2>
<h1>{% trans "Create a new team" %}</h1>
<p>
{% blocktrans trimmed %}
You will be able to add team members in the next step.

View File

@@ -2,14 +2,14 @@
{% load i18n %}
{% load bootstrap3 %}
{% block inner %}
<h2>
<h1>
{% trans "Team:" %} {{ team.name }}
<a href="{% url "control:organizer.team.edit" organizer=organizer.slug team=team.pk %}"
class="btn btn-default">
<span class="fa fa-edit"></span>
{% trans "Edit" %}
</a>
</h2>
</h1>
<h3>{% trans "Team members" %}</h3>
<form action="" method="post">
{% csrf_token %}

View File

@@ -2,6 +2,7 @@
{% load i18n %}
{% load bootstrap3 %}
{% block inner %}
<h1>{% trans "Teams" %}</h1>
<p>
{% trans "The list below shows all teams that exist within this organizer." %}
</p>

View File

@@ -3,9 +3,9 @@
{% load bootstrap3 %}
{% block inner %}
{% if webhook %}
<legend>{% trans "Modify webhook" %}</legend>
<h1>{% trans "Modify webhook" %}</h1>
{% else %}
<legend>{% trans "Create a new webhook" %}</legend>
<h1>{% trans "Create a new webhook" %}</h1>
{% endif %}
<form class="form-horizontal" action="" method="post">
{% csrf_token %}

View File

@@ -2,7 +2,7 @@
{% load i18n %}
{% load bootstrap3 %}
{% block inner %}
<legend>{% blocktrans with url=webhook.target_url %}Logs for webhook {{ url }}{% endblocktrans %}</legend>
<h1>{% blocktrans with url=webhook.target_url %}Logs for webhook {{ url }}{% endblocktrans %}</h1>
<p>
{% trans "This page shows all calls to your webhook in the past 30 days." %}
</p>

View File

@@ -2,9 +2,9 @@
{% load i18n %}
{% load bootstrap3 %}
{% block inner %}
<legend>
<h1>
{% trans "Webhooks" %}
</legend>
</h1>
<p>
{% blocktrans trimmed %}
This menu allows you to create webhooks to connect pretix to other online services.