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

Basic set of templates

parent d1a838f2
{% load i18n %}
<!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="{% trans "en" %}" lang="{% trans "en" %}">
<!--! This is main page template used for all other pages. -->
<head profile="http://purl.org/uF/2008/03/ http://purl.org/uF/hAtom/0.1/">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="author" content="Michal Čihař" />
<meta name="copyright" content="Copyright &copy; 2003 - {{ current_year }} Michal Čihař" />
<title>{{ title }}</title>
<link rel="stylesheet" type="text/css" href="/media/style.css" />
<link rel="shortcut icon" href="/favicon.ico" type="image/x-icon" />
<link rel="icon" href="/favicon.ico" type="image/x-icon" />
<meta name="robots" content="index, follow" />
</head>
<body>
<h1>{{ title }}</h1>
{% block content %}
{% endblock %}
</body>
</html>
{% load i18n %}
{% extends "base.html" %}
{% block content %}
<h2>Subprojects</h2>
<ul>
{% for prj in obj.subproject_set.all %}
<li><a href="{{ prj.get_absolute_url }}">{{ prj.name }}</a></li>
{% endfor %}
</ul>
{% endblock %}
{% load i18n %}
{% extends "base.html" %}
{% block content %}
<h2>Translations</h2>
<ul>
{% for trans in obj.translation_set.all %}
<li><a href="{{ trans.get_absolute_url }}">{{ trans.language.name }} ({{ trans.translated }}% translated)</a></li>
{% endfor %}
</ul>
{% endblock %}
{% load i18n %}
{% extends "base.html" %}
{% block content %}
<p>There is currently {{ obj.translated }}% translated, {{ obj.fuzzy }}% fuzzy.</p>
{% endblock %}
......@@ -8,6 +8,7 @@ def show_project(request, project):
return render_to_response('project.html', RequestContext({
'object': obj,
'title': '%s @ Weblate' % obj.name,
})
def show_subproject(request, project, subproject):
......@@ -15,12 +16,14 @@ def show_subproject(request, project, subproject):
return render_to_response('subproject.html', RequestContext({
'object': obj,
'title': '%s/%s @ Weblate' % (obj.name, obj.project.name),
})
def show_translation(request, project, subproject, lang):
obj = get_object_or_404(Language, language__code = lang, subproject__slug = subproject, subproject__project__slug = project)
return render_to_response('language.html', RequestContext({
return render_to_response('translation.html', RequestContext({
'object': obj,
'title': '%s %s/%s @ Weblate' % (obj.language.name, obj.subproject.name, obj.subproject.project.name),
})
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