dynamic catalogue menu
[wolnelektury.git] / wolnelektury / templates / base.html
1 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
2     "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
3 <html xmlns="http://www.w3.org/1999/xhtml">
4         {% load cache compressed i18n %}
5     {% load catalogue_tags reporting_stats sponsor_tags %}
6     <head>
7         <meta http-equiv="Content-type" content="text/html; charset=utf-8" />
8         <meta http-equiv="Content-Style-Type" content="text/css" />
9         <meta name="description" 
10             content="{% block metadescription %}Darmowe opracowane, pełne teksty lektur, e-booki, audiobooki i pliki DAISY na wolnej licencji.{% endblock %}" />
11         <title>{% block title %}{% trans "Wolne Lektury" %} :: 
12             {% block titleextra %}{% endblock %}{% endblock %}</title>
13         <link rel="icon" href="{{ STATIC_URL }}img/favicon.png" type="image/png" />
14         <link rel="search" type="application/opensearchdescription+xml" title="Wolne Lektury" href="{{ STATIC_URL }}opensearch.xml" />
15         {% compressed_css "all" %}
16
17         {% block extrahead %}
18         {% endblock %}
19     </head>
20     <body id="{% block bodyid %}base{% endblock %}">
21
22         {% block bodycontent %}
23
24         <div id="header">
25
26         <div id="header-content">
27             <div id="logo">
28                 <a class="logo" href="/">
29                 Wolne Lektury</a>
30             </div>
31
32             <div id="tagline">
33                 <span>
34                 {% cache 300 tagline LANGUAGE_CODE %}
35                     {% url book_list as b %}
36                     {% url book_list as r %}
37                         {% count_books book_count %}
38                     {% blocktrans count book_count as c %}
39                     <a href='{{b}}'>{{c}}</a> free reading you have <a href='{{r}}'>right to</a>
40                     {% plural %}
41                     <a href='{{b}}'>{{c}}</a> free readings you have <a href='{{r}}'>right to</a>
42                     {% endblocktrans %}
43                 {% endcache %}
44                 </span>
45             </div>
46
47             <p id="user-info" class="mono">
48                 {% if user.is_authenticated %}
49                     {% trans "Welcome" %}, <strong>{{ user.username }}</strong>
50                     | <a href="{% url social_my_shelf %}" id="user-shelves-link">{% trans "My shelf" %}</a>
51                     {% if user.is_staff %}
52                     | <a href="/admin/">{% trans "Administration" %}</a>
53                     {% endif %}
54                     | <a href="{% url logout %}?next={% block logout %}{{ request.get_full_path }}{% endblock %}">{% trans "Logout" %}</a>
55                 {% else %}
56                     <a href="{% url login %}?next={{ request.path }}"
57                         id="login" class="ajaxable">
58                             {% trans "Sign in" %}</a>
59                     /
60                     <a href="{% url register %}?next={{ request.path }}"
61                         id="register" class="ajaxable">
62                             {% trans "Register" %}</a>
63                 {% endif %}
64             </p>
65
66
67             <div class="clearboth"></div>
68
69         </div>
70         </div>
71
72         <div id="half-header">
73         <div id="half-header-content">
74
75
76
77             <form id="search-area" action="/fullsearch/">
78                 
79                 <span id="search-field" class="grid-line">
80                   {{search_form.q}}
81 <!--                    <input title="np. Leśmian" name="q" autocomplete="off" data-source="/fullsearch/hint/">-->
82                 </span><span id="search-button">
83                     <button type='submit'><span class="mono">{% trans "Search" %}</span></button>
84                 </span>
85                 
86                 <div class="clearboth"></div>
87             </form>
88
89
90
91         </div>
92         </div>
93
94
95
96         <div id="main-content">
97
98             <div id="nav-line">
99                 {% cache 300 catalogue-menu LANGUAGE_CODE %}
100                         {% catalogue_menu %}
101                 {% endcache %}
102
103             <form action="{% url django.views.i18n.set_language %}" method="post">
104             <div id="lang-menu">
105                 <span id='lang-button' class='mono'>
106                     {% trans "Language versions" %}</span>
107                 <div id="lang-menu-items">
108                 {% for lang in LANGUAGES %}
109                     <button type="submit" name="language"
110                         class="{% ifequal lang.0 LANGUAGE_CODE %}active{% endifequal %} mono"
111                         value="{{ lang.0 }}">{{ lang.1 }}</button>
112                 {% endfor %}
113                 </div>
114             </div>
115             </form>
116             </div>
117
118             <div class="clearboth"></div>
119
120
121
122             {% block body %}
123             {% endblock %}
124
125
126
127
128         <div class="clearboth"></div>
129
130         </div>{# end main-content #}
131
132
133         <div id="footer">
134         <div id="footer-content">
135             <p>
136                 {% blocktrans %}
137                                 Wolne Lektury is a project lead by <a href="http://nowoczesnapolska.org.pl/">Modern Poland Foundation</a>.
138                                 Digital reproductions are made by <a href="http://www.bn.org.pl/">The National Library</a>, <a href="http://www.bs.katowice.pl/">Biblioteka Śląska</a> and <a href="http://www.bibliotekaelblaska.pl/">Biblioteka Elbląska</a>, based on TNL, BŚ and BE resources.
139                                 Hosting: <a href="http://www.icm.edu.pl/">ICM</a>.
140                                 {% endblocktrans %}
141             </p>
142             <p>
143                 {% blocktrans %}
144                                 Modern Poland Foundation, 00-514 Warsaw, ul. Marszałkowska 84/92 lok. 125, tel/fax: (22) 621-30-17
145                 e-mail: <a href="mailto:fundacja@nowoczesnapolska.org.pl">fundacja@nowoczesnapolska.org.pl</a>
146                                 {% endblocktrans %}
147             </p>
148
149             {% block add_footer %}{% endblock %}
150
151                         {% sponsor_page "footer" %}
152         </div>
153         </div>
154
155
156
157         {# template #}
158         <div id="ajaxable-window" class='dialog-window'>
159             <div class="header mono"><a href="#" class="jqmClose">{% trans "Close" %}</a></div>
160             <div class="target">
161                 <p><img src="{{ STATIC_URL }}img/indicator.gif" alt="*"/> {% trans "Loading" %}</p>
162             </div>
163         </div>
164
165
166         {% endblock bodycontent %}
167
168
169         <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"></script>
170         <script type="text/javascript">
171             var LANGUAGE_CODE = "{{ LANGUAGE_CODE }}";
172             var STATIC_URL = "{{ STATIC_URL }}";
173         </script>
174         {% compressed_js "base" %}
175
176         <!--{{ piwik_tag|safe }}
177         <script type="text/javascript">
178         var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
179         document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
180         </script>
181         <script type="text/javascript">
182         var pageTracker = _gat._getTracker("UA-2576694-1");
183         pageTracker._trackPageview();
184         </script>-->
185     </body>
186 </html>