1 {% extends basetemplate %}
6 {% trans "XML data exporter" %}
8 {% block description %}
9 {% trans "Export database to XML format" %}
13 <style type="text/css">
17 border: 1px solid black;
50 <script type="text/javascript">
54 function set_state(name, data) {
55 var $bar = $('#state_' + name);
57 if (data[name] === undefined) {
58 $bar.find('.state_label').html('{% trans "Skiped" %}')
59 } else if (state == null || data[name] != state[name]) {
60 var width = $bar.width();
62 $bar.find('.state_parsed').html(data[name].parsed);
63 $bar.find('.state_count').html(data[name].count);
64 $bar.find('.state_status').html(data[name].status);
66 var rel_parse = data[name].parsed / data[name].count;
68 $bar.find('.state_percentage').html(parseInt(rel_parse * 100) + '%');
69 $bar.find('.progress').css('width', parseInt(rel_parse * width) + 'px')
73 function check_state() {
74 $.getJSON('{% url exporter_state %}', function(data) {
75 set_state('overall', data.state)
77 set_state('{{ s.id }}', data.state);
80 $('#time_started').html(data.time_started);
87 if (data.errors == false) {
88 $('#wait_message').html('{% trans "Your backup is ready to be downloaded."%}')
89 $('#download_link').slideDown();
91 $('#wait_message').html('{% trans "An error has occurred during de export proccess: "%}' + data.errors + '<br />' +
92 '{% trans "Please check the log file for a full stack trace." %}')
103 {% block admincontent %}
104 <p id="wait_message">
105 {% trans "Please wait while we prepare your backup file to download." %} -
107 Started <span id="time_started"></span>
110 <p id="download_link"><a href="{% url exporter_download %}">{% trans "Download file" %}</a></p>
111 <table style="width: 100%">
114 <div class="state_bar" id="state_overall">
115 <div class="state_label"><span class="state_status"></span> ({% trans "Total progress" %}: <span class="state_percentage">0%</span>)</div>
116 <div class="progress"></div>
122 <td>{{ s.name }}:</td>
124 <div class="state_bar" id="state_{{ s.id }}">
125 <div class="state_label"><span class="state_status"></span> - </span><span class="state_parsed">0</span> {% trans " of " %} <span class="state_count">{% trans "unknown" %}</span> (<span class="state_percentage">0%</span>)</div>
126 <div class="progress"></div>