mirror of
https://gitlab.com/allianceauth/allianceauth.git
synced 2025-07-15 07:20:17 +02:00
changed templates to reflect corp or alliance toggle
created context processors for IS_CORP, ALLIANCE_ID and ALLIANCE_NAME variables Signed-off-by: Adarnof <adarnof@gmail.com>
This commit is contained in:
parent
a3de13f055
commit
984ab31d33
@ -112,8 +112,11 @@ TEMPLATE_CONTEXT_PROCESSORS = (
|
|||||||
'django.core.context_processors.tz',
|
'django.core.context_processors.tz',
|
||||||
'django.contrib.messages.context_processors.messages',
|
'django.contrib.messages.context_processors.messages',
|
||||||
'django.core.context_processors.request',
|
'django.core.context_processors.request',
|
||||||
|
'util.context_processors.is_corp',
|
||||||
'util.context_processors.corp_id',
|
'util.context_processors.corp_id',
|
||||||
'util.context_processors.corp_name',
|
'util.context_processors.corp_name',
|
||||||
|
'util.context_processors.alliance_id',
|
||||||
|
'util.context_processors.alliance_name',
|
||||||
'util.context_processors.jabber_url',
|
'util.context_processors.jabber_url',
|
||||||
'util.context_processors.domain_url'
|
'util.context_processors.domain_url'
|
||||||
)
|
)
|
||||||
|
@ -10,9 +10,12 @@
|
|||||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||||
<meta name="description" content="">
|
<meta name="description" content="">
|
||||||
<meta name="author" content="">
|
<meta name="author" content="">
|
||||||
|
{% if IS_CORP %}
|
||||||
<title>{{ CORP_NAME }} - Login</title>
|
<title>{{ CORP_NAME }} - Login</title>
|
||||||
|
{% else %}
|
||||||
|
<title>{{ ALLIANCE_NAME }} - Login</title>
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
<!-- Bootstrap Core CSS -->
|
<!-- Bootstrap Core CSS -->
|
||||||
<link href="{% static 'css/bootstrap.min.css' %}" rel="stylesheet">
|
<link href="{% static 'css/bootstrap.min.css' %}" rel="stylesheet">
|
||||||
<!-- Custom Fonts -->
|
<!-- Custom Fonts -->
|
||||||
|
@ -10,7 +10,11 @@
|
|||||||
<meta name="description" content="">
|
<meta name="description" content="">
|
||||||
<meta name="author" content="">
|
<meta name="author" content="">
|
||||||
|
|
||||||
<title>{{ CORP_NAME }} - Login</title>
|
{% if IS_CORP %}
|
||||||
|
<title>{{ CORP_NAME }} - Login</title>
|
||||||
|
{% else %}
|
||||||
|
<title>{{ ALLIANCE_NAME }} - Login</title>
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
<!-- Bootstrap Core CSS -->
|
<!-- Bootstrap Core CSS -->
|
||||||
<link href="{% static 'css/bootstrap.min.css' %}" rel="stylesheet">
|
<link href="{% static 'css/bootstrap.min.css' %}" rel="stylesheet">
|
||||||
|
@ -23,12 +23,19 @@
|
|||||||
href="https://community.eveonline.com/support/api-key/CreatePredefined?accessMask=268435455">Create
|
href="https://community.eveonline.com/support/api-key/CreatePredefined?accessMask=268435455">Create
|
||||||
a full API key</a>
|
a full API key</a>
|
||||||
</p>
|
</p>
|
||||||
|
{% if IS_CORP %}
|
||||||
<p class="text-center">
|
<p class="text-center">
|
||||||
NOTE: If you are part of the corp do not check "Blue" this is for people who are blue to the
|
NOTE: If you are part of the corp do not check "Blue", this is for people who are blue to the
|
||||||
corp
|
corp
|
||||||
but are not in it. Blue access is limited.
|
but are not in it. Blue access is limited.
|
||||||
</p>
|
</p>
|
||||||
|
{% else %}
|
||||||
|
<p class="text-center">
|
||||||
|
NOTE: If you are part of the alliance do not check "Blue", this is for people who are blue to the
|
||||||
|
alliance
|
||||||
|
but are not in it. Blue access is limited.
|
||||||
|
</p>
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
<p class="text-center"><b>Do not change the accessmask or deselect options or it will not work </b>
|
<p class="text-center"><b>Do not change the accessmask or deselect options or it will not work </b>
|
||||||
</p>
|
</p>
|
||||||
|
@ -67,7 +67,11 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
{% else %}
|
{% else %}
|
||||||
<p> Not part of the corporation</p>
|
{% if IS_CORP %}
|
||||||
|
<div class="alert alert-danger" role="alert">You are not in the corporation.</div>
|
||||||
|
{% else %}
|
||||||
|
<div class="alert alert-danger" role="alert">You are not in the alliance.</div>
|
||||||
|
{% endif %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</div>
|
</div>
|
||||||
{% endblock content %}
|
{% endblock content %}
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
{% extends "public/base.html" %}
|
{% extends "public/base.html" %}
|
||||||
{% block title %}Alliance Auth{% endblock %}
|
{% block title %}Alliance Auth{% endblock %}
|
||||||
{% block page_title %}Something something here{% endblock page_title %}
|
{% block page_title %}Dashboard{% endblock page_title %}
|
||||||
|
|
||||||
{% block content %}
|
{% block content %}
|
||||||
|
|
||||||
@ -59,7 +59,11 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
{% else %}
|
{% else %}
|
||||||
<p> Not part of the corporation</p>
|
{% if IS_CORP %}
|
||||||
|
<p> Not part of the corporation.</p>
|
||||||
|
{% else %}
|
||||||
|
<p> Not part of the alliance.</p>
|
||||||
|
{% endif %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</div>
|
</div>
|
||||||
{% endblock content %}
|
{% endblock content %}
|
||||||
|
@ -52,7 +52,11 @@
|
|||||||
{% endfor %}
|
{% endfor %}
|
||||||
</table>
|
</table>
|
||||||
{% else %}
|
{% else %}
|
||||||
<div class="alert alert-danger" role="alert">You are not in the corporation</div>
|
{% if IS_CORP %}
|
||||||
|
<div class="alert alert-danger" role="alert">You are not in the corporation.</div>
|
||||||
|
{% else %}
|
||||||
|
<div class="alert alert-danger" role="alert">You are not in the alliance.</div>
|
||||||
|
{% endif %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
@ -300,7 +300,11 @@
|
|||||||
{% endif %}
|
{% endif %}
|
||||||
</table>
|
</table>
|
||||||
{% else %}
|
{% else %}
|
||||||
<div class="alert alert-danger" role="alert">You are not in the corporation</div>
|
{% if IS_CORP %}
|
||||||
|
<div class="alert alert-danger" role="alert">You are not in the corporation.</div>
|
||||||
|
{% else %}
|
||||||
|
<div class="alert alert-danger" role="alert">You are not in the alliance.</div>
|
||||||
|
{% endif %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
@ -12,7 +12,11 @@
|
|||||||
<meta name="description" content="">
|
<meta name="description" content="">
|
||||||
<meta name="author" content="">
|
<meta name="author" content="">
|
||||||
|
|
||||||
<title>{{ CORP_NAME }} - Login</title>
|
{% if IS_CORP %}
|
||||||
|
<title>{{ CORP_NAME }} - Login</title>
|
||||||
|
{% else %}
|
||||||
|
<title>{{ ALLIANCE_NAME }} - Login</title>
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
<!-- Bootstrap Core CSS -->
|
<!-- Bootstrap Core CSS -->
|
||||||
<link href="{% static 'css/bootstrap.min.css' %}" rel="stylesheet">
|
<link href="{% static 'css/bootstrap.min.css' %}" rel="stylesheet">
|
||||||
|
@ -12,8 +12,11 @@
|
|||||||
<meta name="description" content="">
|
<meta name="description" content="">
|
||||||
<meta name="author" content="">
|
<meta name="author" content="">
|
||||||
|
|
||||||
<title>{{ CORP_NAME }} - Login</title>
|
{% if IS_CORP %}
|
||||||
|
<title>{{ CORP_NAME }} - Login</title>
|
||||||
|
{% else %}
|
||||||
|
<title>{{ ALLIANCE_NAME }} - Login</title>
|
||||||
|
{% endif %}
|
||||||
<!-- Bootstrap Core CSS -->
|
<!-- Bootstrap Core CSS -->
|
||||||
<link href="{% static 'css/bootstrap.min.css' %}" rel="stylesheet">
|
<link href="{% static 'css/bootstrap.min.css' %}" rel="stylesheet">
|
||||||
<!-- Custom Fonts -->
|
<!-- Custom Fonts -->
|
||||||
|
@ -12,7 +12,11 @@
|
|||||||
<meta name="description" content="">
|
<meta name="description" content="">
|
||||||
<meta name="author" content="">
|
<meta name="author" content="">
|
||||||
|
|
||||||
<title>{{ CORP_NAME }} - Login</title>
|
{% if IS_CORP %}
|
||||||
|
<title>{{ CORP_NAME }} - Login</title>
|
||||||
|
{% else %}
|
||||||
|
<title>{{ ALLIANCE_NAME }} - Login</title>
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
<!-- Bootstrap Core CSS -->
|
<!-- Bootstrap Core CSS -->
|
||||||
<link href="{% static 'css/bootstrap.min.css' %}" rel="stylesheet">
|
<link href="{% static 'css/bootstrap.min.css' %}" rel="stylesheet">
|
||||||
|
@ -2,13 +2,20 @@ from django.conf import settings
|
|||||||
from django.utils import timezone
|
from django.utils import timezone
|
||||||
|
|
||||||
|
|
||||||
|
def is_corp(request):
|
||||||
|
return {'IS_CORP': settings.IS_CORP}
|
||||||
|
|
||||||
def corp_id(request):
|
def corp_id(request):
|
||||||
return {'CORP_ID': settings.CORP_ID}
|
return {'CORP_ID': settings.CORP_ID}
|
||||||
|
|
||||||
|
|
||||||
def corp_name(request):
|
def corp_name(request):
|
||||||
return {'CORP_NAME': settings.CORP_NAME}
|
return {'CORP_NAME': settings.CORP_NAME}
|
||||||
|
|
||||||
|
def alliance_id(request):
|
||||||
|
return {'ALLIANCE_ID': settings.ALLIANCE_ID}
|
||||||
|
|
||||||
|
def alliance_name(request):
|
||||||
|
return {'ALLIANCE_NAME': settings.CORP_NAME}
|
||||||
|
|
||||||
def jabber_url(request):
|
def jabber_url(request):
|
||||||
return {'JABBER_URL': settings.JABBER_URL}
|
return {'JABBER_URL': settings.JABBER_URL}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user