Merge branch 'lucene_memory'
[wolnelektury.git] / apps / waiter / templates / waiter / wait.html
1 {% extends "base.html" %}
2 {% load i18n %}
3 {% load static from staticfiles %}
4 {% load url from future %}
5
6 {% block titleextra %}
7 {% if file_url %}
8     {% trans "The file is ready for download!" %}
9 {% else %}
10     {% if waiting %}
11         {% trans "Your file is being prepared, please wait." %}
12     {% else %}
13         {% trans "Something went wrong." %}
14     {% endif %}
15 {% endif %}
16 {% endblock %}
17
18
19 {% block extrahead %}
20 {% if file_url %}
21     <meta http-equiv="refresh" content="3; url={{ file_url }}" />
22 {% else %}
23     {% if waiting %}
24         <noscript>
25             <meta http-equiv="refresh" content="10" />
26         </noscript>
27     {% endif %}
28 {% endif %}
29 {% endblock %}
30
31
32 {% block body %}
33 {% if file_url %}
34     <h1>{% trans "The file is ready for download!" %}</h1>
35
36     <div class="normal-text white-box">
37     <p>{% blocktrans %}Your file is ready!
38         If the download doesn't start in a few seconds,
39         feel free to use this <a href="{{ file_url }}">direct link</a>.{% endblocktrans %}</p>
40     </div>
41 {% else %}
42  {% if waiting %}
43     <h1><img src="{% static "img/indicator.gif" %}" alt="{% trans 'Please wait' %}"/>
44         {% trans "Your file is being prepared, please wait." %}</h1>
45
46     <div class="normal-text">
47     <p>{% blocktrans with d=waiting.description %}The file you requested was: <em>{{d}}</em>.{% endblocktrans %}</p>
48
49     <p>{% blocktrans %}<strong>Be aware:</strong> Generating the file can take a while.
50         Please be patient, or bookmark this page and come back later.</p>{% endblocktrans %}
51     </div>
52  {% else %}
53     <h1>{% trans "Something went wrong." %}</h1>
54
55     <div class="normal-text">
56     {% url 'suggest' as s %}
57     <p>{% blocktrans %}Something seems to have gone wrong while generating your file.
58         Please order it again or <a id='suggest' class='ajaxable' href="{{s}}">complain to us</a> about it.{% endblocktrans %}</p>
59     </div>
60  {% endif %}
61 {% endif %}
62         
63 {% endblock %}
64
65 {% block extrabody %}
66 {% if waiting %}
67 <script language="JavaScript">
68 <!--
69 (function($) {
70     $(function(){
71
72 function wait() {
73     $.ajax({
74         href: '',
75         success: function(data) {
76             if (data) {
77                 location.reload();
78             }
79             else
80                 setTimeout(wait, 10*1000);
81         },
82         error: function(xhr) {
83             location.reload();
84         }
85     });
86 }
87 setTimeout(wait, 10*1000);
88
89     });
90 })(jQuery);
91 //-->
92 </script>
93 {% endif %}
94 {% endblock %}