0001-authentic-display-only-service-home-link-only-if-def.patch
src/authentic2/templates/authentic2/service_info_fragment.html | ||
---|---|---|
1 | 1 |
{% load i18n %} |
2 | 2 |
{% if service %} |
3 | 3 |
{% firstof service_colour service_ou_colour as colour %} |
4 |
{% firstof service.home_url service.ou.home_url as home_url %} |
|
5 | 4 |
{% firstof service.name service.ou.name as name %} |
6 | 5 | |
7 |
{% if show_service_infos and home_url %} |
|
6 | ||
7 |
{% if show_service_infos %} |
|
8 | 8 |
{% block service-colour %} |
9 | 9 |
{% if colour %} |
10 | 10 |
<style> |
11 |
a.service-message--link { |
|
11 |
a.service-message--link, .service-message--text {
|
|
12 | 12 |
color: {{ colour }}; |
13 | 13 |
} |
14 | 14 |
</style> |
... | ... | |
20 | 20 |
{% block service-logo %} |
21 | 21 |
{% if logo_url %} |
22 | 22 |
<picture> |
23 |
<a href="{{ home_url }}"><img src="{{ logo_url }}" alt="{{ name }}" class="service-message--logo" /></a> |
|
23 |
{% if service.home_url %} |
|
24 |
<a href="{{ home_url }}"> |
|
25 |
{% endif %} |
|
26 |
<img src="{{ logo_url }}" alt="{{ name }}" class="service-message--logo" /> |
|
27 |
{% if service.home_url %} |
|
28 |
</a> |
|
29 |
{% endif %} |
|
24 | 30 |
</picture> |
25 | 31 |
{% endif %} |
26 | 32 |
{% endblock %} |
27 | 33 | |
28 | 34 |
<div> |
29 | 35 |
{% block service-name-top %}{% endblock %} |
30 |
<a href="{{ home_url }}" class="service-message--link"> |
|
31 |
{% block service-name-pre %}{% endblock %} |
|
32 |
{% block service-name %}{{ name }}{% endblock %} |
|
33 |
{% block service-name-post %}{% endblock %} |
|
34 |
</a> |
|
36 |
{% if service.home_url %} |
|
37 |
<a href="{{ service.home_url }}" class="service-message--link"> |
|
38 |
{% else %} |
|
39 |
<span class="service-message--text"> |
|
40 |
{% endif %} |
|
41 |
{% block service-name-pre %}{% endblock %} |
|
42 |
{% block service-name %}{{ name }}{% endblock %} |
|
43 |
{% block service-name-post %}{% endblock %} |
|
44 |
{% if service.home_url %} |
|
45 |
</a> |
|
46 |
{% else %} |
|
47 |
</span> |
|
48 |
{% endif %} |
|
35 | 49 |
{% block service-name-bottom %}{% endblock %} |
36 | 50 |
</div> |
37 | 51 |
</div> |
38 |
- |