mirror of
https://gitlab.com/allianceauth/allianceauth.git
synced 2025-07-09 04:20:17 +02:00
remove temps from more templates
This commit is contained in:
parent
baf3c85ac7
commit
168e6cc290
@ -11,9 +11,9 @@
|
|||||||
{% endblock header_nav_brand %}
|
{% endblock header_nav_brand %}
|
||||||
|
|
||||||
{% block content %}
|
{% block content %}
|
||||||
<div class="allianceauth-mumbletemps">
|
<div class="allianceauth-mumble">
|
||||||
<div class="row">
|
<div class="row">
|
||||||
{% block mumbletemps %}{% endblock %}
|
{% block mumble %}{% endblock mumble %}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
@ -1,10 +1,9 @@
|
|||||||
{% extends "mumbletemps/base.html" %}
|
{% extends "services/mumble/base.html" %}
|
||||||
|
|
||||||
{% load i18n %}
|
{% load i18n %}
|
||||||
{% load humanize %}
|
{% load humanize %}
|
||||||
{% load timetags %}
|
|
||||||
|
|
||||||
{% block mumbletemps %}
|
{% block mumble %}
|
||||||
<div class="col-md-6 mb-2">
|
<div class="col-md-6 mb-2">
|
||||||
<div class="card h-100">
|
<div class="card h-100">
|
||||||
<div class="card-header bg-warning">
|
<div class="card-header bg-warning">
|
||||||
@ -13,20 +12,29 @@
|
|||||||
|
|
||||||
<div class="card-body text-center">
|
<div class="card-body text-center">
|
||||||
<p>
|
<p>
|
||||||
{% translate 'Temp Links Give Access to mumble with the <b class="text-success">Guest</b> Group for the preset time.' %}
|
{% blocktranslate trimmed with bold_start="<b>" bold_end="</b>" %}
|
||||||
|
Temp Links Give Access to mumble with the {{ bold_start }}Guest{{ bold_end }} Group for the preset time
|
||||||
|
{% endblocktranslate %}
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
<p>
|
<p>
|
||||||
{% translate 'Connected users <b class="text-warning">will not</b> be kicked at the end of this period.' %}
|
{% blocktranslate trimmed with bold_start="<b class='text-warning'>" bold_end="</b>" %}
|
||||||
|
Connected users {{ bold_start }}will not{{ bold_end }} be kicked at the end of this period.
|
||||||
|
{% endblocktranslate %}
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
<p>
|
<p>
|
||||||
{% translate 'Templink users can be kicked in mumble by typing <span class="badge bg-danger">!kicktemps</span> in mumble chat.' %}
|
{% blocktranslate trimmed with badge_start="<span class='badge bg-danger'>" badge_end="</span>" %}
|
||||||
|
Templink users can be kicked in mumble by typing {{ badge_start }}!kicktemps{{ badge_end }} in mumble chat.
|
||||||
|
{% endblocktranslate %}
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
<p>
|
<p>
|
||||||
{% translate 'There are <b class="text-warning">no restrictions</b> on who or how many can use a templink, share wisely.' %}
|
{% blocktranslate trimmed with bold_start="<b class='text-warning'>" bold_end="</b>" %}
|
||||||
|
There are {{ bold_start }}no restrictions{{ bold_end }} on who or how many can use a templink, share wisely.
|
||||||
|
{% endblocktranslate %}
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@ -40,7 +48,7 @@
|
|||||||
<div class="card-body text-center">
|
<div class="card-body text-center">
|
||||||
<p>{% translate "Your link will be displayed on the next page for an easy copy and paste." %}</p>
|
<p>{% translate "Your link will be displayed on the next page for an easy copy and paste." %}</p>
|
||||||
|
|
||||||
<form action="{% url 'mumbletemps:index' %}" method="post">
|
<form action="{% url 'mumble:index' %}" method="post">
|
||||||
{% csrf_token %}
|
{% csrf_token %}
|
||||||
|
|
||||||
<div class="mb-3">
|
<div class="mb-3">
|
||||||
@ -71,9 +79,9 @@
|
|||||||
{% translate "Expires in" %}: <span id="countdown{{ tl.link_ref }}hot"></span>
|
{% translate "Expires in" %}: <span id="countdown{{ tl.link_ref }}hot"></span>
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
<pre>{{ SITE_URL }}{% url 'mumbletemps:join' tl.link_ref %}</pre>
|
<pre>{{ SITE_URL }}{% url 'mumble:join' tl.link_ref %}</pre>
|
||||||
|
|
||||||
<button class="btn btn-info" id="clipboard-new" data-clipboard-text="{{ SITE_URL }}{% url 'mumbletemps:join' tl.link_ref %}">
|
<button class="btn btn-info" id="clipboard-new" data-clipboard-text="{{ SITE_URL }}{% url 'mumble:join' tl.link_ref %}">
|
||||||
{% translate "Copy to Clipboard!" %}
|
{% translate "Copy to Clipboard!" %}
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
@ -116,13 +124,13 @@
|
|||||||
<td class="text-center">
|
<td class="text-center">
|
||||||
<button class="btn btn-info"
|
<button class="btn btn-info"
|
||||||
id="clipboard-{{ lnk.link_ref }}"
|
id="clipboard-{{ lnk.link_ref }}"
|
||||||
data-clipboard-text="{{ SITE_URL }}{% url 'mumbletemps:join' lnk.link_ref %}">
|
data-clipboard-text="{{ SITE_URL }}{% url 'mumble:join' lnk.link_ref %}">
|
||||||
{% translate "Copy to Clipboard!" %}
|
{% translate "Copy to Clipboard!" %}
|
||||||
</button>
|
</button>
|
||||||
</td>
|
</td>
|
||||||
|
|
||||||
<td class="text-center">
|
<td class="text-center">
|
||||||
<a class="btn btn-danger" href="{% url 'mumbletemps:nuke' lnk.link_ref %}">{% translate "Nuke Link!" %}</a>
|
<a class="btn btn-danger" href="{% url 'mumble:nuke' lnk.link_ref %}">{% translate "Nuke Link!" %}</a>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
@ -162,7 +170,7 @@
|
|||||||
<td class="text-center">{{ lnk.link_ref }}</td>
|
<td class="text-center">{{ lnk.link_ref }}</td>
|
||||||
|
|
||||||
<td class="text-center">
|
<td class="text-center">
|
||||||
<a class="btn btn-danger" href="{% url 'mumbletemps:nuke' lnk.link_ref %}">{% translate "Nuke Link!" %}</a>
|
<a class="btn btn-danger" href="{% url 'mumble:nuke' lnk.link_ref %}">{% translate "Nuke Link!" %}</a>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
@ -172,103 +180,18 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% endblock mumbletemps %}
|
{% endblock mumble %}
|
||||||
|
|
||||||
{% block extra_javascript %}
|
{% block extra_javascript %}
|
||||||
{% include 'bundles/clipboard-js.html' %}
|
{% include "bundles/clipboard-js.html" %}
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
/* global ClipboardJS, moment */
|
/* global ClipboardJS */
|
||||||
const clipboard = new ClipboardJS('#clipboard-new');
|
const clipboard = new ClipboardJS('#clipboard-new');
|
||||||
|
|
||||||
{
|
{% for lnk in tl_list %}
|
||||||
%
|
const lnk{{ lnk.link_ref }} = new ClipboardJS('#clipboard-{{ lnk.link_ref }}');
|
||||||
for lnk in tl_list %
|
{% endfor %}
|
||||||
}
|
|
||||||
const lnk {
|
|
||||||
{
|
|
||||||
lnk.link_ref
|
|
||||||
}
|
|
||||||
} = new ClipboardJS('#clipboard-{{ lnk.link_ref }}'); {
|
|
||||||
% endfor %
|
|
||||||
}
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
{% include "bundles/moment-js.html" with locale=True %}
|
|
||||||
{% include "bundles/timers-js.html" %}
|
|
||||||
|
|
||||||
<script>
|
|
||||||
const locale = '{{ LANGUAGE_CODE }}';
|
|
||||||
|
|
||||||
const timers = [{
|
|
||||||
%
|
|
||||||
for lnk in tl_list %
|
|
||||||
} {
|
|
||||||
'id': "{{ lnk.link_ref }}",
|
|
||||||
'targetDate': moment("{{ lnk.expires|print_timestamp| date:"
|
|
||||||
c " }}"),
|
|
||||||
'expired': false
|
|
||||||
}, {
|
|
||||||
% endfor %
|
|
||||||
}
|
|
||||||
|
|
||||||
{
|
|
||||||
%
|
|
||||||
if tl %
|
|
||||||
} {
|
|
||||||
'id': "{{ tl.link_ref }}hot",
|
|
||||||
'targetDate': moment('{{ tl.expires|print_timestamp| date:"c" }}'),
|
|
||||||
'expired': false
|
|
||||||
}, {
|
|
||||||
% endif %
|
|
||||||
}
|
|
||||||
];
|
|
||||||
|
|
||||||
moment.locale(locale);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Update a timer
|
|
||||||
*
|
|
||||||
* @param timer
|
|
||||||
*/
|
|
||||||
const updateTimer = (timer) => {
|
|
||||||
if (timer.targetDate.isAfter(Date.now())) {
|
|
||||||
const duration = moment.duration(timer.targetDate - moment(), 'milliseconds');
|
|
||||||
|
|
||||||
document.getElementById('countdown' + timer.id).innerHTML = getDurationString(duration);
|
|
||||||
} else {
|
|
||||||
timer.expired = true;
|
|
||||||
|
|
||||||
document.getElementById('countdown' + timer.id).innerHTML = '';
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Update all timers
|
|
||||||
*/
|
|
||||||
const updateAllTimers = () => {
|
|
||||||
const l = timers.length;
|
|
||||||
|
|
||||||
for (let i = 0; i < l; ++i) {
|
|
||||||
if (timers[i].expired) {
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
|
|
||||||
updateTimer(timers[i]);
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Timed update function
|
|
||||||
*/
|
|
||||||
const timedUpdate = () => {
|
|
||||||
updateAllTimers();
|
|
||||||
};
|
|
||||||
|
|
||||||
// Set initial values
|
|
||||||
timedUpdate();
|
|
||||||
|
|
||||||
// Start timed updates
|
|
||||||
setInterval(timedUpdate, 1000);
|
|
||||||
</script>
|
|
||||||
{% endblock extra_javascript %}
|
{% endblock extra_javascript %}
|
||||||
|
@ -1,19 +1,18 @@
|
|||||||
{% extends "mumbletemps/base.html" %}
|
{% extends "services/mumble/base.html" %}
|
||||||
|
|
||||||
{% load static %}
|
{% load static %}
|
||||||
{% load i18n %}
|
{% load i18n %}
|
||||||
{% load timetags %}
|
|
||||||
|
|
||||||
{% block mumbletemps %}
|
{% block mumble %}
|
||||||
<div class="text-center">
|
<div class="text-center">
|
||||||
<p>
|
<p>
|
||||||
<img class="ra-avatar img-circle" src="{{ link.creator.portrait_url_128 }}" alt="{{ link.creator.character_name }}" />
|
<img class="ra-avatar img-circle" src="{{ link.creator.portrait_url_128 }}" alt="{{ link.creator.character_name }}" />
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
<h4>
|
<h4>
|
||||||
{% blocktranslate with character=link.creator.character_name %}
|
{% blocktranslatelate with character=link.creator.character_name %}
|
||||||
{{ character }} has invited you to join Mumble!
|
{{ character }} has invited you to join Mumble!
|
||||||
{% endblocktranslate %}
|
{% endblocktranslatelate %}
|
||||||
</h4>
|
</h4>
|
||||||
|
|
||||||
<p>
|
<p>
|
||||||
@ -25,7 +24,7 @@
|
|||||||
|
|
||||||
<p>
|
<p>
|
||||||
<a class="btn btn-primary" href="mumble://{{ connect_url }}">
|
<a class="btn btn-primary" href="mumble://{{ connect_url }}">
|
||||||
<img src="{% static 'mumbletemps/images/mumble-icon.png' %}" alt="{% translate 'Mumble' %}" height="64" width="64" style="margin: 15px" />
|
<img src="{% static 'services/mumble/images/mumble-icon.png' %}" alt="{% translate 'Mumble' %}" height="64" width="64" style="margin: 15px" />
|
||||||
|
|
||||||
<span style="margin: 15px;">
|
<span style="margin: 15px;">
|
||||||
{% translate "Click to Join Mumble as" %}: <b>{{ temp_user.name }}</b>
|
{% translate "Click to Join Mumble as" %}: <b>{{ temp_user.name }}</b>
|
||||||
@ -67,7 +66,7 @@
|
|||||||
const locale = '{{ LANGUAGE_CODE }}';
|
const locale = '{{ LANGUAGE_CODE }}';
|
||||||
const timers = [{
|
const timers = [{
|
||||||
'id': '{{ link.link_ref }}',
|
'id': '{{ link.link_ref }}',
|
||||||
'targetDate': moment('{{ link.expires|print_timestamp| date:"c" }}'),
|
'targetDate': moment('{{ link.expires| date:"c" }}'),
|
||||||
'expired': false
|
'expired': false
|
||||||
}];
|
}];
|
||||||
|
|
||||||
@ -118,4 +117,4 @@
|
|||||||
// Start timed updates
|
// Start timed updates
|
||||||
setInterval(timedUpdate, 1000);
|
setInterval(timedUpdate, 1000);
|
||||||
</script>
|
</script>
|
||||||
{% endblock mumbletemps %}
|
{% endblock mumble %}
|
||||||
|
@ -1,20 +1,19 @@
|
|||||||
{% extends "mumbletemps/base.html" %}
|
{% extends "services/mumble/base.html" %}
|
||||||
|
|
||||||
{% load static %}
|
{% load static %}
|
||||||
{% load i18n %}
|
{% load i18n %}
|
||||||
{% load timetags %}
|
|
||||||
|
|
||||||
{% block mumbletemps %}
|
{% block mumble %}
|
||||||
<div class="col-md-12 text-center">
|
<div class="col-md-12 text-center">
|
||||||
<div class="mumbletemps-sso-login mb-3">
|
<div class="mumble-sso-login mb-3">
|
||||||
<p>
|
<p>
|
||||||
<img class="ra-avatar img-circle" src="{{ link.creator.portrait_url_128 }}" alt="{{ link.creator.character_name }}" />
|
<img class="ra-avatar img-circle" src="{{ link.creator.portrait_url_128 }}" alt="{{ link.creator.character_name }}" />
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
<h4>
|
<h4>
|
||||||
{% blocktranslate with character=link.creator.character_name %}
|
{% blocktranslatelate with character=link.creator.character_name %}
|
||||||
{{ character }} has invited you to join Mumble!
|
{{ character }} has invited you to join Mumble!
|
||||||
{% endblocktranslate %}
|
{% endblocktranslatelate %}
|
||||||
</h4>
|
</h4>
|
||||||
|
|
||||||
<p>
|
<p>
|
||||||
@ -24,7 +23,7 @@
|
|||||||
<span class="label label-info">{% translate "Link Ref" %}: {{ link.link_ref }}</span>
|
<span class="label label-info">{% translate "Link Ref" %}: {{ link.link_ref }}</span>
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
<form action="{% url 'mumbletemps:join' link.link_ref %}" method="post">
|
<form action="{% url 'mumble:join' link.link_ref %}" method="post">
|
||||||
{% csrf_token %}
|
{% csrf_token %}
|
||||||
|
|
||||||
<input type="hidden" name="sso" value="True" />
|
<input type="hidden" name="sso" value="True" />
|
||||||
@ -37,7 +36,7 @@
|
|||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="mumbletemps-non-sso-login">
|
<div class="mumble-non-sso-login">
|
||||||
<div class="row justify-content-center">
|
<div class="row justify-content-center">
|
||||||
<div class="col-md-10 col-lg-8">
|
<div class="col-md-10 col-lg-8">
|
||||||
<div class="card">
|
<div class="card">
|
||||||
@ -47,7 +46,7 @@
|
|||||||
|
|
||||||
<div class="card-body text-start">
|
<div class="card-body text-start">
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<form action="{% url 'mumbletemps:join' link.link_ref %}" method="post">
|
<form action="{% url 'mumble:join' link.link_ref %}" method="post">
|
||||||
{% csrf_token %}
|
{% csrf_token %}
|
||||||
|
|
||||||
<input type="hidden" name="sso" value="False" />
|
<input type="hidden" name="sso" value="False" />
|
||||||
@ -86,7 +85,7 @@
|
|||||||
const locale = '{{ LANGUAGE_CODE }}';
|
const locale = '{{ LANGUAGE_CODE }}';
|
||||||
const timers = [{
|
const timers = [{
|
||||||
'id': '{{ link.link_ref }}',
|
'id': '{{ link.link_ref }}',
|
||||||
'targetDate': moment('{{ link.expires|print_timestamp| date:"c" }}'),
|
'targetDate': moment('{{ link.expires| date:"c" }}'),
|
||||||
'expired': false
|
'expired': false
|
||||||
}];
|
}];
|
||||||
|
|
||||||
@ -137,4 +136,4 @@
|
|||||||
// Start timed updates
|
// Start timed updates
|
||||||
setInterval(timedUpdate, 1000);
|
setInterval(timedUpdate, 1000);
|
||||||
</script>
|
</script>
|
||||||
{% endblock mumbletemps %}
|
{% endblock mumble %}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user