Commit da3f993e authored by Michal Čihař's avatar Michal Čihař

Rearrange main page

- main content uses tabs
- loads languages/checks listings via AJAX
- issue #85
parent f2c30b25
{% load i18n %} {% load i18n %}
{% load url from future %} {% load url from future %}
{% if not request.is_ajax %}
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="{{ LANGUAGE_CODE }}" lang="{{ LANGUAGE_CODE }}"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="{{ LANGUAGE_CODE }}" lang="{{ LANGUAGE_CODE }}">
...@@ -67,8 +68,12 @@ ...@@ -67,8 +68,12 @@
{% endfor %} {% endfor %}
{% endif %} {% endif %}
{% endif %}
{% block content %} {% block content %}
{% endblock %} {% endblock %}
{% if not request.is_ajax %}
</div> </div>
<ul class="footer"> <ul class="footer">
<li>{% blocktrans %}Powered by <a href="http://weblate.org">Weblate {{ version }}</a>{% endblocktrans %}</li> <li>{% blocktrans %}Powered by <a href="http://weblate.org">Weblate {{ version }}</a>{% endblocktrans %}</li>
...@@ -78,5 +83,4 @@ ...@@ -78,5 +83,4 @@
</ul> </ul>
</body> </body>
</html> </html>
{% endif %}
...@@ -10,17 +10,27 @@ ...@@ -10,17 +10,27 @@
</p> </p>
{% endif %} {% endif %}
<h2>{% trans "Translations" %}</h2>
<div class="tabs" id="index-tabs">
<ul>
{% if usertranslations %} {% if usertranslations %}
<h2>{% trans "Your translations" %}</h2> <li><a href="#your">{% trans "Your translations" %}</a></li>
{% endif %}
<li><a href="#projects">{% trans "Projects" %}</a></li>
<li><a href="/languages/">{% trans "Languages" %}</a></li>
<li><a href="/checks/">{% trans "Checks" %}</a></li>
</ul>
{% if usertranslations %}
<div id="your">
{% with usertranslations as translations %} {% with usertranslations as translations %}
{% include "list-translations.html" %} {% include "list-translations.html" %}
{% endwith %} {% endwith %}
</div>
{% endif %} {% endif %}
<h2>{% trans "Projects" %}</h2> <div id="projects">
<table class="sort"> <table class="sort">
<thead> <thead>
<tr> <tr>
...@@ -39,6 +49,7 @@ ...@@ -39,6 +49,7 @@
{% endfor %} {% endfor %}
</tbody> </tbody>
</table> </table>
</div>
<h2>{% trans "Summaries" %}</h2> <h2>{% trans "Summaries" %}</h2>
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment