From: Michael Tremer Date: Wed, 10 Oct 2018 13:53:57 +0000 (+0100) Subject: talk: Show online status in sidebar X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=a11e626d1168e35126c5ebabc1a7f4638247bf2c;p=ipfire.org.git talk: Show online status in sidebar Signed-off-by: Michael Tremer --- diff --git a/src/templates/talk/base.html b/src/templates/talk/base.html index b1993643..cc1c44b5 100644 --- a/src/templates/talk/base.html +++ b/src/templates/talk/base.html @@ -25,8 +25,16 @@ {{ current_user }}

{{ current_user.name }}

- - Email + +

+ {% if current_user.sip_registrations %} + + {{ _("Online") }} ({{ len(current_user.sip_registrations) }}) + + {% else %} + {{ _("Offline") }} + {% end %} +

{% end block %} diff --git a/src/web/__init__.py b/src/web/__init__.py index 3bf077be..78651713 100644 --- a/src/web/__init__.py +++ b/src/web/__init__.py @@ -239,7 +239,7 @@ class Application(tornado.web.Application): # talk.ipfire.org self.add_handlers(r"talk(\.dev)?\.ipfire\.org", [ (r"/", talk.IndexHandler), - (r"/user/(\w+)/registrations", talk.RegistrationsHandler), + (r"/users/(\w+)/registrations", talk.RegistrationsHandler), (r"/conferences", TalkConferencesHandler), (r"/diagnosis", TalkDiagnosisHandler), (r"/hangup/(.*)", TalkHangupChannelHandler),