meso.tpl 2.39 KB
Newer Older
1
{% if header %}
2
3
4
5
6
<div class="meso">
    <div class="card">
        <div class="card-header">
            {% if meso['url'] %}
            <a href="{{ meso['url'] }}">{{ meso['name'] }}</a>
Roland Denis's avatar
Roland Denis committed
7
            {% else %}
8
            {{ meso['name'] }}
Roland Denis's avatar
Roland Denis committed
9
            {% endif %}
10
11
12
        </div>
        <div class="card-body">
            {% if meso['contactname'] %}
Roland Denis's avatar
Roland Denis committed
13
                <p><img src="../theme/img/mail.png" alt="Contact" />
14
15
16
17
18
                {% if meso['contactaddress'] %}
                <a href="mailto:{{ meso['contactaddress'] }}">{{ meso['contactname'] }}</a>
                {% else %}
                {{ meso['contactname'] }}
                {% endif %}
Roland Denis's avatar
Roland Denis committed
19
                </p>
20
            {% endif %}
21
            {% if meso['institutesname'] %}
Roland Denis's avatar
Roland Denis committed
22
                <p><img src="../theme/img/employer.png" alt="Institutions" />
23
24
25
                {% for name in meso['institutesname'] -%}
                {{ ' et ' if loop.last }}{{ ', ' if not loop.first and not loop.last }}{{ name }}
                {%- endfor %}
Roland Denis's avatar
Roland Denis committed
26
                </p>
27
28
            {% endif %}
            {% if meso['financersname'] %}
Roland Denis's avatar
Roland Denis committed
29
                <p><img src="../theme/img/contract.png" alt="Financeurs" />
30
31
32
                {% for name in meso['financersname'] -%}
                {{ ' et ' if loop.last }}{{ ', ' if not loop.first and not loop.last }}{{ name }}
                {%- endfor %}
Roland Denis's avatar
Roland Denis committed
33
                </p>
34
35
            {% endif %}
            {% if meso['location'] %}
Roland Denis's avatar
Roland Denis committed
36
                <p><img src="../theme/img/position_full.png" alt="Position" />
37
                {% if meso['gpscoordinates'] %}
38
                <a href="https://www.openstreetmap.org/?mlat={{meso['gpscoordinates'][0]}}&mlon={{meso['gpscoordinates'][1]}}&zoom=16">{{ meso['location'] }}</a>
39
40
41
                {% else %}
                {{ meso['location'] }}
                {% endif %}
Roland Denis's avatar
Roland Denis committed
42
                </p>
43
44
            {% endif %}
            {% if meso['totalcorenumber'] %}
Roland Denis's avatar
Roland Denis committed
45
                <p><img src="../theme/img/cpu.png" alt="Nombre de cœurs" />
46
                {{ meso['totalcorenumber'] }} cœurs
Roland Denis's avatar
Roland Denis committed
47
                </p>
48
49
            {% endif %}
            {% if meso['totalstorage'] %}
Roland Denis's avatar
Roland Denis committed
50
                <p><img src="../theme/img/floppy.png" alt="Stockage" />
51
                {{ meso['totalstorage'] }} To
Roland Denis's avatar
Roland Denis committed
52
                </p>
53
54
55
            {% endif %}
        </div>
        <div class="card-footer p-0 d-flex align-items-center">
56
57
{% endif %}
{% if footer %}
58
        </div>
Roland Denis's avatar
Roland Denis committed
59
60
    </div>
</div>
61
{% endif %}