Browse Source

fix the mobile views to use the new media paths

Natenom/support-murmur-13-1446181288462
Michael Ziegler 14 years ago
parent
commit
3ae5db12df
  1. 8
      pyweb/mumble/templates/mumble/channel.html
  2. 22
      pyweb/mumble/templates/mumble/player.html
  3. 2
      pyweb/mumble/templates/mumble/server.html
  4. 21
      pyweb/mumble/templatetags/mumble_extras.py
  5. 6
      pyweb/templates/mobile_index.html

8
pyweb/mumble/templates/mumble/channel.html

@ -2,12 +2,12 @@
<!-- kate: space-indent on; indent-width 2; replace-tabs on; -->
{% endcomment %}
{% load mumble_extras %}
<div class="mumble" style="background-image: url( {{ MEDIA_URL }}/mumble/linie_v.png )">
<img src="{{ MEDIA_URL }}/mumble/knoten_v.png" alt="" />
<div class="mumble" style="background-image: url( {{MUMBLE_MEDIA_PREFIX}}/img/linie_v.png )">
<img src="{{MUMBLE_MEDIA_PREFIX}}/img/knoten_v.png" alt="" />
{% if Channel.linked %}
<img src="{{ MEDIA_URL }}/mumble/channel_linked.png" alt="linked channel" />
<img src="{{MUMBLE_MEDIA_PREFIX}}/img/channel_linked.png" alt="linked channel" />
{% else %}
<img src="{{ MEDIA_URL }}/mumble/channel.png" alt="channel" />
<img src="{{MUMBLE_MEDIA_PREFIX}}/img/channel.png" alt="channel" />
{% endif %}
{% if Channel.server.netloc %}
<a href="{{ Channel|chanurl:MumbleAccount }}" class="mumble" id="link_{{ Channel.id }}" title="{{ Channel.name }}">

22
pyweb/mumble/templates/mumble/player.html

@ -3,36 +3,36 @@
{% endcomment %}
{% load mumble_extras %}
{% load i18n %}
<div class="mumble" style="background-image: url( {{ MEDIA_URL }}/mumble/linie_v.png )">
<div class="mumble" style="background-image: url( {{MUMBLE_MEDIA_PREFIX}}/img/linie_v.png )">
<span class="mumble">
{% if Player.isAuthed %}
<img src="{{ MEDIA_URL }}/mumble/authenticated.png" alt="authed" title="{% trans "Authenticated" %}" />
<img src="{{MUMBLE_MEDIA_PREFIX}}/img/authenticated.png" alt="authed" title="{% trans "Authenticated" %}" />
{% endif %}
{% if Player.mute %}
<img src="{{ MEDIA_URL }}/mumble/muted_server.png" alt="muted" title="{% trans "Muted" %}" />
<img src="{{MUMBLE_MEDIA_PREFIX}}/img/muted_server.png" alt="muted" title="{% trans "Muted" %}" />
{% endif %}
{% if Player.suppress %}
<img src="{{ MEDIA_URL }}/mumble/muted_suppressed.png" alt="muted" title="{% trans "Suppressed" %}" />
<img src="{{MUMBLE_MEDIA_PREFIX}}/img/muted_suppressed.png" alt="muted" title="{% trans "Suppressed" %}" />
{% endif %}
{% if Player.deaf %}
<img src="{{ MEDIA_URL }}/mumble/deafened_server.png" alt="deafened" title="{% trans "Deafened" %}" />
<img src="{{MUMBLE_MEDIA_PREFIX}}/img/deafened_server.png" alt="deafened" title="{% trans "Deafened" %}" />
{% endif %}
{% if Player.selfMute %}
<img src="{{ MEDIA_URL }}/mumble/muted_self.png" alt="self-muted" title="{% trans "Muted by self" %}" />
<img src="{{MUMBLE_MEDIA_PREFIX}}/img/muted_self.png" alt="self-muted" title="{% trans "Muted by self" %}" />
{% endif %}
{% if Player.selfDeaf %}
<img src="{{ MEDIA_URL }}/mumble/deafened_self.png" alt="self-deafened" title="{% trans "Deafened by self" %}" />
<img src="{{MUMBLE_MEDIA_PREFIX}}/img/deafened_self.png" alt="self-deafened" title="{% trans "Deafened by self" %}" />
{% endif %}
{% if Player.hasComment %}
<img src="{{ MEDIA_URL }}/mumble/comment.png" alt="has comment" title="{% trans "has a User Comment set" %}" />
<img src="{{MUMBLE_MEDIA_PREFIX}}/img/comment.png" alt="has comment" title="{% trans "has a User Comment set" %}" />
{% endif %}
</span>
<span>
<img src="{{ MEDIA_URL }}/mumble/knoten_v.png" alt="" />
<img src="{{MUMBLE_MEDIA_PREFIX}}/img/knoten_v.png" alt="" />
{% if Player.isTalking %}
<img src="{{ MEDIA_URL }}/mumble/talking_on.png" alt="Player" />
<img src="{{MUMBLE_MEDIA_PREFIX}}/img/talking_on.png" alt="Player" />
{% else %}
<img src="{{ MEDIA_URL }}/mumble/talking_off.png" alt="Player" />
<img src="{{MUMBLE_MEDIA_PREFIX}}/img/talking_off.png" alt="Player" />
{% endif %}
<a id="link_{{ Player.id }}" class="mumble" href="#" title="{{ Player.name }}">{{ Player.name|trunc:30 }}</a>
</span>

2
pyweb/mumble/templates/mumble/server.html

@ -3,7 +3,7 @@
{% endcomment %}
{% load mumble_extras %}
<div style="margin-left: 20px;">
<img src="{{ MEDIA_URL }}/mumble/mumble.16x16.png" alt="server" />
<img src="{{MUMBLE_MEDIA_PREFIX}}/img/mumble.16x16.png" alt="server" />
<a class="mumble" id="link_server" href="{{ Server|chanurl:MumbleAccount }}">{{ Server.name|trunc:30 }}</a>
</div>
{% for sub in Server.rootchan.subchans %}

21
pyweb/mumble/templatetags/mumble_extras.py

@ -35,11 +35,26 @@ def trunc( string, maxlen = 50 ):
def chanview( obj, user = None ):
""" renders an mmChannel / mmPlayer object with the correct template """
if obj.is_server:
return render_to_string( 'mumble/server.html', { 'Server': obj, 'MumbleAccount': user, 'MEDIA_URL': settings.MEDIA_URL } )
return render_to_string( 'mumble/server.html', {
'Server': obj,
'MumbleAccount': user,
'MEDIA_URL': settings.MEDIA_URL,
'MUMBLE_MEDIA_PREFIX': settings.MUMBLE_MEDIA_PREFIX,
} )
elif obj.is_channel:
return render_to_string( 'mumble/channel.html', { 'Channel': obj, 'MumbleAccount': user, 'MEDIA_URL': settings.MEDIA_URL } )
return render_to_string( 'mumble/channel.html', {
'Channel': obj,
'MumbleAccount': user,
'MEDIA_URL': settings.MEDIA_URL,
'MUMBLE_MEDIA_PREFIX': settings.MUMBLE_MEDIA_PREFIX,
} )
elif obj.is_player:
return render_to_string( 'mumble/player.html', { 'Player': obj, 'MumbleAccount': user, 'MEDIA_URL': settings.MEDIA_URL } )
return render_to_string( 'mumble/player.html', {
'Player': obj,
'MumbleAccount': user,
'MEDIA_URL': settings.MEDIA_URL,
'MUMBLE_MEDIA_PREFIX': settings.MUMBLE_MEDIA_PREFIX,
} )
@register.filter

6
pyweb/templates/mobile_index.html

@ -7,12 +7,12 @@
<!-- for iphone/ipod -->
<meta name="viewport" content="width=device-width,minimum-scale=1.0,maximum-scale=1.0" />
<meta name="apple-mobile-web-app-capable" content="yes" />
<link rel="apple-touch-icon" href="{{ MEDIA_URL }}/mumble/mumble.64x64.png" />
<link rel="apple-touch-icon" href="{{MUMBLE_MEDIA_PREFIX}}/img/mumble.64x64.png" />
<link rel="stylesheet" type="text/css" href="{{ MEDIA_URL }}/style.css" />
<link rel="stylesheet" type="text/css" href="{{ MEDIA_URL }}/templatestyle.css" />
<link rel="stylesheet" type="text/css" href="{{ MEDIA_URL }}/mumble/style.css" />
<link rel="shortcut icon" type="image/png" href="{{ MEDIA_URL }}/mumble/mumble.16x16.png" />
<link rel="stylesheet" type="text/css" href="{{MUMBLE_MEDIA_PREFIX}}/css/style.css" />
<link rel="shortcut icon" type="image/png" href="{{MUMBLE_MEDIA_PREFIX}}/img/mumble.16x16.png" />
{% block HeadTag %}
{% endblock %}

Loading…
Cancel
Save