Browse Source

player profiles

Natenom/support-murmur-13-1446181288462
Michael Ziegler 16 years ago
parent
commit
366722f3e1
  1. 5
      pyweb/mumble/mmobjects.py
  2. 4
      template/mumble/list.htm
  3. 25
      template/mumble/mumble.htm

5
pyweb/mumble/mmobjects.py

@ -204,6 +204,11 @@ class mmPlayer( object ):
def isAuthed( self ):
return self.dbaseid != -1;
isAdmin = property(
lambda self: self.mumbleuser and self.mumbleuser.getAdmin(),
None
);
def is_server( self ):
return False;
def is_channel( self ):

4
template/mumble/list.htm

@ -1,8 +1,10 @@
{% extends "index.htm" %}
{% load mumble_extras %}
{% block Headline %}
Configured Mumble Servers
{% endblock %}
{% block Content %}
<div class="rahmen">
<h1>Configured Mumble Servers</h1>
<ul>
{% for mumble in MumbleObjects %}
<li><a href="/mumble/{{mumble.id}}/">{{mumble.name}}</a></li>

25
template/mumble/mumble.htm

@ -56,13 +56,30 @@
{% for item in ChannelTable %}
{% if item.1.is_player %}
<div id="mumble_{{ item.1.id }}" class="x-hide-display">
Player {{ item.1.name }}
Online since {{item.1.onlinesince|time:"H:i"}}<br />
<a href="/accounts/profiles/{{item.1.mumbleuser.owner.id}}">{{item.1.mumbleuser.owner}}</a>
<h2>Player {{ item.1.name }}</h2>
<ul>
<li>Online since {{item.1.onlinesince|time:"H:i"}}</li>
<li>Authenticated: {% if item.1.isAuthed %}Yes{% else %}No{% endif %}</li>
<li>Admin: {% if item.1.isAdmin %}Yes{% else %}No{% endif %}</li>
<li>Muted: {% if item.1.muted %}Yes{% else %}No{% endif %}</li>
<li>Deafened: {% if item.1.deafened %}Yes{% else %}No{% endif %}</li>
<li>Self-Muted: {% if item.1.selfmuted %}Yes{% else %}No{% endif %}</li>
<li>Self-Deafened: {% if item.1.selfdeafened %}Yes{% else %}No{% endif %}</li>
</ul>
{% if item.1.mumbleuser and item.1.mumbleuser.owner %}
<h2>User {{ item.1.mumbleuser.owner.username|capfirst }}</h2>
<ul>
{% if item.1.mumbleuser.owner.first_name and item.1.mumbleuser.owner.last_name %}
<li>Full Name: {{ item.1.mumbleuser.owner.first_name }} {{ item.1.mumbleuser.owner.last_name }}</li>
{% endif %}
<li>Admin: {% if item.1.mumbleuser.owner.is_staff %}Yes{% else %}No{% endif %}</li>
<li>Sign-up date: {{ item.1.mumbleuser.owner.date_joined }}</li>
</ul>
{% endif %}
</div>
{% else %}
<div id="mumble_{{ item.1.id }}" class="x-hide-display">
Channel {{ item.1.name }}<br />
<h2>Channel {{ item.1.name }}</h2>
<a href="mumble://{% if mumbleAccount %}{{ mumbleAccount.name }}@{% endif %}{{ DBaseObject.addr }}/{% for chan in item.2 %}{{ chan|urlencode }}/{% endfor %}{{ item.1.name|urlencode }}" class="dingen">Connect</a>
</div>
{% endif %}

Loading…
Cancel
Save