admin support for newsletter
[wolnelektury.git] / src / wolnelektury / templates / base / superbase.html
1 <!DOCTYPE html>
2 {% spaceless %}
3   <html lang="{{ LANGUAGE_CODE }}" prefix="og: http://ogp.me/ns# fb: http://ogp.me/ns/fb#">
4     {% load pipeline i18n %}
5     {% load static from staticfiles %}
6     {% load catalogue_tags funding_tags reporting_stats %}
7     {% load piwik_tags %}
8     {% load ssi_include ssi_csrf_token from ssify %}
9     {% load user_username user_is_staff from common_tags %}
10     {% load cache %}
11     {% get_current_language as LANGUAGE_CODE %}
12     <head>
13       <meta charset="utf-8">
14       <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
15       <meta name="application-name" content="Wolne Lektury" />
16       <meta property="og:site_name" content="Wolne Lektury" />
17       <meta property="og:title" content="{% block ogtitle %}{{ page_title }}{% endblock %}" />
18       <meta property="og:type" content="{% block ogtype %}website{% endblock %}" />
19       <meta property="og:image" content="{% block ogimage %}{{ FULL_STATIC_URL }}img/wiatrak.jpg{% endblock %}" />
20       <meta name="description" content="{% block metadescription %}Darmowe, opracowane, pełne teksty lektur, e-booki, audiobooki i pliki DAISY na wolnej licencji.{% endblock %}" />
21       {% block ogextra %}{% endblock %}
22
23       <title>
24         {% block title %}{% block titleextra %}{{ page_title }}{% endblock %} :: {% trans "Wolne Lektury" %}{% endblock %}
25       </title>
26       <link rel="icon" href="{% static 'img/favicon.png' %}" type="image/png"/>
27       <link rel="search" type="application/opensearchdescription+xml" title="Wolne Lektury"
28             href="{% static 'opensearch.xml' %}"/>
29       {% stylesheet "main" %}
30       {% block extrahead %}{% endblock %}
31     </head>
32     <body id="{% block bodyid %}base{% endblock %}">
33
34       {% block bodycontent %}
35
36         {% if not funding_no_show_current %}
37           {% cache 120 funding_top_bar LANGUAGE_CODE %}
38             {% funding_top_bar %}
39           {% endcache %}
40         {% endif %}
41
42         <div id="whole-header">
43           <div id="header-wrapper">
44             <header id="main">
45               <a href="/" id="logo">
46                 <img src="{% static 'img/logo-neon.png' %}" alt="Wolne Lektury"/>
47               </a>
48
49               <p id="tagline">
50                 {% url 'book_list' as b %}
51                 {% url 'infopage' 'prawa' as r %}
52                 {% count_books book_count %}
53                 {% blocktrans count book_count as c %}
54                   <a href='{{ b }}'>{{ c }}</a> free reading you have <a href='{{ r }}'>right to</a>
55                 {% plural %}
56                   <a href='{{ b }}'>{{ c }}</a> free readings you have <a href='{{ r }}'>right to</a>
57                 {% endblocktrans %}
58               </p>
59
60               <div id="lang-menu" class="hoverget">
61                 <span id='lang-button' class='hoverclick'>
62                   <span class="lang-flag">⚐</span>
63                   <span class="label"> {% trans "Language" %}</span>
64                 </span>
65                 <div id="lang-menu-items">
66                   {% for lang in LANGUAGES %}
67                     <form action="{% url 'django.views.i18n.set_language' %}" method="post">
68                       {% ssi_csrf_token %}
69                       <input type="hidden" name="language" value="{{ lang.0 }}"/>
70                       <button type="submit" lang="{{ lang.0 }}"
71                               class="{% ifequal lang.0 LANGUAGE_CODE %}active{% endifequal %}">{{ lang.1 }}</button>
72                     </form>
73                   {% endfor %}
74                 </div>
75               </div>
76
77               <a id="show-menu"></a>
78               <nav id="menu">
79                 <ul id="user-info">
80                   {% user_username as user_username %}
81                   {% user_is_staff as user_is_staff %}
82                   {{ user_username.if }}
83                     <li>
84                       <a href="{% url 'user_settings' %}">
85                         <strong>{{ user_username }}</strong>
86                       </a>
87                     </li>
88                     <li>
89                       <a href="{% url 'social_my_shelf' %}" id="user-shelves-link">{% trans "My shelf" %}</a>
90                     </li>
91                   {{ user_username.endif }}
92                   {{ user_is_staff.if }}
93                     <li><a href="{% url 'admin:index' %}">{% trans "Administration" %}</a></li>
94                   {{ user_is_staff.endif }}
95                   {{ user_username.if }}
96                     <li>
97                       <a href="{% url 'logout' %}?next={% block logout %}{{ request.get_full_path }}{% endblock %}">{% trans "Logout" %}</a>
98                     </li>
99                   {{ user_username.else }}
100                     <li>
101                       <a href="{% url 'login' %}?next={{ request.path }}" id="login">{% trans "Sign in" %}</a>
102                       / <a href="{% url 'register' %}?next={{ request.path }}" id="register">{% trans "Register" %}</a>
103                     </li>
104                   {{ user_username.endif }}
105                 </ul>
106
107                 <ul id="main-menu">
108                   <li{% if active_menu_item == 'books' %} class="active"{% endif %}>
109                     <a href="{% url 'book_list' %}">{% trans "Literature" %}</a>
110                   </li>
111                   <li{% if active_menu_item == 'theme' %} class="active"{% endif %}>
112                     <a href="{% url 'theme_catalogue' %}">{% trans "Themes" %}</a>
113                   </li>
114                   <li{% if active_menu_item == 'audiobooks' %} class="active"{% endif %}>
115                     <a href="{% url 'audiobook_list' %}">{% trans "Audiobooks" %}</a>
116                   </li>
117                   <li{% if active_menu_item == 'gallery' %} class="active"{% endif %}>
118                     <a href="{% url 'gallery' %}">{% trans "Gallery" %}</a>
119                   </li>
120                   <li{% if active_menu_item == 'all_works' %} class="active"{% endif %}>
121                     <a href="{% url 'catalogue' %}">{% trans "All works" %}</a>
122                   </li>
123                 </ul>
124               </nav>
125               <form id="search-area" action="{% url 'search' %}">
126                 <div id="search-field">
127                   <label for="search">{{ search_form.q.label }}</label>
128                   {{ search_form.q }}
129                 </div>
130                 <button type='submit'>{% trans "Search" %}</button>
131               </form>
132             </header>
133           </div>
134         </div>
135
136         <div id="main-content">
137           {% comment %}
138           <div id="banners">
139             <a href="https://nowoczesnapolska.org.pl/pomoz-nam/wesprzyj-nas/">
140               <img src="{% static 'img/banners/960x150_wolneLektury.jpg' %}"
141                    alt="Wesprzyj działalność Nowoczesnej Polski"/>
142             </a>
143           </div>
144           {% endcomment %}
145           {% block body %}
146           {% endblock %}
147           <div class="clearboth"></div>
148         </div>
149
150         <div id="footer-wrapper">
151           <footer id="main">
152             {% ssi_include 'chunk' key='footer' %}
153             {% block add_footer %}{% endblock %}
154             {% ssi_include 'sponsor_page' name='footer' %}
155           </footer>
156         </div>
157
158         {# template #}
159         <div id="ajaxable-window" class='dialog-window'>
160           <div class="header"><a href="#" class="jqmClose">{% trans "Close" %}</a></div>
161           <div class="target">
162             <p><img src="{% static "img/indicator.gif" %}" alt="*"/> {% trans "Loading" %}</p>
163           </div>
164         </div>
165       {% endblock bodycontent %}
166
167       <script type="text/javascript" src="//ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"></script>
168       <script type="text/javascript">
169         var LANGUAGE_CODE = "{{ LANGUAGE_CODE }}";
170         var STATIC_URL = "{{ STATIC_URL }}";
171       </script>
172       {% javascript "base" %}
173
174       {% tracking_code %}
175
176       {% block extrabody %}{% endblock %}
177
178       <script src="{% static "js/contrib/modernizr.custom.19652.js" %}"></script>
179     </body>
180   </html>
181 {% endspaceless %}