mirror of
https://github.com/nikdoof/django-eveigb.git
synced 2025-12-22 13:09:20 +00:00
Add tag to link EVE mail either in-game or out of game.
This commit is contained in:
1
eveigb/templates/eveigb/open_mail.html
Normal file
1
eveigb/templates/eveigb/open_mail.html
Normal file
@@ -0,0 +1 @@
|
||||
{% if is_igb %}javascript:CCPEVE.openEVEMail(){% else %}{{ gate_base }}/Mail/Inbox{% endif %}
|
||||
@@ -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')
|
||||
}
|
||||
Reference in New Issue
Block a user