base.html 4.31 KB
Newer Older
1
{% load url from future %}{% load i18n panikdbtags django_select2_tags %}<!DOCTYPE html>
2 3 4 5
<html>
  <head>
    <meta charset="utf-8"/>
    <title>{% block page-title %}Panik DB{% endblock %}</title>
6 7 8 9 10

    <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
11
    <script src="{{ STATIC_URL }}js/jquery-ui.js"></script>
fred's avatar
fred committed
12 13 14
    <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>
15

16 17
    {% import_django_select2_js_css %}

18 19 20 21 22
    <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"/>

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

26 27 28
    {% block extrascripts %}
    {% endblock %}
  </head>
29
  <body {% block bodyattr %}{% endblock %}>
30 31 32 33 34
  {% block wrapper %}
  <div id="wrap">
  {% endblock %}
    {% if not popup %}
    <div id="header">
35
      <h1><a href="{% url 'home' %}">Panik DB</a></h1>
36 37
    </div>
    <div id="splash">
38
      {% if user.id %}
fred's avatar
fred committed
39
      <form class="gadjo-popup-ignore" action="{% url 'haystack_search' %}">
fred's avatar
fred committed
40 41 42
        <input type="search" name="q" placeholder="Rechercher"/>
        <button class="icon-search"></button>
      </form>
43
      {% endif %}
44 45 46 47 48
    </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
49
            {% block online-url %}
50
            {% if object and object|online_url %}
fred's avatar
fred committed
51 52
            <a href="{{ object|online_url }}" target="blank" class="icon-eye-open">Voir en ligne</a>
            {% endif %}
53
            {% endblock %}
54 55 56 57 58 59 60 61 62 63 64
            {% 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 %}
65 66
            {% block more-user-links %}
            {% endblock %}
67

68 69 70 71 72 73 74 75 76 77
            {% 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 %}

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