Add tag to link EVE mail either in-game or out of game.

This commit is contained in:
2013-10-13 16:56:28 +01:00
parent 33b5b9d532
commit e2606e35fd
2 changed files with 11 additions and 0 deletions

View File

@@ -0,0 +1 @@
{% if is_igb %}javascript:CCPEVE.openEVEMail(){% else %}{{ gate_base }}/Mail/Inbox{% endif %}

View File

@@ -1,3 +1,13 @@
from django import template
from django.conf import settings
register = template.Library()
@register.inclusion_tag('eveigb/open_mail.html', takes_context=True)
def eve_mail_link(context):
""" Provide a link either to in-game mail, or EVE Gate mail"""
return {
'igb': context['is_igb'],
'gate_base': getattr(settings, 'EVE_GATE_BASE', 'https://gate.eveonline.com')
}