rename text-blob to textbubble

This commit is contained in:
Richard Schreiber
2024-11-22 12:56:22 +01:00
parent 3ec0fdb4d2
commit d1a6ab89fe
6 changed files with 33 additions and 33 deletions

View File

@@ -26,9 +26,9 @@ register = template.Library()
@register.simple_tag @register.simple_tag
def textblob(type, *args, **kwargs): def textbubble(type, *args, **kwargs):
return format_html( return format_html(
'<span class="text-blob-{}">{}', '<span class="textbubble-{}">{}',
type or "info", type or "info",
"" if "icon" not in kwargs else format_html( "" if "icon" not in kwargs else format_html(
'<i class="fa fa-{}" aria-hidden="true"></i> ', '<i class="fa fa-{}" aria-hidden="true"></i> ',
@@ -37,5 +37,5 @@ def textblob(type, *args, **kwargs):
) )
@register.simple_tag @register.simple_tag
def endtextblob(): def endtextbubble():
return mark_safe('</span>') return mark_safe('</span>')

View File

@@ -1,29 +1,29 @@
{% load i18n %} {% load i18n %}
{% load bootstrap3 %} {% load bootstrap3 %}
{% load textblob %} {% load textbubble %}
{# Changes should be replicated in pretixcontrol/orders/fragment_order_status.html and in pretix/base/models/orders.py #} {# Changes should be replicated in pretixcontrol/orders/fragment_order_status.html and in pretix/base/models/orders.py #}
{% if order.status == "n" %} {% if order.status == "n" %}
{% if order.require_approval %} {% if order.require_approval %}
{% textblob "warning" icon="exclamation-triangle" %}{% trans "Approval pending" %}{% endtextblob %} {% textbubble "warning" icon="exclamation-triangle" %}{% trans "Approval pending" %}{% endtextbubble %}
{% elif order.total == 0 %} {% elif order.total == 0 %}
{% textblob "warning" icon="exclamation-triangle" %}{% trans "Confirmation pending" context "order state" %}{% endtextblob %} {% textbubble "warning" icon="exclamation-triangle" %}{% trans "Confirmation pending" context "order state" %}{% endtextbubble %}
{% elif event.settings.payment_pending_hidden %} {% elif event.settings.payment_pending_hidden %}
{# intentionally left blank #} {# intentionally left blank #}
{% elif order.valid_if_pending %} {% elif order.valid_if_pending %}
{% textblob "info" icon="info-circle" %}{% trans "Confirmed" context "order state" %}{% endtextblob %} {% textbubble "info" icon="info-circle" %}{% trans "Confirmed" context "order state" %}{% endtextbubble %}
{% else %} {% else %}
{% textblob "warning" icon="exclamation-triangle" %}{% trans "Payment pending" %}{% endtextblob %} {% textbubble "warning" icon="exclamation-triangle" %}{% trans "Payment pending" %}{% endtextbubble %}
{% endif %} {% endif %}
{% elif order.status == "p" %} {% elif order.status == "p" %}
{% if order.count_positions == 0 %} {% if order.count_positions == 0 %}
{% textblob "info" icon="info-circle" %}{% trans "Canceled (paid fee)" %}{% endtextblob %} {% textbubble "info" icon="info-circle" %}{% trans "Canceled (paid fee)" %}{% endtextbubble %}
{% elif order.total == 0 %} {% elif order.total == 0 %}
{% textblob "success" icon="check" %}{% trans "Confirmed" context "order state" %}{% endtextblob %} {% textbubble "success" icon="check" %}{% trans "Confirmed" context "order state" %}{% endtextbubble %}
{% else %} {% else %}
{% textblob "success" icon="check" %}{% trans "Paid" %}{% endtextblob %} {% textbubble "success" icon="check" %}{% trans "Paid" %}{% endtextbubble %}
{% endif %} {% endif %}
{% elif order.status == "e" %} {% elif order.status == "e" %}
{% textblob "danger" icon="minus" %}{% trans "Expired" %}{% endtextblob %} {% textbubble "danger" icon="minus" %}{% trans "Expired" %}{% endtextbubble %}
{% elif order.status == "c" %} {% elif order.status == "c" %}
{% textblob "danger" icon="times" %}{% trans "Canceled" %}{% endtextblob %} {% textbubble "danger" icon="times" %}{% trans "Canceled" %}{% endtextbubble %}
{% endif %} {% endif %}

View File

@@ -2,7 +2,7 @@
{% load i18n %} {% load i18n %}
{% load icon %} {% load icon %}
{% load eventurl %} {% load eventurl %}
{% load textblob %} {% load textbubble %}
{% block title %}{% trans "Your membership" %}{% endblock %} {% block title %}{% trans "Your membership" %}{% endblock %}
{% block inner %} {% block inner %}
<div class="panel panel-default"> <div class="panel panel-default">
@@ -16,9 +16,9 @@
<b>{% trans "Your membership" %}</b> <b>{% trans "Your membership" %}</b>
{% if membership.testmode %} {% if membership.testmode %}
<span class="h6"> <span class="h6">
{% textblob "warning" %} {% textbubble "warning" %}
{% trans "TEST MODE" %} {% trans "TEST MODE" %}
{% endtextblob %} {% endtextbubble %}
</span> </span>
{% endif %} {% endif %}
</h3> </h3>
@@ -30,9 +30,9 @@
{{ membership.membership_type.name }} {{ membership.membership_type.name }}
{% if membership.canceled %}</del> {% if membership.canceled %}</del>
<small> <small>
{% textblob "danger" icon="times" %} {% textbubble "danger" icon="times" %}
{% trans "Canceled" %} {% trans "Canceled" %}
{% endtextblob %} {% endtextbubble %}
</small> </small>
{% endif %} {% endif %}
<br><small class="text-muted"> <br><small class="text-muted">
@@ -80,9 +80,9 @@
{% if op.order.testmode %} {% if op.order.testmode %}
<dd> <dd>
<small> <small>
{% textblob "warning" %} {% textbubble "warning" %}
{% trans "TEST MODE" %} {% trans "TEST MODE" %}
{% endtextblob %} {% endtextbubble %}
</small> </small>
</dd> </dd>
{% endif %} {% endif %}

View File

@@ -2,7 +2,7 @@
{% load i18n %} {% load i18n %}
{% load icon %} {% load icon %}
{% load eventurl %} {% load eventurl %}
{% load textblob %} {% load textbubble %}
{% block title %}{% trans "Memberships" %}{% endblock %} {% block title %}{% trans "Memberships" %}{% endblock %}
{% block inner %} {% block inner %}
<div class="panel panel-default"> <div class="panel panel-default">
@@ -38,9 +38,9 @@
<dd class="text-muted"> <dd class="text-muted">
<small> <small>
{% if m.canceled %} {% if m.canceled %}
{% textblob "danger" icon="times" %} {% textbubble "danger" icon="times" %}
{% trans "Canceled" %} {% trans "Canceled" %}
{% endtextblob %} {% endtextbubble %}
{% elif m.expired %} {% elif m.expired %}
{% icon "minus-square-o" %} {% icon "minus-square-o" %}
{% trans "Expired since" %} {% trans "Expired since" %}
@@ -65,9 +65,9 @@
{% if m.testmode %} {% if m.testmode %}
<dd> <dd>
<small> <small>
{% textblob "warning" %} {% textbubble "warning" %}
{% trans "TEST MODE" %} {% trans "TEST MODE" %}
{% endtextblob %} {% endtextbubble %}
</small> </small>
</dd> </dd>
{% endif %} {% endif %}

View File

@@ -2,7 +2,7 @@
{% load i18n %} {% load i18n %}
{% load eventurl %} {% load eventurl %}
{% load money %} {% load money %}
{% load textblob %} {% load textbubble %}
{% block title %}{% trans "Your account" %}{% endblock %} {% block title %}{% trans "Your account" %}{% endblock %}
{% block inner %} {% block inner %}
<div class="panel panel-default"> <div class="panel panel-default">
@@ -36,9 +36,9 @@
{% if o.testmode %} {% if o.testmode %}
<dd> <dd>
<small> <small>
{% textblob "warning" %} {% textbubble "warning" %}
{% trans "TEST MODE" %} {% trans "TEST MODE" %}
{% endtextblob %} {% endtextbubble %}
</small> </small>
</dd> </dd>
{% endif %} {% endif %}

View File

@@ -531,7 +531,7 @@ h2 .label {
} }
.text-blob-success, .text-blob-info, .text-blob-warning, .text-blob-danger { .textbubble-success, .textbubble-info, .textbubble-warning, .textbubble-danger {
padding: 0 .4em; padding: 0 .4em;
border-radius: $border-radius-base; border-radius: $border-radius-base;
font-weight: bold; font-weight: bold;
@@ -541,28 +541,28 @@ h2 .label {
padding-left: .25em; padding-left: .25em;
} }
} }
.text-blob-success { .textbubble-success {
color: var(--pretix-brand-success-shade-42); color: var(--pretix-brand-success-shade-42);
background: var(--pretix-brand-success-tint-85); background: var(--pretix-brand-success-tint-85);
.fa { .fa {
color: var(--pretix-brand-success); color: var(--pretix-brand-success);
} }
} }
.text-blob-info { .textbubble-info {
color: var(--pretix-brand-info-shade-42); color: var(--pretix-brand-info-shade-42);
background: var(--pretix-brand-info-tint-85); background: var(--pretix-brand-info-tint-85);
.fa { .fa {
color: var(--pretix-brand-info); color: var(--pretix-brand-info);
} }
} }
.text-blob-warning { .textbubble-warning {
color: var(--pretix-brand-warning-shade-42); color: var(--pretix-brand-warning-shade-42);
background: var(--pretix-brand-warning-tint-85); background: var(--pretix-brand-warning-tint-85);
.fa { .fa {
color: var(--pretix-brand-warning); color: var(--pretix-brand-warning);
} }
} }
.text-blob-danger { .textbubble-danger {
color: var(--pretix-brand-danger-shade-42); color: var(--pretix-brand-danger-shade-42);
background: var(--pretix-brand-danger-tint-85); background: var(--pretix-brand-danger-tint-85);
.fa { .fa {