base.html 4.39 KB
Newer Older
1
2
{% load url from future %}
{% load i18n %}
fred's avatar
fred committed
3
{% load panikdbtags %}
4
5
6
7
8
<!DOCTYPE html>
<html>
  <head>
    <meta charset="utf-8"/>
    <title>{% block page-title %}Panik DB{% endblock %}</title>
9
10
11
12
13

    <script type="text/javascript" src="{{ STATIC_URL }}js/jquery.js"></script>
    <script type="text/javascript" src="{{ STATIC_URL }}js/bootstrap.js"></script>
    <link href="{{ STATIC_URL }}css/bootstrap.css" rel="stylesheet" type="text/css"/>

fred's avatar
fred committed
14
    <script src="{{ STATIC_URL }}js/jquery-ui.js"></script>
fred's avatar
fred committed
15
16
17
    <script src="{{ STATIC_URL }}js/jquery.fileupload.js"></script>
    <script src="{{ STATIC_URL }}js/jquery.iframe-transport.js"></script>
    <script src="{{ STATIC_URL }}js/qommon.fileupload.js"></script>
fred's avatar
fred committed
18
    <script src="{{ STATIC_URL }}select2/select2.min.js"></script>
19

fred's avatar
fred committed
20
    <link href="{{ STATIC_URL }}select2/select2.css" rel="stylesheet" type="text/css"/>
21
22
23
24
25
    <link href="{{ STATIC_URL }}css/datetimepicker.css" rel="stylesheet" type="text/css"/>
    <script type="text/javascript" src="{{ STATIC_URL }}js/bootstrap-datetimepicker.js"></script>

    <link rel="stylesheet" type="text/css" media="all" href="{{ STATIC_URL }}css/style.css"/>

26
    <!-- <script src="{{ STATIC_URL }}js/qommon.ahah.js"></script> -->
fred's avatar
fred committed
27
    <link rel="stylesheet" type="text/css" media="all" href="{{ STATIC_URL }}css/smoothness/jquery-ui-1.10.0.custom.css"/>
28

29
30
31
    {% block extrascripts %}
    {% endblock %}
  </head>
32
  <body {% block bodyattr %}{% endblock %}>
33
34
35
36
37
  {% block wrapper %}
  <div id="wrap">
  {% endblock %}
    {% if not popup %}
    <div id="header">
fred's avatar
fred committed
38
      <h1><a href="{% url 'home' %}">Panik DB</a></h1>
39
40
    </div>
    <div id="splash">
41
      {% if user.id %}
fred's avatar
fred committed
42
43
44
45
      <form action="{% url 'haystack_search' %}">
        <input type="search" name="q" placeholder="Rechercher"/>
        <button class="icon-search"></button>
      </form>
46
      {% endif %}
47
48
49
50
51
    </div>
    <div id="user-links">
    {% block user-links %}
            <a href="{% url 'home' %}" class="icon-home-space">Accueil</a>
            <a target="blank" href="http://stats.radiopanik.org/index.php?module=Login&action=logme&login=panikdb&password=d48fb8e3a453d965901339e6b020538f" class="icon-bar-chart">Statistiques</a>
fred's avatar
fred committed
52
            {% block online-url %}
53
            {% if object and object|online_url %}
fred's avatar
fred committed
54
55
            <a href="{{ object|online_url }}" target="blank" class="icon-eye-open">Voir en ligne</a>
            {% endif %}
56
            {% endblock %}
57
58
59
60
61
62
63
64
65
66
67
            {% block manage-focus %}
            {% if object|can_focus %}
            {% if perms.emissions.add_focus %}
            {% if object|has_focus %}
            <a class="icon-pushpin" href="{{ object|unset_focus_url }}">Retirer le focus</a>
            {% else %}
            <a class="icon-pushpin" href="{{ object|set_focus_url }}">Mettre en focus</a>
            {% endif %}
            {% endif %}
            {% endif %}
            {% endblock %}
68
69
            {% block more-user-links %}
            {% endblock %}
70

fred's avatar
fred committed
71
72
73
74
75
76
77
78
79
80
            {% if object %}
            {% with object|context_url as context_url %}
            {% if context_url %}
            <span class="middle">
                    <a href="{{ object|context_url }} ">{{ object|context_title }}</a>
            </span>
            {% endif %}
            {% endwith %}
            {% endif %}

81
            <span class="right">
fred's avatar
fred committed
82
            <span>{{ user.first_name }} {{ user.last_name }} ({{ user.username }})</span>
83
            <a href="{% url 'auth_password_change' %}">Changement de mot de passe</a>
fred's avatar
fred committed
84
            <a class="icon-signout" href="{% url 'logout' %}">Déconnexion</a>
85
86
            </span>
    {% endblock %}
87
88
89
    </div>
    {% endif %}
    <div id="content">
90
91
92
93
      <div id="appbar">
        {% block appbar %}
        {% endblock %}
      </div>
94
      {% block beforecontent %}
fred's avatar
fred committed
95
96
97
98
99
100
101
102
103
104
{% if messages %}
<ul class="messages">
    {% for message in messages %}
    <li{% if message.tags %} class="{{ message.tags }}"{% endif %}>{{ message }}</li>
    {% endfor %}
</ul>
<script>
$(document).ready(function() { $('.messages').delay(5000).fadeOut('slow'); });
</script>
{% endif %}
105
106
107
      {% endblock %}
      {% block content %}
      {% endblock %}
108
      <br style="clear: both;"/>
109
110
111
    </div>
  </div>
  {% block page-end %}
fred's avatar
fred committed
112
113
114
115
<script>
$(document).ready(function() {
  $('select[multiple=multiple]').select2();
  $('select[multiple=multiple]').next('.helptext').hide();
116
117
  $('select#id_emission').select2();
  $('select#id_category').select2();
fred's avatar
fred committed
118
119
});
</script>
120
121
122
  {% endblock %}
  </body>
</html>