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.
130 lines
5.9 KiB
130 lines
5.9 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="/mumble/forms/api.js"></script>
|
|
<script type="text/javascript" src="/mumble/forms/{{ RegForm|lower }}.js"></script>
|
|
<script type="text/javascript" src="/mumble/forms/mumbleform.js"></script>
|
|
<script type="text/javascript" src="{{ MEDIA_URL }}/js/channelviewer.js"></script>
|
|
<script type="text/javascript" src="{{ MEDIA_URL }}/js/usereditor.js"></script>
|
|
<script type="text/javascript" src="{{ MEDIA_URL }}/js/logviewer.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">
|
|
viewsize = {
|
|
width: Ext.lib.Dom.getViewWidth(),
|
|
height: Ext.lib.Dom.getViewHeight()
|
|
};
|
|
|
|
Ext.onReady( function(){
|
|
Ext.QuickTips.init();
|
|
mainpanel = new Ext.Panel({
|
|
renderTo: document.body,
|
|
height: viewsize.height,
|
|
layout: "border",
|
|
title: "{{ MumbleServer.name }}",
|
|
buttons: [
|
|
{% if user.is_staff %}
|
|
{
|
|
xtype: 'buttonIframeWindow',
|
|
text: gettext('Administration'),
|
|
url: '/admin',
|
|
},
|
|
{% endif %}
|
|
{% if user.is_authenticated %}
|
|
new Ext.ux.ButtonLogout()
|
|
{% else %}
|
|
new Ext.ux.ButtonLogin()
|
|
{% endif %}
|
|
],
|
|
items: [{
|
|
xtype: "mumblechannelviewer",
|
|
region: "west",
|
|
width: 350,
|
|
split: true,
|
|
source_url: "{% url mumble.views.cvp_json MumbleServer.id %}",
|
|
}, {
|
|
xtype: "tabpanel",
|
|
region: "center",
|
|
activeTab: 0,
|
|
items: [{
|
|
title: gettext("Registration"),
|
|
xtype: "{{ RegForm|lower }}",
|
|
pk: {% if MumbleAccount %}{{ MumbleAccount.id }}{% else %}-1{% endif %},
|
|
labelWidth: 150,
|
|
submit: function(){
|
|
this.getForm().submit({ params: {serverid: {{MumbleServer.id}}, pk: this.pk } });
|
|
},
|
|
},
|
|
{% if MumbleAccount %}
|
|
{% if IsAdmin %}
|
|
{
|
|
title: gettext("Administration"),
|
|
pk: {{ MumbleServer.id }},
|
|
labelWidth: 150,
|
|
xtype: 'mumbleform',
|
|
},
|
|
{% endif %}
|
|
{
|
|
title: gettext("User texture"),
|
|
layout: "border",
|
|
items: [{
|
|
region: "north",
|
|
layout: "hbox",
|
|
height: 200,
|
|
items: [{
|
|
flex: 1,
|
|
height: 200,
|
|
title: gettext("Texture"),
|
|
html: String.format('<img src="{0}" alt="Avatar" />',
|
|
"{% url mumble.views.showTexture MumbleServer.id MumbleAccount.id %}"),
|
|
}, {
|
|
flex: 1,
|
|
height: 200,
|
|
title: gettext("Gravatar"),
|
|
html: String.format('<img src="{0}" alt="grAvatar" />', "{{ MumbleAccount.gravatar }}"),
|
|
}],
|
|
}, {
|
|
region: "center",
|
|
xtype: "form",
|
|
labelWidth: 150,
|
|
fileUpload: true,
|
|
url: "{% url mumble.views.update_avatar MumbleAccount.id %}",
|
|
items: [{
|
|
name: "usegravatar",
|
|
fieldLabel: gettext("Use Gravatar"),
|
|
xtype: "checkbox",
|
|
}, {
|
|
name: "texturefile",
|
|
fieldLabel: gettext("Upload Avatar"),
|
|
xtype: "textfield",
|
|
inputType: "file",
|
|
}],
|
|
buttons: [{
|
|
text: gettext('Submit'),
|
|
handler: function(){ this.ownerCt.ownerCt.getForm().submit(); },
|
|
}],
|
|
}],
|
|
},
|
|
{% if IsAdmin %}
|
|
{
|
|
xtype: "userEditorPanel",
|
|
server: {{ MumbleServer.id }}
|
|
}, {
|
|
xtype: 'logViewerPanel',
|
|
server: {{ MumbleServer.id }}
|
|
}
|
|
{% endif %}
|
|
{% endif %}
|
|
],
|
|
}],
|
|
});
|
|
} );
|
|
</script>
|
|
{% endblock %}
|