Browse Source

add "register" button next to "login" if django-registration available

Natenom/support-murmur-13-1446181288462
Michael Ziegler 14 years ago
parent
commit
1a4e2ea101
  1. 2
      pyweb/mumble/templates/mumble/list.html
  2. 11
      pyweb/mumble/templates/mumble/mumble.html
  3. 2
      pyweb/processors.py
  4. 2
      pyweb/templates/index.html

2
pyweb/mumble/templates/mumble/list.html

@ -21,7 +21,7 @@
layout: "border",
title: gettext("Mumble Servers"),
buttons: [
{% if user.is_staff and ROSETTA_INSTALLED %}
{% if user.is_staff and "rosetta" in INSTALLED_APPS %}
{
xtype: 'buttonIframeWindow',
text: gettext('Edit Translation'),

11
pyweb/mumble/templates/mumble/mumble.html

@ -35,14 +35,14 @@
height: 600,
layout: "border",
tbar: [ {
text: gettext("back"),
text: gettext("Back to the server list"),
xtype: "button",
handler: function(){
location.href = "{% url mumble.views.mumbles %}";
}
} ],
buttons: [
{% if user.is_staff and ROSETTA_INSTALLED %}
{% if user.is_staff and "rosetta" in INSTALLED_APPS %}
{
xtype: 'buttonIframeWindow',
text: gettext('Edit Translation'),
@ -59,6 +59,13 @@
{% if user.is_authenticated %}
new Ext.ux.ButtonLogout()
{% else %}
{% if 'registration' in INSTALLED_APPS %}
{
xtype: 'buttonIframeWindow',
text: gettext('Register'),
url: '{% url registration.views.register %}',
},
{% endif %}
new Ext.ux.ButtonLogin()
{% endif %}
],

2
pyweb/processors.py

@ -17,7 +17,7 @@
def installed_apps(request):
from django.conf import settings
return { 'ROSETTA_INSTALLED': "rosetta" in settings.INSTALLED_APPS }
return { 'INSTALLED_APPS': settings.INSTALLED_APPS }
def mumble_version(request):
from mumble import version_str

2
pyweb/templates/index.html

@ -31,7 +31,7 @@
{% endif %}
{% if user.is_staff %}
<a href="{% url admin:index %}" target="_blank">{% trans "Administration" %}</a> |
{% if ROSETTA_INSTALLED %}
{% if "rosetta" in INSTALLED_APPS %}
<a href="{% url rosetta.views.home %}" target="_blank">{% trans "Edit translations" %}</a> |
{% endif %}
{% endif %}

Loading…
Cancel
Save