|
|
{% extends "index.htm" %} {% block headtags %} <meta http-equiv="refresh" content="30" /> {% endblock %} {% block Headline %} {{ ServerObject.rootName }} {% endblock %} {% block LeftColumn %} {% include "mumble/content.htm" %} {% endblock %} {% block Content %} <noscript> <p> <b>Hint:</b><br /> This area is used to display additional information for each channel and player, but requires JavaScript to be enabled in order to be displayed correctly. You will not see the detail pages, but you can use all links and forms that are displayed. </p> </noscript> <div id="mumble_registration"> {% if user.is_authenticated %} <h2>Server registration</h2> <form action="" method="post"> {% if Registered %} You are registered on this server.<br /> {% else %} You do not have an account on this server.<br /> {% endif %} <table> {{ RegForm }} </table> <input type="hidden" name="mode" value="reg" /> <input type="submit" /> </form> {% else %} <p>You need to be <a href="/accounts/login">logged in</a> to be able to register an account.</p> {% endif %} </div> {% if CurrentUserIsAdmin %} <div id="mumble_admin"> <h2>Server administration</h2> <form action="" method="post"> <table> {{ AdminForm }} </table> <input type="hidden" name="mode" value="admin" /> <input type="submit" /> </form> </div> <noscript> By the way, if you had enabled JavaScript, you could see a nifty Tab bar here :) </noscript> {% endif %} {% for item in ChannelTable %} {% if item.1.is_player %} <div id="mumble_{{ item.1.id }}" class="x-hide-display"> <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"> <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 %} {% endfor %} {% endblock %}
{% block HeadTag %} <script type="text/javascript"> Ext.onReady( function(){ Ext.get( 'mumble_registration' ).addClass( 'x-hide-display' ); {% if CurrentUserIsAdmin %} Ext.get( 'mumble_admin' ).addClass( 'x-hide-display' ); {% endif %} var cardpanel = new Ext.Panel({ renderTo: 'col3_content', layout: 'card', id: 'mumble_container', height: 400, activeItem: 0, border: false, items: [ { id: 'mumble_tabpanel', xtype: 'tabpanel', defaults: { autoheight: true }, activeTab: {{ DisplayTab }}, items: [ { contentEl: 'mumble_registration', title: 'Registration' }, {% if CurrentUserIsAdmin %} { contentEl: 'mumble_admin', title: 'Administration' }, {% endif %} ] }, {% for item in ChannelTable %} { contentEl: 'mumble_{{ item.1.id }}', id: 'carditem_{{ item.1.id }}' }, {% endfor %} ], }); Ext.get( 'link_server' ).on( 'click', function( event, target ){ cardpanel.layout.setActiveItem( 'mumble_tabpanel' ); event.preventDefault(); }); {% for item in ChannelTable %} Ext.get( 'link_{{ item.1.id }}' ).on( 'click', function( event, target ){ cardpanel.layout.setActiveItem( 'carditem_{{ item.1.id }}' ); event.preventDefault(); }); {% endfor %} } ); </script> {% endblock %}
|