]> git.0d.be Git - panikdb.git/blob - panikdb/templates/base.html
revamp full text search to use postgresql
[panikdb.git] / panikdb / templates / base.html
1 {% extends "gadjo/base.html" %}
2 {% load gadjo i18n panikdbtags %}
3     {% block page-title %}{{site_title}}{% endblock %}
4
5     {% block bodyargs %}data-no-moving-header="x"{%endblock %}
6
7     {% block gadjo-js %}
8     {{ block.super }}
9     <script src="{{ STATIC_URL }}js/jquery.fileupload.js"></script>
10     <script src="{{ STATIC_URL }}js/jquery.iframe-transport.js"></script>
11     <script src="{{ STATIC_URL }}js/qommon.fileupload.js"></script>
12     <script src="{{ STATIC_URL }}js/panikdb.js"></script>
13     <script type="text/javascript" src="{% xstatic "select2.js" "select2.min.js" %}"></script>
14     {% endblock %}
15
16     {% block css %}
17     {{ block.super }}
18     <link href="{% xstatic "select2.css" "select2.min.css" %}" rel="stylesheet">
19     <link rel="icon" href="/static/images/favicon-16.png" type="image/png" sizes="16x16">
20     <link rel="icon" href="/static/images/favicon-32.png" type="image/png" sizes="32x32">
21     <link rel="icon" href="/static/images/favicon-48.png" type="image/png" sizes="48x48">
22     <link rel="apple-touch-icon" href="/static/images/favicon-512.png">
23     {% endblock %}
24
25     {% block sidepage %}
26     {% endblock %}
27
28     {% block site-header %}
29     <h1><a href="/">{% block site-title %}{{ site_title }}{% endblock %}</a></h1>
30     {% block subheader %}
31     <div id="search">
32       {% if request.user.id %}
33       <form class="gadjo-popup-ignore" action="{% url 'panikdb-search' %}"
34             data-wiki-search-base-url="{{ wiki_search_base_url }}">
35         <input type="search" name="q" placeholder="Rechercher"/>
36         <button class="icon-search"></button>
37       </form>
38       <div id="search-results">
39       </div>
40       {% endif %}
41     </div>
42     {% endblock %}
43     {% endblock %}
44
45     {% block more-user-links %}
46             <a href="{% url 'home' %}" class="icon-home-space">{% trans "Home" %}</a>
47             {% block online-url %}
48             {% if object and object|online_url %}
49             <a href="{{ object|online_url }}" target="blank" class="icon-eye-open">{% trans "See online" %}</a>
50             {% endif %}
51             {% endblock %}
52             {% block manage-focus %}
53             {% if object|can_focus or object|has_focus %}
54             {% if perms.emissions.add_focus %}
55             {% if object|has_focus %}
56             <a class="icon-pushpin" href="{{ object|unset_focus_url }}">{% trans "Remove focus" %}</a>
57             {% else %}
58             <a class="icon-pushpin" href="{{ object|set_focus_url }}">{% trans "Set in focus" %}</a>
59             {% endif %}
60             {% endif %}
61             {% endif %}
62             {% endblock %}
63
64             {% if object %}
65             {% with object|context_url as context_url %}
66             {% if context_url %}
67             <span class="middle">
68                     <a href="{{ object|context_url }} ">{{ object|context_title }}</a>
69             </span>
70             {% endif %}
71             {% endwith %}
72             {% endif %}
73     {% endblock %}
74
75     {% block user-links %}
76     {% if request.user.is_authenticated %}
77             <a class="icon-user-space" href="{% url 'profile-view' %}">{{ request.user.first_name }} {{ request.user.last_name }} ({{ request.user.username }})</a>
78             <a class="icon-signout" href="{% url 'logout' %}">{% trans "Logout" %}</a>
79     {% endif %}
80     {% endblock %}
81
82     {% block page-end %}
83 <script>
84 $(document).ready(function() {
85   $('select[multiple=multiple]').select2();
86   $('select[multiple=multiple]').next('.helptext').hide();
87   $('select#id_emission').select2();
88   $('select#id_category').select2();
89 });
90 </script>
91   {% endblock %}
92
93     {% block footer %}
94     {% endblock %}