update templates

This commit is contained in:
Richard Schreiber
2024-11-22 11:12:57 +01:00
parent 3a1f19fa51
commit de6f6025e2
8 changed files with 188 additions and 132 deletions

View File

@@ -1,33 +1,39 @@
{% extends "pretixpresale/organizers/base.html" %}
{% extends "pretixpresale/organizers/customer_base.html" %}
{% load i18n %}
{% load icon %}
{% load eventurl %}
{% block title %}{% trans "Delete address" %}{% endblock %}
{% block content %}
<h2>
{% trans "Delete address" %}
</h2>
{% block inner %}
<div class="panel panel-default">
<div class="panel-heading">
<h3 class="panel-title">
{% icon "address-card-o" %} <b>{% trans "Delete address" %}</b>
</h3>
</div>
<div class="panel-body account-addresses">
<p>
{% trans "Do you really want to delete the following address from your account?" %}
</p>
<address>
{{ address.describe|linebreaksbr }}
</address>
</div>
</div>
<form method="post">
{% csrf_token %}
<p>
{% trans "Do you really want to delete the following address from your account?" %}
</p>
<address>
{{ address.describe|linebreaksbr }}
</address>
<div class="row">
<div class="col-md-4 col-sm-6">
<a class="btn btn-block btn-default btn-lg"
href="{% abseventurl request.organizer "presale:organizer.customer.profile" %}">
href="{% abseventurl request.organizer "presale:organizer.customer.addresses" %}">
{% trans "Go back" %}
</a>
</div>
<div class="col-md-4 col-md-offset-4 col-sm-6">
<button class="btn btn-block btn-danger btn-lg" type="submit">
{% icon "trash" %}
{% trans "Delete" %}
</button>
</div>
<div class="clearfix"></div>
</div>
</form>
{% endblock %}

View File

@@ -1,15 +1,14 @@
{% extends "pretixpresale/organizers/customer_base.html" %}
{% load i18n %}
{% load icon %}
{% load eventurl %}
{% load urlreplace %}
{% load money %}
{% load bootstrap3 %}
{% block title %}{% trans "Your account" %}{% endblock %}
{% block title %}{% trans "Addresses" %}{% endblock %}
{% block inner %}
<div class="panel panel-default">
<div class="panel-heading">
<h3 class="panel-title">
<span class="fa fa-address-card-o" aria-hidden="true"></span> <b>{% trans "Addresses" %}</b> ({{ page_obj.paginator.count }})
{% icon "address-card-o" %}
<b>{% trans "Addresses" %}</b> ({{ page_obj.paginator.count }})
</h3>
</div>
<div class="panel-body">
@@ -26,7 +25,7 @@
<p class="blank-after">
<a href="{% abseventurl request.organizer "presale:organizer.customer.address.delete" id=ia.id %}"
class="btn btn-danger btn-sm">
<span class="fa fa-trash" aria-hidden="true"></span>
{% icon "trash" %}
{% trans "Delete" %}
</a>
</p>

View File

@@ -1,7 +1,6 @@
{% extends "pretixpresale/organizers/base.html" %}
{% load i18n %}
{% load eventurl %}
{% load bootstrap3 %}
{% block content %}
<h2>
{% trans "Your account" %}

View File

@@ -1,96 +1,127 @@
{% extends "pretixpresale/organizers/base.html" %}
{% extends "pretixpresale/organizers/customer_base.html" %}
{% load i18n %}
{% load icon %}
{% load eventurl %}
{% load urlreplace %}
{% load money %}
{% load bootstrap3 %}
{% load textblob %}
{% block title %}{% trans "Your membership" %}{% endblock %}
{% block content %}
<h2>
{% trans "Your membership" %}
</h2>
<div class="panel panel-primary items">
{% block inner %}
<div class="panel panel-default">
<div class="panel-heading">
<h3 class="panel-title">
{% trans "Details" %}
{% if membership.membership_type.transferable %}
{% icon "users" %}
{% else %}
{% icon "id-badge" %}
{% endif %}
<b>{% trans "Your membership" %}</b>
{% if membership.testmode %}
<span class="h6">
{% textblob "warning" %}
{% trans "TEST MODE" %}
{% endtextblob %}
</span>
{% endif %}
</h3>
</div>
<div class="panel-body">
<dl class="dl-horizontal">
<dt>{% trans "Membership type" %}</dt>
<dd>{{ membership.membership_type.name }}</dd>
<dd>{% if membership.canceled %}<del>{% endif %}
{{ membership.membership_type.name }}
{% if membership.canceled %}</del>
<small>
{% textblob "danger" icon="times" %}
{% trans "Canceled" %}
{% endtextblob %}
</small>
{% endif %}
<br><small class="text-muted">
{% if membership.membership_type.transferable %}
({% trans "transferable" %})
{% else %}
({% trans "not transferable" %})
{% endif %}
</small>
</dd>
<dt>{% trans "Valid from" %}</dt>
<dd>{{ membership.date_start|date:"SHORT_DATETIME_FORMAT" }}
<dt>{% trans "Valid until" %}</dt>
<dd>{{ membership.date_end|date:"SHORT_DATETIME_FORMAT" }}
<dt>{% trans "Attendee name" %}</dt>
<dd>{{ membership.attendee_name }}
<dd>{{ membership.attendee_name|default_if_none:"" }}
<dt>{% trans "Maximum usages" %}</dt>
<dd>{{ membership.membership_type.max_usages|default_if_none:"" }}</dd>
</dl>
</div>
</div>
<div class="panel panel-default items">
<div class="panel panel-default">
<div class="panel-heading">
<h3 class="panel-title">
{% trans "Usages" %}
</h3>
</div>
<table class="panel-body table table-hover">
<caption class="sr-only">{% trans "Usages" %}</caption>
<thead>
<tr>
<th>{% trans "Order code" %}</th>
<th>{% trans "Event" %}</th>
<th>{% trans "Product" %}</th>
<th>{% trans "Order date" %}</th>
<th class="text-right">{% trans "Status" %}</th>
<th class="text-right"></th>
</tr>
</thead>
<tbody>
<div class="panel-body">
{% if usages %}
<ul class="full-width-list alternating-rows">
{% for op in usages %}
<tr>
<td>
<strong>
{{ op.order.code }}-{{ op.positionid }}
</strong>
{% if op.order.testmode %}
<span class="label label-warning">{% trans "TEST MODE" %}</span>
{% endif %}
</td>
<td>
{{ op.order.event }}
{% if op.subevent %}
<br>
{{ op.subevent|default:"" }}
{% endif %}
</td>
<td>
{{ op.item.name }}
{% if op.variation %} {{ op.variation }}{% endif %}
</td>
<td>
{{ op.order.datetime|date:"SHORT_DATETIME_FORMAT" }}
</td>
<td class="text-right flip">
{% if op.canceled %}
{% trans "Canceled" %} <i class="{{ class }} fa fa-times-circle text-danger" aria-hidden="true"></i>
{% else %}
{% include "pretixcontrol/orders/fragment_order_status.html" with order=op.order %}
{% endif %}
</td>
<td class="text-right flip">
<a href="{% abseventurl op.order.event "presale:event.order" order=op.order.code secret=op.order.secret %}"
target="_blank"
class="btn btn-default">
{% trans "Details" %}
</a>
</td>
</tr>
{% endfor %}
</tbody>
</table>
{% include "pretixcontrol/pagination.html" %}
<li class="row">
<dl>
<div class="col-md-4 col-sm-5 col-xs-12">
<dt class="sr-only">{% trans "Order" %}</dt>
<dd><strong>
<a href="{% abseventurl op.order.event "presale:event.order" order=op.order.code secret=op.order.secret %}" target="_blank">
<i class="fa fa-shopping-cart" aria-hidden="true"></i>
{{ op.order.code }}-{{ op.positionid }}
</a>
</strong>
<small>{% include "pretixpresale/event/fragment_order_status.html" with order=op.order event=op.order.event %}</small>
</dd>
<dd><time datetime="{{ op.order.datetime|date:"Y-m-d H:i" }}" class="text-muted small">{{ op.order.datetime|date:"SHORT_DATETIME_FORMAT" }}</time></dd>
{% if op.order.testmode %}
<dd>
<small>
{% textblob "warning" %}
{% trans "TEST MODE" %}
{% endtextblob %}
</small>
</dd>
{% endif %}
</div>
<div class="col-md-6 col-sm-5 col-xs-8">
<dt class="sr-only">{% trans "Product" %}</dt>
<dd>{{ op.item.name }}
{% if op.variation %} - {{ op.variation }}{% endif %}
</dd>
<dt class="sr-only">{% trans "Event" %}</dt>
<dd>
<small class="text-muted">
{{ op.order.event }}
{% if op.subevent %}
<br>{{ op.subevent }}
{% endif %}
{% if not op.order.event.has_subevents and op.order.event.settings.show_dates_on_frontpage %}
<br>{{ op.order.event.get_date_range_display }}
{% endif %}
</small>
</dd>
</div>
<div class="col-sm-2 col-xs-4">
<dt class="sr-only">{% trans "Actions" %}</dt>
<dd class="text-right">
<a href="{% abseventurl op.order.event "presale:event.order" order=op.order.code secret=op.order.secret %}"
target="_blank">
<span class="fa fa-list-ul" aria-hidden="true"></span>
{% trans "Details" %}
</a></dd>
</div>
</dl>
</li>
{% endfor %}
</ul>
{% else %}
<p class="text-center">{% trans "You havent used this membership yet." %}</p>
{% endif %}
</div>
</div>
{% include "pretixcontrol/pagination.html" %}
{% endblock %}

View File

@@ -1,16 +1,15 @@
{% extends "pretixpresale/organizers/customer_base.html" %}
{% load i18n %}
{% load icon %}
{% load eventurl %}
{% load urlreplace %}
{% load money %}
{% load bootstrap3 %}
{% load textblob %}
{% block title %}{% trans "Your account" %}{% endblock %}
{% block title %}{% trans "Memberships" %}{% endblock %}
{% block inner %}
<div class="panel panel-default">
<div class="panel-heading">
<h3 class="panel-title">
<span class="fa fa-id-badge" aria-hidden="true"></span> <b>{% trans "Memberships" %}</b> ({{ page_obj.paginator.count }})
{% icon "id-badge" %}
<b>{% trans "Memberships" %}</b> ({{ page_obj.paginator.count }})
</h3>
</div>
<div class="panel-body">
@@ -22,7 +21,9 @@
<div class="col-xs-5">
<dt>
{% if m.canceled %}<del>{% endif %}
{{ m.membership_type.name }}
<a href="{% abseventurl request.organizer "presale:organizer.customer.membership" id=m.id %}">
{{ m.membership_type.name }}
</a>
{% if m.membership_type.transferable %}
<span class="text-muted fa fa-users" aria-hidden="true" title="{% trans "Membership is transferable" %}"></span>
{% endif %}
@@ -33,7 +34,11 @@
{% endtextblob %}
</small>
{% endif %}
{% if m.testmode %}<span class="label label-warning">{% trans "TEST MODE" %}</span>{% endif %}
{% if m.testmode %}
{% textblob "warning" %}
{% trans "TEST MODE" %}
{% endtextblob %}
{% endif %}
</dt>
<dd class="text-muted">
{% if not m.membership_type.transferable %}
@@ -61,11 +66,11 @@
<div class="col-xs-2">
<dt class="sr-only">{% trans "Actions" %}</dt>
<dd class="text-right">
<a href="{% abseventurl request.organizer "presale:organizer.customer.membership" id=m.id %}"
target="_blank">
<span class="fa fa-list-ul" aria-hidden="true"></span>
{% trans "Details" %}
</a></dd>
<a href="{% abseventurl request.organizer "presale:organizer.customer.membership" id=m.id %}">
{% icon "list-ul" %}
{% trans "Details" %}
</a>
</dd>
</div>
</dl>
</li>

View File

@@ -1,9 +1,8 @@
{% extends "pretixpresale/organizers/customer_base.html" %}
{% load i18n %}
{% load eventurl %}
{% load urlreplace %}
{% load money %}
{% load bootstrap3 %}
{% load textblob %}
{% block title %}{% trans "Your account" %}{% endblock %}
{% block inner %}
<div class="panel panel-default">
@@ -34,8 +33,14 @@
<small>{% include "pretixpresale/event/fragment_order_status.html" with order=o event=o.event %}</small>
</dd>
<dd><time datetime="{{ o.datetime|date:"Y-m-d H:i" }}" class="text-muted small">{{ o.datetime|date:"SHORT_DATETIME_FORMAT" }}</time></dd>
{% if o.testmode and False %}
<dd><span class="label label-warning">{% trans "TEST MODE" %}</span></dd>
{% if o.testmode %}
<dd>
<small>
{% textblob "warning" %}
{% trans "TEST MODE" %}
{% endtextblob %}
</small>
</dd>
{% endif %}
</div>
<div class="col-md-2 col-sm-2 col-xs-4 text-right">

View File

@@ -1,33 +1,39 @@
{% extends "pretixpresale/organizers/base.html" %}
{% extends "pretixpresale/organizers/customer_base.html" %}
{% load i18n %}
{% load icon %}
{% load eventurl %}
{% block title %}{% trans "Delete profile" %}{% endblock %}
{% block content %}
<h2>
{% trans "Delete profile" %}
</h2>
{% block inner %}
<div class="panel panel-default">
<div class="panel-heading">
<h3 class="panel-title">
{% icon "user" %} <b>{% trans "Delete profile" %}</b>
</h3>
</div>
<div class="panel-body">
<p>
{% trans "Do you really want to delete the following profile from your account?" %}
</p>
<p>
{{ profile.describe|linebreaksbr }}
</p>
</div>
</div>
<form method="post">
{% csrf_token %}
<p>
{% trans "Do you really want to delete the following profile from your account?" %}
</p>
<address>
{{ profile.describe|linebreaksbr }}
</address>
<div class="row">
<div class="col-md-4 col-sm-6">
<a class="btn btn-block btn-default btn-lg"
href="{% abseventurl request.organizer "presale:organizer.customer.index" %}">
href="{% abseventurl request.organizer "presale:organizer.customer.profiles" %}">
{% trans "Go back" %}
</a>
</div>
<div class="col-md-4 col-md-offset-4 col-sm-6">
<button class="btn btn-block btn-danger btn-lg" type="submit">
{% icon "trash" %}
{% trans "Delete" %}
</button>
</div>
<div class="clearfix"></div>
</div>
</form>
{% endblock %}

View File

@@ -1,10 +1,8 @@
{% extends "pretixpresale/organizers/customer_base.html" %}
{% load i18n %}
{% load icon %}
{% load eventurl %}
{% load urlreplace %}
{% load money %}
{% load bootstrap3 %}
{% block title %}{% trans "Your account" %}{% endblock %}
{% block title %}{% trans "Attendee profiles" %}{% endblock %}
{% block inner %}
<div class="panel panel-default">
<div class="panel-heading">
@@ -15,17 +13,24 @@
<div class="panel-body">
{% if attendee_profiles %}
<ol class="full-width-list alternating-rows">
{% for ap in attendee_profiles %}
<li class="row">
{{ ap.describe|linebreaksbr }}
<a href="{% abseventurl request.organizer "presale:organizer.customer.profile.delete" id=ap.id %}"
class="btn btn-danger">
<span class="fa fa-trash" aria-hidden="true"></span>
{% trans "Delete" %}
</a>
</li>
{% for ap in attendee_profiles %}
{% if forloop.counter0 and forloop.counter0|divisibleby:4 %}
</li>
<li class="row">
{% endif %}
<div class="col-md-3 col-xs-12">
<p>{{ ap.describe|linebreaksbr }}</p>
<p class="blank-after">
<a href="{% abseventurl request.organizer "presale:organizer.customer.profile.delete" id=ap.id %}"
class="btn btn-danger btn-sm">
{% icon "trash" %}
{% trans "Delete" %}
</a>
</p>
</div>
{% endfor %}
</li>
</ol>
{% else %}
<p class="text-center">{% trans "You dont have any attendee profiles in your account yet." %}</p>