Reworked the support for remote access urls in the agenda_note and remote_instructions fields of Session objects so as to accept any of a list of conference service domains as remote call-in URLs -- not only webex.
- Legacy-Id: 18119
This commit is contained in:
parent
129d62e666
commit
1654f9319e
|
@ -1122,6 +1122,7 @@ if DEBUG:
|
|||
|
||||
STATS_NAMES_LIMIT = 25
|
||||
|
||||
UTILS_MEETING_CONFERENCE_DOMAINS = ['webex.com', 'zoom.us', 'jitsi.org', 'meetecho.com', ]
|
||||
UTILS_TEST_RANDOM_STATE_FILE = '.factoryboy_random_state'
|
||||
UTILS_APIKEY_GUI_LOGIN_LIMIT_DAYS = 30
|
||||
|
||||
|
|
|
@ -324,7 +324,7 @@
|
|||
<span class="label label-danger pull-right">CANCELLED</span>
|
||||
{% endif %}
|
||||
|
||||
{% if item.session.agenda_note|first_url %}
|
||||
{% if item.session.agenda_note|first_url|conference_url %}
|
||||
<br><a href={{item.session.agenda_note|first_url}}>{{item.session.agenda_note|slice:":23"}}</a>
|
||||
{% elif item.session.agenda_note %}
|
||||
<br><span class="text-danger">{{item.session.agenda_note}}</span>
|
||||
|
|
|
@ -32,13 +32,13 @@
|
|||
{% if now < item.timeslot.end_time %}
|
||||
<!-- Jabber -->
|
||||
<a class="" href="xmpp:{{session.jabber_room_name}}@jabber.ietf.org?join" title="Jabber room for {{session.jabber_room_name}}"><span class="fa fa-fw fa-lightbulb-o"></span></a>
|
||||
<!-- webex -->
|
||||
{% if "webex.com/" in session.agenda_note|first_url %}
|
||||
<!-- Remote call-in -->
|
||||
{% if session.agenda_note|first_url|conference_url %}
|
||||
<a class=""
|
||||
href="{{ session.agenda_note|first_url }}"
|
||||
title="Webex session"><span class="fa fa-fw fa-phone"></span>
|
||||
title="Session call-in"><span class="fa fa-fw fa-phone"></span>
|
||||
</a>
|
||||
{% elif session.remote_instructions|first_url %}
|
||||
{% elif session.remote_instructions|first_url|conference_url %}
|
||||
<a class=""
|
||||
href="{{ session.remote_instructions|first_url }}"
|
||||
title="Session call-in"><span class="fa fa-fw fa-phone"></span>
|
||||
|
@ -57,7 +57,7 @@
|
|||
{% else %}
|
||||
<span class="">
|
||||
<span class="fa fa-fw fa-phone" style="color: #ddd;"
|
||||
title="No webex or meetecho info found in remote instructions or agenda note"></span>
|
||||
title="No remote call-in info found in remote instructions or agenda note"></span>
|
||||
</span>
|
||||
{% endif %}
|
||||
{% else %}
|
||||
|
|
|
@ -50,11 +50,16 @@
|
|||
title="Audio stream"><span class="glyphicon glyphicon-headphones"></span>
|
||||
</a>
|
||||
{% endif %}
|
||||
<!-- WebEx -->
|
||||
{% if "webex.com/" in session.agenda_note|first_url %}
|
||||
<!-- Remote call-in -->
|
||||
{% if session.agenda_note|first_url|conference_url %}
|
||||
<a class=""
|
||||
href="{{ session.agenda_note|first_url }}"
|
||||
title="Webex session"><span class="fa fa-fw fa-phone"></span>
|
||||
title="Session call-in"><span class="fa fa-fw fa-phone"></span>
|
||||
</a>
|
||||
{% elif session.remote_instructions|first_url|conference_url %}
|
||||
<a class=""
|
||||
href="{{ session.remote_instructions|first_url }}"
|
||||
title="Session call-in"><span class="fa fa-fw fa-phone"></span>
|
||||
</a>
|
||||
{% elif item.timeslot.location.webex_url %}
|
||||
<a class=""
|
||||
|
|
|
@ -40,15 +40,15 @@
|
|||
{% if meeting.type.slug == 'interim' and session.remote_instructions %}
|
||||
<div>
|
||||
<b>Remote instructions:</b>
|
||||
{% if "https://ietf.webex.com" in session.agenda_note|first_url %}
|
||||
{% if session.agenda_note|first_url|conference_url %}
|
||||
<a class=""
|
||||
href="{{ session.agenda_note|first_url }}"
|
||||
title="Webex session"><span class="fa fa-fw fa-phone"></span>
|
||||
title="Session call-in"><span class="fa fa-fw fa-phone"></span>
|
||||
</a>
|
||||
{% elif "https://ietf.webex.com" in session.remote_instructions|first_url %}
|
||||
{% elif session.remote_instructions|first_url|conference_url %}
|
||||
<a class=""
|
||||
href="{{ session.remote_instructions|first_url }}"
|
||||
title="Webex session"><span class="fa fa-fw fa-phone"></span>
|
||||
title="Session call-in"><span class="fa fa-fw fa-phone"></span>
|
||||
</a>
|
||||
{% endif %}
|
||||
{{ session.remote_instructions }}
|
||||
|
|
|
@ -6,6 +6,7 @@ import re
|
|||
import bleach
|
||||
|
||||
from django import template
|
||||
from django.conf import settings
|
||||
from django.template.defaultfilters import stringfilter
|
||||
from django.utils.html import escape
|
||||
from django.utils.safestring import mark_safe
|
||||
|
@ -84,3 +85,12 @@ def first_url(value):
|
|||
urls = re.findall(r"http[s]?://(?:[a-zA-Z]|[0-9]|[$-_@.&+]|[!*\(\),]|(?:%[0-9a-fA-F][0-9a-fA-F]))+", value)
|
||||
url = urls[0] if urls else None
|
||||
return url
|
||||
|
||||
@register.filter
|
||||
@stringfilter
|
||||
def conference_url(value):
|
||||
conf_re = r"http[s]?://\S*(%s)/" % ('|'.join(settings.UTILS_MEETING_CONFERENCE_DOMAINS), )
|
||||
return value if re.match(conf_re, value) else None
|
||||
|
||||
|
||||
|
Loading…
Reference in a new issue