partner.html 4.36 KB
Newer Older
Luuk Scholten's avatar
Luuk Scholten committed
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
{% extends "base.html" %}
{% load i18n %}

{% block body %}

    <h1>{{ partner.name }}</h1>

    <h3>{% blocktrans with name=partner.name %}About {{ name }}{% endblocktrans %}</h3>

    <div class="row">
        <div class="span8">
            <div id="bedrijfsomschrijving">
                {{ partner.company_profile }}
            </div>
        </div>
        <div class="span4">
            <div id="partner_images">
                <div class="partner_image_item possibly_main_partner">
                    {% if partner.logo %}
                        {% if partner.is_main_partner %}
                            <div class="ribbon-wrapper-basiskleur">
                                <div class="ribbon-basiskleur">{% trans "Main Partner" %}</div>
                            </div>
                        {% endif %}
                    {% endif %}
                    <img src="{{ partner.logo.url }}" alt="Logo {{ partner.name }}" />
                </div>
                {% for image in partner.images.all %}
                    <div class="partner_image_item">
                        <a class="gallery-box"
                           data-download="{{ image.image.url }}"
                           href="{{ image.image.url }}"
                           rel="partner-images"
                        >
                            <img src="{{ image.image.url }}" />
                        </a>
                    </div>
                {% endfor %}
            </div>
        </div>
    </div>

    <div class="row">
        <div class="span4">
            <h3>{% trans "Information" %}</h3>
            <span class="partner_informatie_omschrijving">{% trans "Street" %}: </span>
            {{ partner.address }}<br />
            <span class="partner_informatie_omschrijving">{% trans "Zip Code" %}:</span>
            {{ partner.zip_code }}<br />
            <span class="partner_informatie_omschrijving">{% trans "City" %}:</span>
            {{ partner.city }}<br /><br />

            {% if partner.link %}
            <div id="partner_informatie_website">
                <span class="partner_informatie_omschrijving">{% trans "Website" %}: </span>
                <a href="{{ partner.link }}">{{ partner.link }}</a>
            </div>
            {% endif %}
        </div>
        <div class="span7 offset1">
            <img src="https://maps.google.com/maps/api/staticmap?center={{ partner.address|urlize }}%20{{ partner.zip_code|urlize }}%20{{ partner.city|urlize }},the+netherlands&zoom=10&size=620x200&maptype=roadmap&markers=color:0xE62272%7Clabel:%7C{{ partner.address|urlize }}%20{{ partner.zip_code|urlize }}%20{{ partner.city|urlize }},the+netherlands&sensor=false" />
        </div>
    </div>

    {# todo vacancies #}
    {% if partner.vacancies.all|length > 0 %}
    <div id="partner_vacatures">
        <h3>Vacatures</h3>

        <div class="row">
            <div class="span12">
                <ul class="toggles">
                    <?php foreach($partner->getVacancies() as $vacancy): ?>
                    <li id="vacancy-<?php echo $vacancy->id; ?>">
                        <div class="toggle-title"><a href="#"><span></span><?php echo $vacancy->title ?></a></div>
                        <div class="toggle-content">
                            <?php echo $vacancy->description ?>

                            <?php if ($vacancy->link !== ''): ?>
                            <?php if (preg_match('/http(s?)/', $vacancy->link)): ?>
                            <?php $link = $vacancy->link; ?>
                            <?php else: ?>
                            <?php $link = sprintf("http://%s", $vacancy->link); ?>
                            <?php endif; ?>
                            <br /><br />
                            <a href="<?php echo $link; ?>" target="_blank" rel="noopener">
                                <button type="button" class="btn-large btn-style2">Ontdek meer</button>
                            </a>
                            <?php endif; ?>
                        </div>
                    </li>
                    <?php endforeach; ?>
                </ul>
            </div>
        </div>
    </div>

    <script type="text/javascript">
        $(document).ready(function(){
            var windowhash = window.location.hash;
            $(windowhash).children('.toggle-title').click();
        });
    </script>
    {% endif %}
    {# todo vacancies #}
{% endblock body %}