diff --git a/pyweb/mumble/models.py b/pyweb/mumble/models.py index 61db840..c8a94f8 100644 --- a/pyweb/mumble/models.py +++ b/pyweb/mumble/models.py @@ -414,6 +414,8 @@ class Mumble( models.Model ): def getURL( self, forUser = None ): """ Create an URL of the form mumble://username@host:port/ for this server. """ + if not self.netloc: + return None from urlparse import urlunsplit versionstr = "version=%d.%d.%d" % tuple(self.version[:3]); if forUser is not None: diff --git a/pyweb/mumble/templates/mumble/channel.html b/pyweb/mumble/templates/mumble/channel.html index 5c58c71..fbb89b9 100644 --- a/pyweb/mumble/templates/mumble/channel.html +++ b/pyweb/mumble/templates/mumble/channel.html @@ -6,9 +6,15 @@ {% else %} {% endif %} - - {{ Channel.name|trunc:30 }} - + {% if Channel.server.netloc %} + + {{ Channel.name|trunc:30 }} + + {% else %} + + {{ Channel.name|trunc:30 }} + + {% endif %} {% for sub in Channel.subchans %} {% if sub.show %} {{ sub|chanview:MumbleAccount }} diff --git a/pyweb/mumble/templates/mumble/mumble.html b/pyweb/mumble/templates/mumble/mumble.html index 504ebe0..20ee5ad 100644 --- a/pyweb/mumble/templates/mumble/mumble.html +++ b/pyweb/mumble/templates/mumble/mumble.html @@ -21,7 +21,9 @@