Added code to show a call-in button on the agenda page if the session agenda-note contains and IETF webex URL.
- Legacy-Id: 17427
This commit is contained in:
parent
c6b2e8e479
commit
5211480895
|
@ -320,7 +320,9 @@
|
|||
<span class="label label-danger pull-right">CANCELLED</span>
|
||||
{% endif %}
|
||||
|
||||
{% if item.session.agenda_note %}
|
||||
{% if item.session.agenda_note|first_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>
|
||||
{% endif %}
|
||||
|
||||
|
|
|
@ -24,7 +24,12 @@
|
|||
href="xmpp:{{item.session.jabber_room_name}}@jabber.ietf.org?join"
|
||||
title="Jabber room for {{item.session.jabber_room_name}}"><span class="fa fa-lightbulb-o"></span>
|
||||
</a>
|
||||
|
||||
{% if "https://ietf.webex.com" in item.session.agenda_note|first_url %}
|
||||
<a class="btn btn-default btn-xs"
|
||||
href="{{ item.session.agenda_note|first_url }}"
|
||||
title="Webex session"><span class="fa fa-phone"></span>
|
||||
</a>
|
||||
{% else %}
|
||||
<!-- Video stream (meetecho) -->
|
||||
{% if item.timeslot.location.video_stream_url %}
|
||||
<a class="btn btn-default btn-xs"
|
||||
|
@ -39,7 +44,7 @@
|
|||
title="Audio stream"><span class="glyphicon glyphicon-headphones"></span>
|
||||
</a>
|
||||
{% endif %}
|
||||
|
||||
{% endif %}
|
||||
{% else %}
|
||||
|
||||
<!-- Jabber logs -->
|
||||
|
|
|
@ -1,9 +1,10 @@
|
|||
# Copyright The IETF Trust 2016-2019, All Rights Reserved
|
||||
# Copyright The IETF Trust 2016-2020, All Rights Reserved
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
|
||||
from __future__ import absolute_import, print_function, unicode_literals
|
||||
|
||||
import re
|
||||
import bleach
|
||||
|
||||
from django import template
|
||||
|
@ -78,3 +79,10 @@ def texescape_filter(value):
|
|||
def linkify(value):
|
||||
text = mark_safe(bleach.linkify(escape(value)))
|
||||
return text
|
||||
|
||||
@register.filter
|
||||
@stringfilter
|
||||
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
|
||||
|
|
Loading…
Reference in a new issue