Support for right-to-left languages (#1438)

* play around

* Flip things in presale

* Convert backend

* Remove test settings

* Safe getattr
This commit is contained in:
Raphael Michel
2019-10-15 11:41:23 +02:00
committed by GitHub
parent 4152ee4e50
commit a4d8c810ce
79 changed files with 2006 additions and 140 deletions

View File

@@ -2,7 +2,7 @@
{% load i18n %}
{% load static %}
<!DOCTYPE html>
<html>
<html{% if rtl %} dir="rtl" class="rtl"{% endif %}>
<head>
<title>{{ django_settings.PRETIX_INSTANCE_NAME }}</title>
{% compress css %}

View File

@@ -6,7 +6,7 @@
{% load eventsignal %}
{% load eventurl %}
<!DOCTYPE html>
<html>
<html{% if rtl %} dir="rtl" class="rtl"{% endif %}>
<head>
<title>{% block title %}{% endblock %}{% if url_name != "index" %} :: {% endif %}
{{ settings.PRETIX_INSTANCE_NAME }}</title>
@@ -123,7 +123,7 @@
{{ settings.PRETIX_INSTANCE_NAME }}
</a>
</div>
<ul class="nav navbar-nav navbar-top-links navbar-left hidden-xs">
<ul class="nav navbar-nav navbar-top-links navbar-left flip hidden-xs">
{% if request.event %}
<li>
{% if has_domain and not request.event.live %}
@@ -147,7 +147,7 @@
</li>
{% endif %}
</ul>
<ul class="nav navbar-nav navbar-top-links navbar-right">
<ul class="nav navbar-nav navbar-top-links navbar-right flip">
{% for nav in nav_topbar %}
<li {% if nav.children %}class="dropdown"{% endif %}>
<a href="{{ nav.url }}" title="{{ nav.title }}" {% if nav.active %}class="active"{% endif %}

View File

@@ -118,7 +118,7 @@
</ul>
{% endif %}
</td>
<td class="text-right">
<td class="text-right flip">
<a href="{% url "control:event.orders.checkinlists.show" organizer=request.event.organizer.slug event=request.event.slug list=cl.id %}" class="btn btn-default btn-sm"><i class="fa fa-eye"></i></a>
{% if "can_change_event_settings" in request.eventpermset %}
<a href="{% url "control:event.orders.checkinlists.edit" organizer=request.event.organizer.slug event=request.event.slug list=cl.id %}" class="btn btn-default btn-sm"><i class="fa fa-edit"></i></a>

View File

@@ -8,7 +8,7 @@
<li class="list-group-item logentry">
<p>
<a href="{% url "control:event.requiredaction.discard" event=request.event.slug organizer=request.event.organizer.slug id=action.id %}"
class="btn btn-default btn-xs pull-right">
class="btn btn-default btn-xs pull-right flip">
{% trans "Hide message" %}
</a>
<small><span class="fa fa-clock-o"></span> {{ action.datetime|date:"SHORT_DATETIME_FORMAT" }}</small>

View File

@@ -66,7 +66,7 @@
<li class="list-group-item logentry">
<p>
<a href="{% url "control:event.requiredaction.discard" event=request.event.slug organizer=request.event.organizer.slug id=action.id %}"
class="btn btn-default btn-xs pull-right">
class="btn btn-default btn-xs pull-right flip">
{% trans "Hide message" %}
</a>
<small><span
@@ -139,7 +139,7 @@
<div class="row">
{% bootstrap_field comment_form.comment layout="horizontal" show_help=True show_label=False horizontal_field_class="col-md-12" %}
</div>
<p class="text-right">
<p class="text-right flip">
<br>
<button class="btn btn-default">
{% trans "Update comment" %}

View File

@@ -12,7 +12,7 @@
<p>
{% trans "Your shop is currently live. If you take it down, it will only be visible to you and your team." %}
</p>
<form action="" method="post" class="text-right">
<form action="" method="post" class="text-right flip">
{% csrf_token %}
<input type="hidden" name="live" value="false">
<button type="submit" class="btn btn-lg btn-danger btn-save">
@@ -46,7 +46,7 @@
<p>
{% trans "If you want to, you can publish your ticket shop now." %}
</p>
<form action="" method="post" class="text-right">
<form action="" method="post" class="flip text-right">
{% csrf_token %}
<input type="hidden" name="live" value="true">
<button type="submit" class="btn btn-primary btn-lg btn-save">
@@ -100,7 +100,7 @@
{% trans "It looks like you already have some real orders in your shop. We do not recommend enabling test mode if your customers already know your shop, as it will confuse them." %}
</div>
{% endif %}
<form action="" method="post" class="text-right">
<form action="" method="post" class="flip text-right">
{% csrf_token %}
<input type="hidden" name="testmode" value="true">
<button type="submit" class="btn btn-danger btn-lg btn-save">

View File

@@ -28,7 +28,7 @@
</span>
{% endif %}
</td>
<td class="text-right">
<td class="text-right flip">
<a href="{% url 'control:event.settings.payment.provider' event=request.event.slug organizer=request.organizer.slug provider=provider.identifier %}"
class="btn btn-default">
<span class="fa fa-cog"></span>

View File

@@ -52,7 +52,7 @@
</div>
{% endif %}
</td>
<td class="text-right">
<td class="text-right flip">
{% if plugin.app.compatibility_errors %}
<button class="btn disabled btn-block btn-default" disabled="disabled">{% trans "Incompatible" %}</button>
{% elif plugin.restricted and not staff_session %}

View File

@@ -65,7 +65,7 @@
<div class="col-md-2">
{% bootstrap_field iform.quota layout='inline' form_group_class="" %}
</div>
<div class="col-md-1 text-right">
<div class="col-md-1 text-right flip">
<button type="button" class="btn btn-danger" data-formset-delete-button>
<i class="fa fa-trash"></i></button>
</div>
@@ -88,7 +88,7 @@
<div class="col-md-2">
{% bootstrap_field formset.empty_form.quota layout='inline' form_group_class="" %}
</div>
<div class="col-md-1 text-right">
<div class="col-md-1 text-right flip">
<button type="button" class="btn btn-danger" data-formset-delete-button>
<i class="fa fa-trash"></i></button>
</div>

View File

@@ -68,7 +68,7 @@
<div class="col-sm-3">
{% bootstrap_field form.action layout='inline' form_group_class="" %}
</div>
<div class="col-sm-2 text-right">
<div class="col-sm-2 text-right flip">
<button type="button" class="btn btn-danger" data-formset-delete-button>
<i class="fa fa-trash"></i></button>
</div>
@@ -91,7 +91,7 @@
<div class="col-sm-3">
{% bootstrap_field formset.empty_form.action layout='inline' form_group_class="" %}
</div>
<div class="col-sm-2 text-right">
<div class="col-sm-2 text-right flip">
<button type="button" class="btn btn-danger" data-formset-delete-button>
<i class="fa fa-trash"></i></button>
</div>

View File

@@ -37,7 +37,7 @@
</a></strong>
</td>
<td>{{ tr.rate }} %</td>
<td class="text-right">
<td class="text-right flip">
<a href="{% url "control:event.settings.tax.edit" organizer=request.event.organizer.slug event=request.event.slug rule=tr.id %}" class="btn btn-default btn-sm"><i class="fa fa-edit"></i></a>
<a href="{% url "control:event.settings.tax.delete" organizer=request.event.organizer.slug event=request.event.slug rule=tr.id %}" class="btn btn-danger btn-sm"><i class="fa fa-trash"></i></a>
</td>

View File

@@ -29,7 +29,7 @@
<div class="panel panel-default ticketoutput-panel">
<div class="panel-heading">
<a href="{% url "control:event.settings.tickets.preview" event=request.event.slug organizer=request.organizer.slug output=provider.identifier %}"
class="btn btn-default btn-sm pull-right {% if not provider.preview_allowed %}disabled{% endif %}"
class="btn btn-default btn-sm pull-right flip {% if not provider.preview_allowed %}disabled{% endif %}"
target="_blank">
{% trans "Preview" %}
</a>

View File

@@ -15,12 +15,12 @@
{% block form %}
{% endblock %}
<div class="form-group submit-group">
<button type="submit" class="btn btn-primary btn-save pull-right">
<button type="submit" class="btn btn-primary btn-save pull-right flip">
{% trans "Continue" %}
</button>
{% if wizard.steps.prev %}
<button name="wizard_goto_step" type="submit" value="{{ wizard.steps.prev }}"
class="btn btn-default btn-lg pull-left">
class="btn btn-default btn-lg pull-left flip">
{% trans "Back" %}
</button>
{% endif %}

View File

@@ -8,7 +8,7 @@
<div class="form-group">
<label class="col-md-3 control-label" for="{{ form.slug.id_for_label }}">{{ form.slug.label }}</label>
<div class="col-md-9 form-inline">
<button class="btn btn-default pull-right" type="button" id="event-slug-random-generate"
<button class="btn btn-default pull-right flip" type="button" id="event-slug-random-generate"
data-rng-url="{% url "control:events.add.slugrng" organizer=organizer.slug %}">
{% trans "Set to random" %}
</button>

View File

@@ -77,7 +77,7 @@
<a href="?{% url_replace request 'ordering' '-live' %}"><i class="fa fa-caret-down"></i></a>
<a href="?{% url_replace request 'ordering' 'live' %}"><i class="fa fa-caret-up"></i></a>
</th>
<th class="text-right">
<th class="text-right flip">
</th>
</tr>
</thead>
@@ -138,7 +138,7 @@
<span class="label label-success">{% trans "On sale" %}</span>
{% endif %}
</td>
<td class="text-right">
<td class="text-right flip">
<a href="{% url "control:event.index" organizer=e.organizer.slug event=e.slug %}"
class="btn btn-sm btn-default" title="{% trans "Open event dashboard" %}"
data-toggle="tooltip">

View File

@@ -28,7 +28,7 @@
<div class="col-sm-8">
<h3 class="panel-title">{% trans "Add-On" %}</h3>
</div>
<div class="col-sm-4 text-right">
<div class="col-sm-4 text-right flip">
<button type="button" class="btn btn-xs btn-default" data-formset-move-up-button>
<i class="fa fa-arrow-up"></i></button>
<button type="button" class="btn btn-xs btn-default" data-formset-move-down-button>
@@ -61,7 +61,7 @@
<div class="col-sm-8">
<h3 class="panel-title">{% trans "Add-On" %}</h3>
</div>
<div class="col-sm-4 text-right">
<div class="col-sm-4 text-right flip">
<button type="button" class="btn btn-xs btn-default" data-formset-move-up-button>
<i class="fa fa-arrow-up"></i></button>
<button type="button" class="btn btn-xs btn-default" data-formset-move-down-button>

View File

@@ -22,7 +22,7 @@
<div class="col-sm-8">
<h3 class="panel-title">{% trans "Bundled product" %}</h3>
</div>
<div class="col-sm-4 text-right">
<div class="col-sm-4 text-right flip">
<button type="button" class="btn btn-xs btn-danger" data-formset-delete-button>
<i class="fa fa-trash"></i></button>
</div>
@@ -49,7 +49,7 @@
<div class="col-sm-8">
<h3 class="panel-title">{% trans "Bundled product" %}</h3>
</div>
<div class="col-sm-4 text-right">
<div class="col-sm-4 text-right flip">
<button type="button" class="btn btn-xs btn-danger" data-formset-delete-button>
<i class="fa fa-trash"></i></button>
</div>

View File

@@ -18,7 +18,7 @@
<div class="col-md-9">
{% bootstrap_field form.value layout='inline' form_group_class="" %}
</div>
<div class="col-md-3 text-right">
<div class="col-md-3 text-right flip">
<button type="button" class="btn btn-default" data-formset-move-up-button>
<i class="fa fa-arrow-up"></i></button>
<button type="button" class="btn btn-default" data-formset-move-down-button>
@@ -61,7 +61,7 @@
<div class="col-md-9">
{% bootstrap_field formset.empty_form.value layout='inline' form_group_class="" %}
</div>
<div class="col-md-3 text-right">
<div class="col-md-3 text-right flip">
<button type="button" class="btn btn-default" data-formset-move-up-button>
<i class="fa fa-arrow-up"></i></button>
<button type="button" class="btn btn-default" data-formset-move-down-button>

View File

@@ -43,7 +43,7 @@
<a href="{% url "control:event.items.categories.up" organizer=request.event.organizer.slug event=request.event.slug category=c.id %}" class="btn btn-default btn-sm {% if forloop.counter0 == 0 and is_paginated and not page_obj.has_previous %}disabled{% endif %}"><i class="fa fa-arrow-up"></i></a>
<a href="{% url "control:event.items.categories.down" organizer=request.event.organizer.slug event=request.event.slug category=c.id %}" class="btn btn-default btn-sm {% if forloop.revcounter0 == 0 and is_paginated and not page_obj.has_next %}disabled{% endif %}"><i class="fa fa-arrow-down"></i></a>
</td>
<td class="text-right">
<td class="text-right flip">
<a href="{% url "control:event.items.categories.edit" organizer=request.event.organizer.slug event=request.event.slug category=c.id %}" class="btn btn-default btn-sm"><i class="fa fa-edit"></i></a>
<a href="{% url "control:event.items.categories.add" organizer=request.event.organizer.slug event=request.event.slug %}?copy_from={{ c.id }}"
class="btn btn-sm btn-default" title="{% trans "Clone" %}" data-toggle="tooltip">

View File

@@ -93,7 +93,7 @@
<a href="{% url "control:event.items.up" organizer=request.event.organizer.slug event=request.event.slug item=i.id %}" class="btn btn-default btn-sm {% if forloop.counter0 == 0 and is_paginated and not page_obj.has_previous %}disabled{% endif %}"><i class="fa fa-arrow-up"></i></a>
<a href="{% url "control:event.items.down" organizer=request.event.organizer.slug event=request.event.slug item=i.id %}" class="btn btn-default btn-sm {% if forloop.revcounter0 == 0 and is_paginated and not page_obj.has_next %}disabled{% endif %}"><i class="fa fa-arrow-down"></i></a>
</td>
<td class="text-right">
<td class="text-right flip">
<a href="{% url "control:event.item" organizer=request.event.organizer.slug event=request.event.slug item=i.id %}" class="btn btn-default btn-sm"><i class="fa fa-edit"></i></a>
<a href="{% url "control:event.items.delete" organizer=request.event.organizer.slug event=request.event.slug item=i.id %}" class="btn btn-danger btn-sm"><i class="fa fa-trash"></i></a>
</td>

View File

@@ -58,7 +58,7 @@
{% bootstrap_form_errors form %}
{% bootstrap_field form.answer layout='inline' form_group_class="" %}
</div>
<div class="col-xs-2 text-right">
<div class="col-xs-2 text-right flip">
<span>&nbsp;</span><br>
<button type="button" class="btn btn-default" data-formset-move-up-button>
<i class="fa fa-arrow-up"></i></button>
@@ -86,7 +86,7 @@
</span>
{% bootstrap_field formset.empty_form.answer layout='inline' form_group_class="" %}
</div>
<div class="col-xs-2 text-right">
<div class="col-xs-2 text-right flip">
<span>&nbsp;</span><br>
<button type="button" class="btn btn-default" data-formset-move-up-button>
<i class="fa fa-arrow-up"></i></button>

View File

@@ -75,7 +75,7 @@
<a href="{% url "control:event.items.questions.up" organizer=request.event.organizer.slug event=request.event.slug question=q.id %}" class="btn btn-default btn-sm {% if forloop.counter0 == 0 and is_paginated and not page_obj.has_previous %}disabled{% endif %}"><i class="fa fa-arrow-up"></i></a>
<a href="{% url "control:event.items.questions.down" organizer=request.event.organizer.slug event=request.event.slug question=q.id %}" class="btn btn-default btn-sm {% if forloop.revcounter0 == 0 and is_paginated and not page_obj.has_next %}disabled{% endif %}"><i class="fa fa-arrow-down"></i></a>
</td>
<td class="text-right">
<td class="text-right flip">
<a href="{% url "control:event.items.questions.edit" organizer=request.event.organizer.slug event=request.event.slug question=q.id %}" class="btn btn-default btn-sm"><i class="fa fa-edit"></i></a>
<a href="{% url "control:event.items.questions.delete" organizer=request.event.organizer.slug event=request.event.slug question=q.id %}" class="btn btn-danger btn-sm"><i class="fa fa-trash"></i></a>
</td>

View File

@@ -26,7 +26,7 @@
{% if quota.closed %}
{% if closed_and_sold_out %}
<div class="alert alert-info">
<button type="submit" class="btn btn-default pull-right" name="disable" value="true">
<button type="submit" class="btn btn-default pull-right flip" name="disable" value="true">
{% trans "Open quota and disable closing" %}
</button>
{% trans "This quota is sold out and closed. Even if tickets become available e.g. through cancellations, they will not become available again unless you manually re-open the quota on this page." %}
@@ -34,7 +34,7 @@
</div>
{% else %}
<div class="alert alert-warning">
<button type="submit" class="btn btn-primary pull-right" name="reopen" value="true">{% trans "Open quota" %}</button>
<button type="submit" class="btn btn-primary pull-right flip" name="reopen" value="true">{% trans "Open quota" %}</button>
{% trans "This quota is closed since it has been sold out before. Tickets are theoretically available, but will not be sold unless you manually re-open the quota." %}
<div class="clearfix"></div>
</div>
@@ -53,7 +53,7 @@
<legend>{% trans "Availability calculation" %}</legend>
<div class="row">
<div class="col-xs-9">{% trans "Total quota" %}</div>
<div class="col-xs-3 text-right">
<div class="col-xs-3 flip text-right">
{% if quota.size == None %}{% trans "Infinite" %}{% else %}{{ quota.size }}{% endif %}
</div>
</div>
@@ -64,7 +64,7 @@
{{ row.label }}
{% if row.strong %}</strong>{% endif %}
</div>
<div class="col-xs-3 text-right">
<div class="col-xs-3 flip text-right">
{% if row.strong %}<strong>{% endif %}
{% if not row.strong %}{% endif %} {{ row.value }}
{% if row.strong %}</strong>{% endif %}

View File

@@ -75,7 +75,7 @@
{% endif %}
<td>{% if q.size == None %}Unlimited{% else %}{{ q.size }}{% endif %}</td>
<td>{% include "pretixcontrol/items/fragment_quota_availability.html" with availability=q.availability closed=q.closed %}</td>
<td class="text-right">
<td class="text-right flip">
<a href="{% url "control:event.items.quotas.edit" organizer=request.event.organizer.slug event=request.event.slug quota=q.id %}" class="btn btn-default btn-sm"><i class="fa fa-edit"></i></a>
<a href="{% url "control:event.items.quotas.add" organizer=request.event.organizer.slug event=request.event.slug %}?copy_from={{ q.id }}"
class="btn btn-sm btn-default" title="{% trans "Clone" %}" data-toggle="tooltip">

View File

@@ -17,7 +17,7 @@
{% for application in applications %}
<tr>
<td><strong><a href="{% url "control:user.settings.oauth.app" pk=application.pk %}">{{ application.name }}</a></strong></td>
<td class="text-right">
<td class="text-right flip">
<a href="{% url "control:user.settings.oauth.app" pk=application.pk %}" class="btn btn-default btn-sm"><i class="fa fa-edit"></i></a>
<a href="{% url "control:user.settings.oauth.app.roll" pk=application.pk %}" class="btn btn-default btn-sm"><i class="fa fa-repeat"></i></a>
<a href="{% url "control:user.settings.oauth.app.disable" pk=application.pk %}" class="btn btn-danger btn-sm"><i class="fa fa-trash"></i></a>

View File

@@ -44,7 +44,7 @@
{% endfor %}
</ul>
</td>
<td class="text-right">
<td class="text-right flip">
<a href="{% url "control:user.settings.oauth.revoke" pk=token.pk %}"
class="btn btn-danger btn-sm">{% trans "Revoke access" %}</a>
</td>

View File

@@ -19,7 +19,7 @@
{% if order.testmode %}
<span class="label label-warning">{% trans "TEST MODE" %}</span>
{% endif %}
{% include "pretixcontrol/orders/fragment_order_status.html" with order=order class="pull-right" %}
{% include "pretixcontrol/orders/fragment_order_status.html" with order=order class="pull-right flip" %}
</h1>
{% if 'can_change_orders' in request.eventpermset %}
<form action="{% url "control:event.order.transition" event=request.event.slug organizer=request.event.organizer.slug code=order.code %}"
@@ -78,7 +78,7 @@
method="post">
{% csrf_token %}
<div class="alert alert-info">
<button name="status" value="e" class="btn btn-default pull-right">{% trans "Expire order" %}</button>
<button name="status" value="e" class="btn btn-default pull-right flip">{% trans "Expire order" %}</button>
{% trans "The payment for this order is overdue, but you have configured not to expire orders automatically. To free quota capacity, you can mark it as expired manually." %}
<div class="clearfix"></div>
</div>
@@ -224,7 +224,7 @@
</div>
<div class="panel panel-default items">
<div class="panel-heading">
<div class="pull-right">
<div class="pull-right flip">
{% if order.changable and 'can_change_orders' in request.eventpermset %}
<a href="{% url "control:event.order.info" event=request.event.slug organizer=request.event.organizer.slug code=order.code %}">
<span class="fa fa-edit"></span>
@@ -490,7 +490,7 @@
<th>{% trans "Confirmation date" %}</th>
<th>{% trans "Payment method" %}</th>
<th>{% trans "Status" %}</th>
<th class="text-right">{% trans "Amount" %}</th>
<th class="text-right flip">{% trans "Amount" %}</th>
</tr>
</thead>
<tbody>
@@ -528,7 +528,7 @@
{{ p.get_state_display }}
</span>
</td>
<td class="text-right">{{ p.amount|money:request.event.currency }}</td>
<td class="text-right flip">{{ p.amount|money:request.event.currency }}</td>
</tr>
{% if p.html_info %}
<tr>
@@ -586,8 +586,8 @@
<th>{% trans "Payment method" %}</th>
<th>{% trans "Payment" %}</th>
<th>{% trans "Status" %}</th>
<th class="text-right">{% trans "Amount" %}</th>
<th class="text-right"></th>
<th class="text-right flip">{% trans "Amount" %}</th>
<th class="text-right flip"></th>
</tr>
</thead>
<tbody>
@@ -610,8 +610,8 @@
{{ r.get_state_display }}
</span>
</td>
<td class="text-right">{{ r.amount|money:request.event.currency }}</td>
<td class="text-right">
<td class="text-right flip">{{ r.amount|money:request.event.currency }}</td>
<td class="text-right flip">
{% if r.state == "transit" or r.state == "created" %}
<a href="{% url "control:event.order.refunds.cancel" event=request.event.slug organizer=request.event.organizer.slug code=order.code refund=r.pk %}"
class="btn btn-danger btn-xs" data-toggle="tooltip"
@@ -664,7 +664,7 @@
<div class="col-md-6">
<div class="panel panel-default">
<div class="panel-heading">
<div class="pull-right">
<div class="pull-right flip">
{% if order.changable and 'can_change_orders' in request.eventpermset %}
<a href="{% url "control:event.order.info" event=request.event.slug organizer=request.event.organizer.slug code=order.code %}">
<span class="fa fa-edit"></span>

View File

@@ -26,7 +26,7 @@
{% csrf_token %}
<input type="hidden" name="exporter" value="{{ e.identifier }}" />
{% bootstrap_form e.form layout='control' %}
<button class="btn btn-primary pull-right" type="submit">
<button class="btn btn-primary pull-right flip" type="submit">
<span class="icon icon-upload"></span> {% trans "Start export" %}
</button>
</form>

View File

@@ -98,11 +98,11 @@
<a href="?{% url_replace request 'ordering' '-datetime' %}"><i class="fa fa-caret-down"></i></a>
<a href="?{% url_replace request 'ordering' 'datetime' %}"><i class="fa fa-caret-up"></i></a>
</th>
<th class="text-right">{% trans "Order total" %}
<th class="text-right flip">{% trans "Order total" %}
<a href="?{% url_replace request 'ordering' '-total' %}"><i class="fa fa-caret-down"></i></a>
<a href="?{% url_replace request 'ordering' 'total' %}"><i class="fa fa-caret-up"></i></a></th>
<th class="text-right">{% trans "Positions" %}</th>
<th class="text-right">{% trans "Status" %}
<th class="text-right flip">{% trans "Positions" %}</th>
<th class="text-right flip">{% trans "Status" %}
<a href="?{% url_replace request 'ordering' '-status' %}"><i class="fa fa-caret-down"></i></a>
<a href="?{% url_replace request 'ordering' 'status' %}"><i class="fa fa-caret-up"></i></a></th>
</tr>
@@ -127,7 +127,7 @@
{% endif %}
</td>
<td>{{ o.datetime|date:"SHORT_DATETIME_FORMAT" }}</td>
<td class="text-right">
<td class="text-right flip">
{% if o.has_external_refund or o.has_pending_refund %}
<span class="label label-danger">{% trans "REFUND PENDING" %}</span>
{% elif o.has_pending_refund %}
@@ -142,8 +142,8 @@
{% endif %}
{{ o.total|money:request.event.currency }}
</td>
<td class="text-right">{{ o.pcnt|default_if_none:"0" }}</td>
<td class="text-right">{% include "pretixcontrol/orders/fragment_order_status.html" with order=o %}</td>
<td class="text-right flip">{{ o.pcnt|default_if_none:"0" }}</td>
<td class="text-right flip">{% include "pretixcontrol/orders/fragment_order_status.html" with order=o %}</td>
</tr>
{% endfor %}
</tbody>
@@ -159,12 +159,12 @@
{{ s }} orders
{% endblocktrans %}
</th>
<th class="text-right">
<th class="text-right flip">
{% if sums.s|default_if_none:"none" != "none" %}
{{ sums.s|money:request.event.currency }}
{% endif %}
</th>
<th class="text-right">
<th class="text-right flip">
{% if sums.pc %}
{{ sums.pc }}
{% endif %}

View File

@@ -5,7 +5,7 @@
{% block title %}{% trans "Order overview" %}{% endblock %}
{% block content %}
{% url "control:event.orders" organizer=request.event.organizer.slug event=request.event.slug as listurl %}
<div class="pull-right">
<div class="pull-right flip">
<div class="btn-group" role="group" id="sumtoggle">
<button type="button" data-target=".count" class="btn btn-default active">{% trans "Sales" %}</button>
<button type="button" data-target=".sum-gross" class="btn btn-default">{% trans "Revenue (gross)" %}</button>

View File

@@ -43,8 +43,8 @@
<th>{% trans "Start date" %}</th>
<th>{% trans "Source" %}</th>
<th>{% trans "Status" %}</th>
<th class="text-right">{% trans "Amount" %}</th>
<th class="text-right">{% trans "Actions" %}</th>
<th class="text-right flip">{% trans "Amount" %}</th>
<th class="text-right flip">{% trans "Actions" %}</th>
</tr>
</thead>
<tbody>
@@ -69,10 +69,10 @@
{{ r.get_state_display }}
</span>
</td>
<td class="text-right">
<td class="text-right flip">
{{ r.amount|money:request.event.currency }}
</td>
<td class="text-right">
<td class="text-right flip">
{% if r.state == "transit" or r.state == "created" %}
<a href="{% url "control:event.order.refunds.cancel" event=request.event.slug organizer=request.event.organizer.slug code=r.order.code refund=r.pk %}?next={{ request.get_full_path|urlencode }}"
class="btn btn-danger btn-xs" data-toggle="tooltip">

View File

@@ -70,7 +70,7 @@
<span class="label label-success">{% trans "On sale" %}</span>
{% endif %}
</td>
<td class="text-right">
<td class="text-right flip">
<a href="{% url "control:event.index" organizer=e.organizer.slug event=e.slug %}"
class="btn btn-sm btn-default" title="{% trans "Open event dashboard" %}"
data-toggle="tooltip">

View File

@@ -82,7 +82,7 @@
</ul>
{% endif %}
</td>
<td class="text-right">
<td class="text-right flip">
{% if not d.initialized %}
<a href="{% url "control:organizer.device.connect" organizer=request.organizer.slug device=d.id %}"
class="btn btn-primary btn-sm"><i class="fa fa-link"></i>

View File

@@ -80,7 +80,7 @@
<div class="col-md-5 col-lg-6">
{% bootstrap_field form.default layout='inline' form_group_class="" %}
</div>
<div class="col-md-2 col-lg-1 text-right">
<div class="col-md-2 col-lg-1 text-right flip">
<button type="button" class="btn btn-danger" data-formset-delete-button>
<i class="fa fa-trash"></i></button>
</div>
@@ -100,7 +100,7 @@
<div class="col-md-5 col-lg-6">
{% bootstrap_field formset.empty_form.default layout='inline' form_group_class="" %}
</div>
<div class="col-md-2 col-lg-1 text-right">
<div class="col-md-2 col-lg-1 text-right flip">
<button type="button" class="btn btn-danger" data-formset-delete-button>
<i class="fa fa-trash"></i></button>
</div>

View File

@@ -37,7 +37,7 @@
</span>
{% endif %}
</td>
<td class="text-right">
<td class="text-right flip">
<button type="submit" name="remove-member" value="{{ u.id }}"
class="btn btn-danger btn-sm btn-block">
<i class="fa fa-times"></i> {% trans "Remove" %}
@@ -57,7 +57,7 @@
<span class="fa fa-repeat"></span>
</button>
</td>
<td class="text-right">
<td class="text-right flip">
<button type="submit" name="remove-invite" value="{{ i.id }}"
class="btn btn-danger btn-sm btn-block">
<i class="fa fa-times"></i> {% trans "Remove" %}
@@ -76,7 +76,7 @@
be sent an email with an invitation.
{% endblocktrans %}
</td>
<td class="text-right">
<td class="text-right flip">
<button type="submit" class="btn btn-primary btn-sm btn-block">
<i class="fa fa-plus"></i> {% trans "Add" %}
</button>
@@ -103,7 +103,7 @@
<td>
{{ t.name }}
</td>
<td class="text-right">
<td class="text-right flip">
<button type="submit" name="remove-token" value="{{ t.id }}"
class="btn btn-danger btn-sm btn-block">
<i class="fa fa-times"></i> {% trans "Remove" %}
@@ -117,7 +117,7 @@
<td>
{% bootstrap_field add_token_form.name layout='inline' %}<br>
</td>
<td class="text-right">
<td class="text-right flip">
<button type="submit" class="btn btn-primary btn-sm btn-block">
<i class="fa fa-plus"></i> {% trans "Add" %}
</button>

View File

@@ -42,7 +42,7 @@
{{ t.eventcount }}
{% endif %}
</td>
<td class="text-right">
<td class="text-right flip">
<a href="{% url "control:organizer.team" organizer=request.organizer.slug team=t.id %}"
class="btn btn-default btn-sm"><i class="fa fa-list"></i></a>
<a href="{% url "control:organizer.team.edit" organizer=request.organizer.slug team=t.id %}"

View File

@@ -26,7 +26,7 @@
<span class="fa fa-hourglass fa-fw"></span>
{{ c.execution_time|floatformat:2 }}s
</div>
<div class="col-md-2 col-xs-8 text-right">
<div class="col-md-2 col-xs-8 text-right flip">
{% if c.success %}
<span class="label label-success">
<span class="fa fa-check-circle fa-fw"></span>

View File

@@ -61,7 +61,7 @@
</ul>
{% endif %}
</td>
<td class="text-right">
<td class="text-right flip">
<a href="{% url "control:organizer.webhook.edit" organizer=request.organizer.slug webhook=w.id %}"
class="btn btn-default btn-sm" data-toggle="tooltip" title="{% trans "Edit" %}">
<i class="fa fa-edit"></i>

View File

@@ -25,7 +25,7 @@
<div class="col-md-9">
<div class="panel panel-default">
<div class="panel-heading">
<div class="pull-right">
<div class="pull-right flip">
<div class="btn-group">
<button type="button" class="btn btn-default btn-xs" id="toolbox-source"
title="{% trans "Code" %}">
@@ -70,7 +70,7 @@
<p>
<textarea id="source-textarea" class="form-control"></textarea>
</p>
<p class="text-right">
<p class="text-right flip">
<button class="btn btn-default" id="source-close">
{% trans "Cancel" %}
</button>
@@ -151,7 +151,7 @@
<div class="col-md-3" id="editor-toolbox-area">
<div class="panel panel-default" id="toolbox">
<div class="panel-heading">
<div class="pull-right object-buttons">
<div class="pull-right object-buttons flip">
<div class="btn-group">
<button type="button" class="btn btn-default btn-xs" id="toolbox-cut"
title="{% trans "Cut" %}">

View File

@@ -45,10 +45,10 @@
<th>{% trans "Order date" %}
<a href="?{% url_replace request 'ordering' '-datetime' %}"><i class="fa fa-caret-down"></i></a>
<a href="?{% url_replace request 'ordering' 'datetime' %}"><i class="fa fa-caret-up"></i></a></th>
<th class="text-right">{% trans "Order total" %}
<th class="text-right flip">{% trans "Order total" %}
<a href="?{% url_replace request 'ordering' '-total' %}"><i class="fa fa-caret-down"></i></a>
<a href="?{% url_replace request 'ordering' 'total' %}"><i class="fa fa-caret-up"></i></a></th>
<th class="text-right">{% trans "Status" %}
<th class="text-right flip">{% trans "Status" %}
<a href="?{% url_replace request 'ordering' '-status' %}"><i class="fa fa-caret-down"></i></a>
<a href="?{% url_replace request 'ordering' 'status' %}"><i class="fa fa-caret-up"></i></a></th>
</tr>
@@ -73,8 +73,8 @@
{% endif %}
</td>
<td>{{ o.datetime|date:"SHORT_DATETIME_FORMAT" }}</td>
<td class="text-right">{{ o.total|money:o.event.currency }}</td>
<td class="text-right">{% include "pretixcontrol/orders/fragment_order_status.html" with order=o %}</td>
<td class="text-right flip">{{ o.total|money:o.event.currency }}</td>
<td class="text-right flip">{% include "pretixcontrol/orders/fragment_order_status.html" with order=o %}</td>
</tr>
{% empty %}
<tr>

View File

@@ -33,7 +33,7 @@
<div class="col-md-10">
{% trans "Repetition rule" %}
</div>
<div class="col-md-2 text-right">
<div class="col-md-2 text-right flip">
<button type="button" class="btn btn-danger btn-xs"
data-formset-delete-button>
<i class="fa fa-trash"></i></button>
@@ -144,7 +144,7 @@
<div class="col-md-10">
{% trans "Repetition rule" %}
</div>
<div class="col-md-2 text-right">
<div class="col-md-2 text-right flip">
<button type="button" class="btn btn-danger btn-xs"
data-formset-delete-button>
<i class="fa fa-trash"></i></button>
@@ -313,7 +313,7 @@
<div class="col-md-10">
{% bootstrap_field form.name layout='inline' form_group_class="" %}
</div>
<div class="col-md-2 text-right">
<div class="col-md-2 text-right flip">
<button type="button" class="btn btn-danger" data-formset-delete-button>
<i class="fa fa-trash"></i></button>
</div>
@@ -341,7 +341,7 @@
<div class="col-md-10">
{% bootstrap_field formset.empty_form.name layout='inline' form_group_class="" %}
</div>
<div class="col-md-2 text-right">
<div class="col-md-2 text-right flip">
<button type="button" class="btn btn-danger" data-formset-delete-button>
<i class="fa fa-trash"></i></button>
</div>
@@ -384,7 +384,7 @@
<div class="col-md-10">
{% bootstrap_field form.name layout='inline' form_group_class="" %}
</div>
<div class="col-md-2 text-right">
<div class="col-md-2 text-right flip">
<button type="button" class="btn btn-danger" data-formset-delete-button>
<i class="fa fa-trash"></i></button>
</div>
@@ -413,7 +413,7 @@
<div class="col-md-10">
{% bootstrap_field cl_formset.empty_form.name layout='inline' form_group_class="" %}
</div>
<div class="col-md-2 text-right">
<div class="col-md-2 text-right flip">
<button type="button" class="btn btn-danger" data-formset-delete-button>
<i class="fa fa-trash"></i></button>
</div>

View File

@@ -71,7 +71,7 @@
<div class="col-md-10">
{% bootstrap_field form.name layout='inline' form_group_class="" %}
</div>
<div class="col-md-2 text-right">
<div class="col-md-2 text-right flip">
<button type="button" class="btn btn-danger" data-formset-delete-button>
<i class="fa fa-trash"></i></button>
</div>
@@ -99,7 +99,7 @@
<div class="col-md-10">
{% bootstrap_field formset.empty_form.name layout='inline' form_group_class="" %}
</div>
<div class="col-md-2 text-right">
<div class="col-md-2 text-right flip">
<button type="button" class="btn btn-danger" data-formset-delete-button>
<i class="fa fa-trash"></i></button>
</div>
@@ -142,7 +142,7 @@
<div class="col-md-10">
{% bootstrap_field form.name layout='inline' form_group_class="" %}
</div>
<div class="col-md-2 text-right">
<div class="col-md-2 text-right flip">
<button type="button" class="btn btn-danger" data-formset-delete-button>
<i class="fa fa-trash"></i></button>
</div>
@@ -171,7 +171,7 @@
<div class="col-md-10">
{% bootstrap_field cl_formset.empty_form.name layout='inline' form_group_class="" %}
</div>
<div class="col-md-2 text-right">
<div class="col-md-2 text-right flip">
<button type="button" class="btn btn-danger" data-formset-delete-button>
<i class="fa fa-trash"></i></button>
</div>

View File

@@ -119,7 +119,7 @@
<span class="label label-success">{% trans "On sale" %}</span>
{% endif %}
</td>
<td class="text-right">
<td class="text-right flip">
<a href="{% url "control:event.subevent" organizer=request.event.organizer.slug event=request.event.slug subevent=s.id %}?returnto={{ request.GET.urlencode|urlencode }}" class="btn btn-default btn-sm"><i class="fa fa-edit"></i></a>
<div class="btn-group {% if forloop.revcounter0 < 2 %}dropup{% endif %}">
<button type="button" class="btn btn-default btn-sm dropdown-toggle"

View File

@@ -36,7 +36,7 @@
</div>
<div class="panel-body">
{% if not settings.PRETIX_OBLIGATORY_2FA %}
<a href="{% url "control:user.settings.2fa.disable" %}" class="btn btn-primary pull-right">
<a href="{% url "control:user.settings.2fa.disable" %}" class="btn btn-primary pull-right flip">
{% trans "Disable" %}
</a>
{% endif %}
@@ -52,7 +52,7 @@
</div>
<div class="panel-body">
{% if devices|length %}
<a href="{% url "control:user.settings.2fa.enable" %}" class="btn btn-primary pull-right">
<a href="{% url "control:user.settings.2fa.enable" %}" class="btn btn-primary pull-right flip">
{% trans "Enable" %}
</a>
{% endif %}
@@ -72,7 +72,7 @@
<ul class="list-group">
{% for d in devices %}
<li class="list-group-item">
<a class="btn btn-danger btn-xs pull-right"
<a class="btn btn-danger btn-xs pull-right flip"
href="{% url "control:user.settings.2fa.delete" devicetype=d.devicetype device=d.pk %}">
Delete
</a>

View File

@@ -9,7 +9,7 @@
<fieldset>
{% if request.user.notifications_send %}
<div class="alert alert-info">
<button name="notifications_send" value="off" type="submit" class="pull-right btn btn-default">
<button name="notifications_send" value="off" type="submit" class="pull-right flip btn btn-default">
<span class="fa fa-bell-slash"></span>
{% trans "Disable" %}
</button>
@@ -18,7 +18,7 @@
</div>
{% else %}
<div class="alert alert-warning">
<button name="notifications_send" value="on" type="submit" class="pull-right btn btn-default">
<button name="notifications_send" value="on" type="submit" class="pull-right flip btn btn-default">
<span class="fa fa-bell"></span>
{% trans "Enable" %}
</button>

View File

@@ -27,7 +27,7 @@
{% trans "Alternatively, you can use your WebAuthn device." %}
</small></p>
{% endif %}
<div class="form-group text-right">
<div class="form-group text-right flip">
<button type="submit" class="btn btn-primary btn-block">
{% trans "Continue" %}
</button>

View File

@@ -46,7 +46,7 @@
<span class="fa fa-times text-danger"></span>
{% endif %}
</td>
<td class="text-right">
<td class="text-right flip">
<a href="{% url "control:user.sudo.edit" id=s.id %}" class="btn btn-default btn-sm"><i
class="fa fa-edit"></i></a>
</td>

View File

@@ -57,7 +57,7 @@
<td>{{ u.fullname|default_if_none:"" }}</td>
<td>{% if u.is_active %}<span class="fa fa-check-circle"></span>{% endif %}</td>
<td>{% if u.is_staff %}<span class="fa fa-check-circle"></span>{% endif %}</td>
<td class="text-right">
<td class="text-right flip">
<a href="{% url "control:users.edit" id=u.id %}" class="btn btn-default btn-sm"><i class="fa fa-edit"></i></a>
</td>
</tr>

View File

@@ -137,7 +137,7 @@
{% if request.event.has_subevents %}
<td>{{ v.subevent.name }} {{ v.subevent.get_date_range_display }}</td>
{% endif %}
<td class="text-right">
<td class="text-right flip">
<a href="{% url "control:event.vouchers.bulk" organizer=request.event.organizer.slug event=request.event.slug %}?copy_from={{ v.id }}"
class="btn btn-sm btn-default" title="{% trans "Use as a template for new vouchers" %}" data-toggle="tooltip">
<span class="fa fa-copy"></span>

View File

@@ -190,7 +190,7 @@
</button>
{% endif %}
</td>
<td class="text-right">
<td class="text-right flip">
{% if not e.voucher %}
<button name="move_top" value="{{ e.pk }}" class="btn btn-default btn-sm"
data-toggle="tooltip" title="{% trans "Move to the top of the list" %}">