Forked mumble-django project from https://bitbucket.org/Svedrin/mumble-django
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
105 lines
4.4 KiB
105 lines
4.4 KiB
{% extends "index.html" %}
|
|
{% comment %}
|
|
<!-- kate: space-indent on; indent-width 4; replace-tabs on; -->
|
|
{% endcomment %}
|
|
{% load mumble_extras %}
|
|
{% load i18n %}
|
|
{% block body %}
|
|
{% endblock %}
|
|
{% block HeadTag %}
|
|
<script type="text/javascript" src="/jsi18n/"></script>
|
|
<script type="text/javascript" src="/mumble/api/api.js"></script>
|
|
<script type="text/javascript" src="{{ MEDIA_URL }}/js/buttoniframewindow.js"></script>
|
|
<script type="text/javascript" src="{{ MEDIA_URL }}/js/loginout_buttons.js"></script>
|
|
<script type="text/javascript">
|
|
Ext.onReady( function(){
|
|
Ext.QuickTips.init();
|
|
mainpanel = new Ext.Panel({
|
|
renderTo: document.body,
|
|
height: 600,
|
|
layout: "border",
|
|
title: gettext("Mumble Servers"),
|
|
buttons: [
|
|
{% if user.is_staff and ROSETTA_INSTALLED %}
|
|
{
|
|
xtype: 'buttonIframeWindow',
|
|
text: gettext('Edit Translation'),
|
|
url: '{% url rosetta-home %}',
|
|
},
|
|
{% endif %}
|
|
{% if user.is_staff %}
|
|
{
|
|
xtype: 'buttonIframeWindow',
|
|
text: gettext('Administration'),
|
|
url: '{% url admin:app_list "mumble" %}',
|
|
},
|
|
{% endif %}
|
|
{% if user.is_authenticated %}
|
|
new Ext.ux.ButtonLogout()
|
|
{% else %}
|
|
new Ext.ux.ButtonLogin()
|
|
{% endif %}
|
|
],
|
|
items: [{
|
|
xtype: "listview",
|
|
title: gettext("Available servers"),
|
|
region: "west",
|
|
width: 350,
|
|
split: true,
|
|
singleSelect: true,
|
|
store: new Ext.data.DirectStore({
|
|
directFn: MumbleList.servers,
|
|
fields: [ 'id', 'name' ],
|
|
autoLoad: true
|
|
}),
|
|
columns: [{
|
|
header: gettext("Name"),
|
|
dataIndex: "name",
|
|
width: 1.
|
|
}],
|
|
listeners: {
|
|
dblclick: function(listview){
|
|
selectedstuff = listview.getSelectedRecords();
|
|
MumbleList.serverurl( selectedstuff[0].data.id, function(provider, response){
|
|
window.location.href = response.result;
|
|
});
|
|
},
|
|
selectionchange: function(listview, nodes){
|
|
selectedstuff = listview.getSelectedRecords();
|
|
MumbleList.serverinfo( selectedstuff[0].data.id, function(provider, response){
|
|
mainpanel.descrippanel.el.dom.innerHTML = String.format(
|
|
"<ul><li>Serveradresse: {0}</li><li>Version: {1}</li></ul>"+
|
|
"<br /><fieldset><legend>Willkommensnachricht</legend>{2}</fieldset>",
|
|
response.result.connurl,
|
|
response.result.version,
|
|
response.result.motd
|
|
);
|
|
});
|
|
}
|
|
},
|
|
}, {
|
|
xtype: "panel",
|
|
region: "center",
|
|
title: gettext("Server overview"),
|
|
ref: 'descrippanel',
|
|
html: "here goez teh servur descripshun",
|
|
}],
|
|
});
|
|
function updateLayout(){
|
|
viewsize = {
|
|
width: Ext.lib.Dom.getViewWidth(),
|
|
height: Ext.lib.Dom.getViewHeight()
|
|
};
|
|
mainpanel.setHeight( viewsize.height - 20 );
|
|
mainpanel.setWidth( viewsize.width - 40 );
|
|
}
|
|
updateLayout();
|
|
Ext.EventManager.onWindowResize(updateLayout);
|
|
} );
|
|
</script>
|
|
<style type="text/css">
|
|
body {
|
|
padding: 20px 20px 0 20px;
|
|
}
|
|
</style>
|
|
{% endblock %}
|