base.jinja 4.28 KB
Newer Older
Skia's avatar
Skia committed
1
2
<!DOCTYPE html>
<html lang="fr">
Skia's avatar
Skia committed
3
4
5
6
    <head>
        {% block head %}
        <title>{% block title %}{% trans %}Welcome!{% endtrans %}{% endblock %}</title>
        <link rel="stylesheet" href="{{ static('core/base.css') }}">
Skia's avatar
Skia committed
7
8
        <link rel="stylesheet" href="{{ static('core/multiple-select.css') }}">
        <link rel="stylesheet" href="{{ static('core/js/ui/jquery-ui.min.css') }}">
9
        <link rel="stylesheet" href="{{ static('ajax_select/css/ajax_select.css') }}">
Skia's avatar
Skia committed
10
        <link rel="stylesheet" href="{{ static('core/style.css') }}">
Skia's avatar
Skia committed
11
12
        {% endblock %}
    </head>
Skia's avatar
Skia committed
13

Skia's avatar
Skia committed
14
    <body>
Skia's avatar
Skia committed
15
        {% block header %}
Skia's avatar
Skia committed
16
        {% if not popup %}
Skia's avatar
Skia committed
17
18
19
20
21
22
23
        <div id="logo"><a href="{{ url('core:index') }}"><img src="{{ static('core/img/logo.png') }}"
                                                              alt="{% trans %}Logo{% endtrans %}" /></a></div>
        <header>
            {% if not user.is_authenticated() %}
            <a href="{{ url('core:login') }}">{% trans %}Login{% endtrans %}</a> |
            <a href="{{ url('core:register') }}">{% trans %}Register{% endtrans %}</a>
            {% else %}
24
            <a href="{{ url('core:user_profile', user_id=user.id) }}">{{ user.get_display_name() }}</a> |
Skia's avatar
Skia committed
25
26
            <a href="{{ url('core:user_tools') }}">{% trans %}Tools{% endtrans %}</a> |
            <a href="{{ url('core:logout') }}">{% trans %}Logout{% endtrans %}</a>
Skia's avatar
Skia committed
27
            <form action="{{ url('core:search') }}" method="GET">
28
                <input type="text" placeholder="{% trans %}Search{% endtrans %}" name="query" id="search" />
Skia's avatar
Skia committed
29
30
                <input type="submit" value="{% trans %}Search{% endtrans %}" style="display: none;" />
            </form>
Skia's avatar
Skia committed
31
32
            {% endif %}
        </header>
Skia's avatar
Skia committed
33
34
35
        {% else %}
        <div id="popupheader">{{ user.get_display_name() }}</div>
        {% endif %}
Skia's avatar
Skia committed
36
        {% endblock %}
Skia's avatar
Skia committed
37
        {% block nav %}
Skia's avatar
Skia committed
38
        {% if not popup %}
Skia's avatar
Skia committed
39
40
        <nav>
            <a href="{{ url('core:user_list') }}">{% trans %}Users{% endtrans %}</a>
Skia's avatar
Skia committed
41
42
            <a href="{{ url('core:page', page_name="Index") }}">{% trans %}Wiki{% endtrans %}</a>
            <a href="{{ url('core:page_list') }}">{% trans %}Pages{% endtrans %}</a>
Skia's avatar
Skia committed
43
            <a href="{{ url('club:club_list') }}">{% trans %}Clubs{% endtrans %}</a>
Skia's avatar
Skia committed
44
            <a href="{{ url('core:page', "services") }}">{% trans %}Services{% endtrans %}</a>
Skia's avatar
Skia committed
45
        </nav>
Skia's avatar
Skia committed
46
        {% endif %}
Skia's avatar
Skia committed
47
        {% endblock %}
Skia's avatar
Skia committed
48

Skia's avatar
Skia committed
49
50
        <div id="content">
            {% if error %}
Skia's avatar
Skia committed
51
            {{ error }}
Skia's avatar
Skia committed
52
53
54
55
            {% endif %}
            {% block content %}
            {% endblock %}
        </div>
Skia's avatar
Skia committed
56

Skia's avatar
Skia committed
57
        {% if not popup %}
Skia's avatar
Skia committed
58
59
60
61
62
        <footer>
            {% block footer %}
            {% trans %}Site made by good people{% endtrans %}
            {% endblock %}
        </footer>
Skia's avatar
Skia committed
63
        {% endif %}
Skia's avatar
Skia committed
64
65
66
67
68
        <!--
            {% block tests %}
            {{ tests }}
            {% endblock %}
        -->
69
        {% block script %}
Skia's avatar
Skia committed
70
71
        <script src="{{ static('core/js/jquery-3.1.0.min.js') }}"></script>
        <script src="{{ static('core/js/ui/jquery-ui.min.js') }}"></script>
72
        <script src="{{ static('core/js/ui/i18n/datepicker-fr.js') }}"></script>
Skia's avatar
Skia committed
73
        <script src="{{ static('core/js/multiple-select.js') }}"></script>
74
        <script src="{{ static('ajax_select/js/ajax_select.js') }}"></script>
Skia's avatar
Skia committed
75
76
        <script src="{{ static('core/js/script.js') }}"></script>
        <script>
77
78
79
80
81
82
83
84
85
86
87
88
$('.select_single').multipleSelect({
    single: true,
    {% if not popup %}
    position: 'top',
    {% endif %}
});
$('.select_multiple').multipleSelect({
    filter: true,
    {% if not popup %}
    position: 'top',
    {% endif %}
});
89
90
91
92
93
94
95
96
$('.select_date').datepicker({
    changeMonth: true,
    changeYear: true,
    dayNamesShort: $.datepicker.regional[ "{{ request.LANGUAGE_CODE }}"  ].dayNamesShort,
    dayNames: $.datepicker.regional[ "{{ request.LANGUAGE_CODE }}"  ].dayNames,
    monthNamesShort: $.datepicker.regional[ "{{ request.LANGUAGE_CODE }}"  ].monthNamesShort,
    monthNames: $.datepicker.regional[ "{{ request.LANGUAGE_CODE }}"  ].monthNames,
}).datepicker( $.datepicker.regional[ "{{ request.LANGUAGE_CODE }}"] );
97
98
99
100
101
102
103
$(document).keydown(function (e) {
    if ($(e.target).is('input')) { return }
    if (e.keyCode == 83) {
        $("#search").focus();
        return false;
    }
});
Skia's avatar
Skia committed
104
        </script>
105
        {% endblock %}
Skia's avatar
Skia committed
106
    </body>
Skia's avatar
Skia committed
107
</html>