0001-display-extra-links-in-panel-13963.patch
mandayejs/mandaye/static/mandaye.css | ||
---|---|---|
33 | 33 |
margin-right: 15px; |
34 | 34 |
} |
35 | 35 | |
36 |
#mandaye-logon-url { |
|
36 |
#mandaye-logon-url, #mandaye-extra-links {
|
|
37 | 37 |
float: right; |
38 | 38 |
margin-right: 10px; |
39 | 39 |
} |
mandayejs/mandaye/templates/mandaye/extra_links.html | ||
---|---|---|
1 |
{% if extra_links %} |
|
2 |
<div id="mandaye-extra-links"> |
|
3 |
{% for link in extra_links %} |
|
4 |
<div><a href="{{ link.url }}">{{ link.title }}</a></div> |
|
5 |
{% endfor %} |
|
6 |
</div> |
|
7 |
{% endif %} |
mandayejs/mandaye/templates/mandaye/panel.html | ||
---|---|---|
31 | 31 |
{% else %} |
32 | 32 |
<div id="mandaye-association-url"><a href="{% url 'associate' %}">{% trans 'associate' %}</a></div> |
33 | 33 |
{% endif %} |
34 |
{% include "mandaye/extra_links.html" %} |
|
34 | 35 |
{% else %} |
35 | 36 |
<div id="mandaye-advances"><a href="{{wcs_url}}">{% trans 'advances' %}</a></div> |
36 | 37 |
<div id="mandaye-logon-url"><a href="{% url 'mellon_login' %}">{% trans 'login' %}</a></div> |
37 | 38 |
<div id="mandaye-association-url"><a href="{% url 'associate' %}">{% trans 'associate' %}</a></div> |
39 |
{% include "mandaye/extra_links.html" %} |
|
38 | 40 |
{% endif %} |
39 | 41 |
</div> |
mandayejs/mandaye/views.py | ||
---|---|---|
21 | 21 |
from django.contrib.auth.models import User |
22 | 22 |
from django.contrib.auth.decorators import login_required |
23 | 23 |
from django.contrib import messages |
24 |
from django.conf import settings |
|
24 | 25 |
from django.http import HttpResponseRedirect, HttpResponse |
25 | 26 |
from django.shortcuts import render, resolve_url |
26 | 27 |
from django.template import RequestContext |
... | ... | |
70 | 71 |
context['force_redirect_locator'] = getattr(app_settings, 'SITE_FORCE_REDIRECT_LOCATOR', '') |
71 | 72 |
context['logout_locator'] = getattr(app_settings, 'SITE_LOGOUT_LOCATOR', '') |
72 | 73 |
context['is_linked'] = self.is_account_linked() |
74 |
context['extra_links'] = getattr(settings, 'EXTRA_LINKS', []) |
|
73 | 75 |
return context |
74 | 76 | |
75 | 77 |
def is_account_linked(self): |
76 |
- |