mirror of https://github.com/django/django.git
Fixed #8172 -- Improved a whole bunch of contrib templates (admin, databrowse, admindocs, etc.) to remove unnecessary 'escape' filters, given autoescaping. Also removed unnecessary {% if %} tags and shortened some {% if %}/{% else %} tags to use {% firstof %}. Thanks for the patch, benspaulding
git-svn-id: http://code.djangoproject.com/svn/django/trunk@8984 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
parent
a5e0c5b182
commit
6bdb7b9529
|
@ -8,8 +8,8 @@
|
||||||
{% block breadcrumbs %}{% if not is_popup %}
|
{% block breadcrumbs %}{% if not is_popup %}
|
||||||
<div class="breadcrumbs">
|
<div class="breadcrumbs">
|
||||||
<a href="../../../../">{% trans "Home" %}</a> ›
|
<a href="../../../../">{% trans "Home" %}</a> ›
|
||||||
<a href="../../">{{ opts.verbose_name_plural|capfirst|escape }}</a> ›
|
<a href="../../">{{ opts.verbose_name_plural|capfirst }}</a> ›
|
||||||
<a href="../">{{ original|truncatewords:"18"|escape }}</a> ›
|
<a href="../">{{ original|truncatewords:"18" }}</a> ›
|
||||||
{% trans 'Change password' %}
|
{% trans 'Change password' %}
|
||||||
</div>
|
</div>
|
||||||
{% endif %}{% endblock %}
|
{% endif %}{% endblock %}
|
||||||
|
@ -23,7 +23,7 @@
|
||||||
</p>
|
</p>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
<p>{% blocktrans with original.username|escape as username %}Enter a new password for the user <strong>{{ username }}</strong>.{% endblocktrans %}</p>
|
<p>{% blocktrans with original.username as username %}Enter a new password for the user <strong>{{ username }}</strong>.{% endblocktrans %}</p>
|
||||||
|
|
||||||
<fieldset class="module aligned">
|
<fieldset class="module aligned">
|
||||||
|
|
||||||
|
|
|
@ -22,22 +22,22 @@
|
||||||
{% block branding %}{% endblock %}
|
{% block branding %}{% endblock %}
|
||||||
</div>
|
</div>
|
||||||
{% if user.is_authenticated and user.is_staff %}
|
{% if user.is_authenticated and user.is_staff %}
|
||||||
<div id="user-tools">{% trans 'Welcome,' %} <strong>{% if user.first_name %}{{ user.first_name|escape }}{% else %}{{ user.username }}{% endif %}</strong>. {% block userlinks %}{% url django-admindocs-docroot as docsroot %}{% if docsroot %}<a href="{{ docsroot }}">{% trans 'Documentation' %}</a> / {% endif %}<a href="{{ root_path }}password_change/">{% trans 'Change password' %}</a> / <a href="{{ root_path }}logout/">{% trans 'Log out' %}</a>{% endblock %}</div>
|
<div id="user-tools">{% trans 'Welcome,' %} <strong>{% firstof user.first_name user.username %}</strong>. {% block userlinks %}{% url django-admindocs-docroot as docsroot %}{% if docsroot %}<a href="{{ docsroot }}">{% trans 'Documentation' %}</a> / {% endif %}<a href="{{ root_path }}password_change/">{% trans 'Change password' %}</a> / <a href="{{ root_path }}logout/">{% trans 'Log out' %}</a>{% endblock %}</div>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% block nav-global %}{% endblock %}
|
{% block nav-global %}{% endblock %}
|
||||||
</div>
|
</div>
|
||||||
<!-- END Header -->
|
<!-- END Header -->
|
||||||
{% block breadcrumbs %}<div class="breadcrumbs"><a href="/">{% trans 'Home' %}</a>{% if title %} › {{ title|escape }}{% endif %}</div>{% endblock %}
|
{% block breadcrumbs %}<div class="breadcrumbs"><a href="/">{% trans 'Home' %}</a>{% if title %} › {{ title }}{% endif %}</div>{% endblock %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
{% if messages %}
|
{% if messages %}
|
||||||
<ul class="messagelist">{% for message in messages %}<li>{{ message|escape }}</li>{% endfor %}</ul>
|
<ul class="messagelist">{% for message in messages %}<li>{{ message }}</li>{% endfor %}</ul>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
<!-- Content -->
|
<!-- Content -->
|
||||||
<div id="content" class="{% block coltype %}colM{% endblock %}">
|
<div id="content" class="{% block coltype %}colM{% endblock %}">
|
||||||
{% block pretitle %}{% endblock %}
|
{% block pretitle %}{% endblock %}
|
||||||
{% block content_title %}{% if title %}<h1>{{ title|escape }}</h1>{% endif %}{% endblock %}
|
{% block content_title %}{% if title %}<h1>{{ title }}</h1>{% endif %}{% endblock %}
|
||||||
{% block content %}
|
{% block content %}
|
||||||
{% block object-tools %}{% endblock %}
|
{% block object-tools %}{% endblock %}
|
||||||
{{ content }}
|
{{ content }}
|
||||||
|
|
|
@ -5,7 +5,7 @@
|
||||||
|
|
||||||
{% block bodyclass %}change-list{% endblock %}
|
{% block bodyclass %}change-list{% endblock %}
|
||||||
|
|
||||||
{% if not is_popup %}{% block breadcrumbs %}<div class="breadcrumbs"><a href="../../">{% trans "Home" %}</a> › <a href="../">{{ app_label|capfirst|escape }}</a> › {{ cl.opts.verbose_name_plural|capfirst|escape }}</div>{% endblock %}{% endif %}
|
{% if not is_popup %}{% block breadcrumbs %}<div class="breadcrumbs"><a href="../../">{% trans "Home" %}</a> › <a href="../">{{ app_label|capfirst }}</a> › {{ cl.opts.verbose_name_plural|capfirst }}</div>{% endblock %}{% endif %}
|
||||||
|
|
||||||
{% block coltype %}flex{% endblock %}
|
{% block coltype %}flex{% endblock %}
|
||||||
|
|
||||||
|
@ -13,7 +13,7 @@
|
||||||
<div id="content-main">
|
<div id="content-main">
|
||||||
{% block object-tools %}
|
{% block object-tools %}
|
||||||
{% if has_add_permission %}
|
{% if has_add_permission %}
|
||||||
<ul class="object-tools"><li><a href="add/{% if is_popup %}?_popup=1{% endif %}" class="addlink">{% blocktrans with cl.opts.verbose_name|escape as name %}Add {{ name }}{% endblocktrans %}</a></li></ul>
|
<ul class="object-tools"><li><a href="add/{% if is_popup %}?_popup=1{% endif %}" class="addlink">{% blocktrans with cl.opts.verbose_name as name %}Add {{ name }}{% endblocktrans %}</a></li></ul>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
<div class="module{% if cl.has_filters %} filtered{% endif %}" id="changelist">
|
<div class="module{% if cl.has_filters %} filtered{% endif %}" id="changelist">
|
||||||
|
|
|
@ -4,23 +4,23 @@
|
||||||
{% block breadcrumbs %}
|
{% block breadcrumbs %}
|
||||||
<div class="breadcrumbs">
|
<div class="breadcrumbs">
|
||||||
<a href="../../../../">{% trans "Home" %}</a> ›
|
<a href="../../../../">{% trans "Home" %}</a> ›
|
||||||
<a href="../../../">{{ app_label|capfirst|escape }}</a> ›
|
<a href="../../../">{{ app_label|capfirst }}</a> ›
|
||||||
<a href="../../">{{ opts.verbose_name_plural|capfirst }}</a> ›
|
<a href="../../">{{ opts.verbose_name_plural|capfirst }}</a> ›
|
||||||
<a href="../">{{ object|escape|truncatewords:"18" }}</a> ›
|
<a href="../">{{ object|truncatewords:"18" }}</a> ›
|
||||||
{% trans 'Delete' %}
|
{% trans 'Delete' %}
|
||||||
</div>
|
</div>
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
||||||
{% block content %}
|
{% block content %}
|
||||||
{% if perms_lacking %}
|
{% if perms_lacking %}
|
||||||
<p>{% blocktrans with object|escape as escaped_object %}Deleting the {{ object_name }} '{{ escaped_object }}' would result in deleting related objects, but your account doesn't have permission to delete the following types of objects:{% endblocktrans %}</p>
|
<p>{% blocktrans with object as escaped_object %}Deleting the {{ object_name }} '{{ escaped_object }}' would result in deleting related objects, but your account doesn't have permission to delete the following types of objects:{% endblocktrans %}</p>
|
||||||
<ul>
|
<ul>
|
||||||
{% for obj in perms_lacking %}
|
{% for obj in perms_lacking %}
|
||||||
<li>{{ obj }}</li>
|
<li>{{ obj }}</li>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</ul>
|
</ul>
|
||||||
{% else %}
|
{% else %}
|
||||||
<p>{% blocktrans with object|escape as escaped_object %}Are you sure you want to delete the {{ object_name }} "{{ escaped_object }}"? All of the following related items will be deleted:{% endblocktrans %}</p>
|
<p>{% blocktrans with object as escaped_object %}Are you sure you want to delete the {{ object_name }} "{{ escaped_object }}"? All of the following related items will be deleted:{% endblocktrans %}</p>
|
||||||
<ul>{{ deleted_objects|unordered_list }}</ul>
|
<ul>{{ deleted_objects|unordered_list }}</ul>
|
||||||
<form action="" method="post">
|
<form action="" method="post">
|
||||||
<div>
|
<div>
|
||||||
|
|
|
@ -3,13 +3,13 @@
|
||||||
<div class="tabular inline-related {% if forloop.last %}last-related{% endif %}">
|
<div class="tabular inline-related {% if forloop.last %}last-related{% endif %}">
|
||||||
{{ inline_admin_formset.formset.management_form }}
|
{{ inline_admin_formset.formset.management_form }}
|
||||||
<fieldset class="module">
|
<fieldset class="module">
|
||||||
<h2>{{ inline_admin_formset.opts.verbose_name_plural|capfirst|escape }}</h2>
|
<h2>{{ inline_admin_formset.opts.verbose_name_plural|capfirst }}</h2>
|
||||||
{{ inline_admin_formset.formset.non_form_errors }}
|
{{ inline_admin_formset.formset.non_form_errors }}
|
||||||
<table>
|
<table>
|
||||||
<thead><tr>
|
<thead><tr>
|
||||||
{% for field in inline_admin_formset.fields %}
|
{% for field in inline_admin_formset.fields %}
|
||||||
{% if not field.is_hidden %}
|
{% if not field.is_hidden %}
|
||||||
<th {% if forloop.first %}colspan="2"{% endif %}>{{ field.label|capfirst|escape }}</th>
|
<th {% if forloop.first %}colspan="2"{% endif %}>{{ field.label|capfirst }}</th>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
{% if inline_admin_formset.formset.can_delete %}<th>{% trans "Delete?" %}</th>{% endif %}
|
{% if inline_admin_formset.formset.can_delete %}<th>{% trans "Delete?" %}</th>{% endif %}
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
{% load i18n %}
|
{% load i18n %}
|
||||||
<h3>{% blocktrans with title|escape as filter_title %} By {{ filter_title }} {% endblocktrans %}</h3>
|
<h3>{% blocktrans with title as filter_title %} By {{ filter_title }} {% endblocktrans %}</h3>
|
||||||
<ul>
|
<ul>
|
||||||
{% for choice in choices %}
|
{% for choice in choices %}
|
||||||
<li{% if choice.selected %} class="selected"{% endif %}>
|
<li{% if choice.selected %} class="selected"{% endif %}>
|
||||||
<a href="{{ choice.query_string|iriencode }}">{{ choice.display|escape }}</a></li>
|
<a href="{{ choice.query_string|iriencode }}">{{ choice.display }}</a></li>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</ul>
|
</ul>
|
||||||
|
|
|
@ -59,7 +59,7 @@
|
||||||
{% else %}
|
{% else %}
|
||||||
<ul class="actionlist">
|
<ul class="actionlist">
|
||||||
{% for entry in admin_log %}
|
{% for entry in admin_log %}
|
||||||
<li class="{% if entry.is_addition %}addlink{% endif %}{% if entry.is_change %}changelink{% endif %}{% if entry.is_deletion %}deletelink{% endif %}">{% if not entry.is_deletion %}<a href="{{ entry.get_admin_url }}">{% endif %}{{ entry.object_repr|escape }}{% if not entry.is_deletion %}</a>{% endif %}<br /><span class="mini quiet">{% filter capfirst %}{% trans entry.content_type.name %}{% endfilter %}</span></li>
|
<li class="{% if entry.is_addition %}addlink{% endif %}{% if entry.is_change %}changelink{% endif %}{% if entry.is_deletion %}deletelink{% endif %}">{% if not entry.is_deletion %}<a href="{{ entry.get_admin_url }}">{% endif %}{{ entry.object_repr }}{% if not entry.is_deletion %}</a>{% endif %}<br /><span class="mini quiet">{% filter capfirst %}{% trans entry.content_type.name %}{% endfilter %}</span></li>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</ul>
|
</ul>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
{% block breadcrumbs %}
|
{% block breadcrumbs %}
|
||||||
<div class="breadcrumbs">
|
<div class="breadcrumbs">
|
||||||
<a href="../../../../">{% trans 'Home' %}</a> ›
|
<a href="../../../../">{% trans 'Home' %}</a> ›
|
||||||
<a href="../../../">{{ app_label|capfirst|escape }}</a> ›
|
<a href="../../../">{{ app_label|capfirst }}</a> ›
|
||||||
<a href="../../">{{ module_name }}</a> ›
|
<a href="../../">{{ module_name }}</a> ›
|
||||||
<a href="../">{{ object|truncatewords:"18" }}</a> ›
|
<a href="../">{{ object|truncatewords:"18" }}</a> ›
|
||||||
{% trans 'History' %}
|
{% trans 'History' %}
|
||||||
|
@ -28,7 +28,7 @@
|
||||||
{% for action in action_list %}
|
{% for action in action_list %}
|
||||||
<tr>
|
<tr>
|
||||||
<th scope="row">{{ action.action_time|date:_("DATETIME_FORMAT") }}</th>
|
<th scope="row">{{ action.action_time|date:_("DATETIME_FORMAT") }}</th>
|
||||||
<td>{{ action.user.username }}{% if action.user.first_name %} ({{ action.user.first_name }} {{ action.user.last_name }}){% endif %}</td>
|
<td>{{ action.user.username }}{% if action.user.get_full_name %} ({{ action.user.get_full_name }}){% endif %}</td>
|
||||||
<td>{{ action.change_message }}</td>
|
<td>{{ action.change_message }}</td>
|
||||||
</tr>
|
</tr>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
|
|
|
@ -6,6 +6,6 @@
|
||||||
{% paginator_number cl i %}
|
{% paginator_number cl i %}
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{{ cl.result_count }} {% ifequal cl.result_count 1 %}{{ cl.opts.verbose_name|escape }}{% else %}{{ cl.opts.verbose_name_plural }}{% endifequal %}
|
{{ cl.result_count }} {% ifequal cl.result_count 1 %}{{ cl.opts.verbose_name }}{% else %}{{ cl.opts.verbose_name_plural }}{% endifequal %}
|
||||||
{% if show_all_url %} <a href="{{ show_all_url }}" class="showall">{% trans 'Show all' %}</a>{% endif %}
|
{% if show_all_url %} <a href="{{ show_all_url }}" class="showall">{% trans 'Show all' %}</a>{% endif %}
|
||||||
</p>
|
</p>
|
||||||
|
|
|
@ -4,13 +4,13 @@
|
||||||
<div id="toolbar"><form id="changelist-search" action="" method="get">
|
<div id="toolbar"><form id="changelist-search" action="" method="get">
|
||||||
<div><!-- DIV needed for valid HTML -->
|
<div><!-- DIV needed for valid HTML -->
|
||||||
<label for="searchbar"><img src="{% admin_media_prefix %}img/admin/icon_searchbox.png" alt="Search" /></label>
|
<label for="searchbar"><img src="{% admin_media_prefix %}img/admin/icon_searchbox.png" alt="Search" /></label>
|
||||||
<input type="text" size="40" name="{{ search_var }}" value="{{ cl.query|escape }}" id="searchbar" />
|
<input type="text" size="40" name="{{ search_var }}" value="{{ cl.query }}" id="searchbar" />
|
||||||
<input type="submit" value="{% trans 'Go' %}" />
|
<input type="submit" value="{% trans 'Go' %}" />
|
||||||
{% if show_result_count %}
|
{% if show_result_count %}
|
||||||
<span class="small quiet">{% blocktrans count cl.result_count as counter %}1 result{% plural %}{{ counter }} results{% endblocktrans %} (<a href="?{% if cl.is_popup %}pop=1{% endif %}">{% blocktrans with cl.full_result_count as full_result_count %}{{ full_result_count }} total{% endblocktrans %}</a>)</span>
|
<span class="small quiet">{% blocktrans count cl.result_count as counter %}1 result{% plural %}{{ counter }} results{% endblocktrans %} (<a href="?{% if cl.is_popup %}pop=1{% endif %}">{% blocktrans with cl.full_result_count as full_result_count %}{{ full_result_count }} total{% endblocktrans %}</a>)</span>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% for pair in cl.params.items %}
|
{% for pair in cl.params.items %}
|
||||||
{% ifnotequal pair.0 search_var %}<input type="hidden" name="{{ pair.0|escape }}" value="{{ pair.1|escape }}"/>{% endifnotequal %}
|
{% ifnotequal pair.0 search_var %}<input type="hidden" name="{{ pair.0 }}" value="{{ pair.1 }}"/>{% endifnotequal %}
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</div>
|
</div>
|
||||||
</form></div>
|
</form></div>
|
||||||
|
|
|
@ -12,11 +12,11 @@
|
||||||
|
|
||||||
<fieldset class="module aligned">
|
<fieldset class="module aligned">
|
||||||
<div class="form-row{% if form.errors.site %} error{% endif %} required">
|
<div class="form-row{% if form.errors.site %} error{% endif %} required">
|
||||||
{% if form.errors.site %}{{ form.errors.site }}{% endif %}
|
{{ form.errors.site }}
|
||||||
<h4><label for="id_site">{{ form.site.label }}:</label> {{ form.site }}</h4>
|
<h4><label for="id_site">{{ form.site.label }}:</label> {{ form.site }}</h4>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-row{% if form.errors.template %} error{% endif %} required">
|
<div class="form-row{% if form.errors.template %} error{% endif %} required">
|
||||||
{% if form.errors.template %}{{ form.errors.template }}{% endif %}
|
{{ form.errors.template }}
|
||||||
<h4><label for="id_template">{{ form.template.label }}:</label> {{ form.template }}</h4>
|
<h4><label for="id_template">{{ form.template.label }}:</label> {{ form.template }}</h4>
|
||||||
</div>
|
</div>
|
||||||
</fieldset>
|
</fieldset>
|
||||||
|
|
|
@ -13,11 +13,11 @@
|
||||||
|
|
||||||
<form action="" method="post">
|
<form action="" method="post">
|
||||||
|
|
||||||
{% if form.old_password.errors %}{{ form.old_password.errors }}{% endif %}
|
{{ form.old_password.errors }}
|
||||||
<p class="aligned wide"><label for="id_old_password">{% trans 'Old password:' %}</label>{{ form.old_password }}</p>
|
<p class="aligned wide"><label for="id_old_password">{% trans 'Old password:' %}</label>{{ form.old_password }}</p>
|
||||||
{% if form.new_password1.errors %}{{ form.new_password1.errors }}{% endif %}
|
{{ form.new_password1.errors }}
|
||||||
<p class="aligned wide"><label for="id_new_password1">{% trans 'New password:' %}</label>{{ form.new_password1 }}</p>
|
<p class="aligned wide"><label for="id_new_password1">{% trans 'New password:' %}</label>{{ form.new_password1 }}</p>
|
||||||
{% if form.new_password2.errors %}{{ form.new_password2.errors }}{% endif %}
|
{{ form.new_password2.errors }}
|
||||||
<p class="aligned wide"><label for="id_new_password2">{% trans 'Confirm password:' %}</label>{{ form.new_password2 }}</p>
|
<p class="aligned wide"><label for="id_new_password2">{% trans 'Confirm password:' %}</label>{{ form.new_password2 }}</p>
|
||||||
|
|
||||||
<p><input type="submit" value="{% trans 'Change my password' %}" /></p>
|
<p><input type="submit" value="{% trans 'Change my password' %}" /></p>
|
||||||
|
|
|
@ -14,9 +14,9 @@
|
||||||
<p>{% trans "Please enter your new password twice so we can verify you typed it in correctly." %}</p>
|
<p>{% trans "Please enter your new password twice so we can verify you typed it in correctly." %}</p>
|
||||||
|
|
||||||
<form action="" method="post">
|
<form action="" method="post">
|
||||||
{% if form.new_password1.errors %}{{ form.new_password1.errors }}{% endif %}
|
{{ form.new_password1.errors }}
|
||||||
<p class="aligned wide"><label for="id_new_password1">{% trans 'New password:' %}</label>{{ form.new_password1 }}</p>
|
<p class="aligned wide"><label for="id_new_password1">{% trans 'New password:' %}</label>{{ form.new_password1 }}</p>
|
||||||
{% if form.new_password2.errors %}{{ form.new_password2.errors }}{% endif %}
|
{{ form.new_password2.errors }}
|
||||||
<p class="aligned wide"><label for="id_new_password2">{% trans 'Confirm password:' %}</label>{{ form.new_password2 }}</p>
|
<p class="aligned wide"><label for="id_new_password2">{% trans 'Confirm password:' %}</label>{{ form.new_password2 }}</p>
|
||||||
<p><input type="submit" value="{% trans 'Change my password' %}" /></p>
|
<p><input type="submit" value="{% trans 'Change my password' %}" /></p>
|
||||||
</form>
|
</form>
|
||||||
|
|
|
@ -12,7 +12,7 @@
|
||||||
<p>{% trans "Forgotten your password? Enter your e-mail address below, and we'll e-mail instructions for setting a new one." %}</p>
|
<p>{% trans "Forgotten your password? Enter your e-mail address below, and we'll e-mail instructions for setting a new one." %}</p>
|
||||||
|
|
||||||
<form action="" method="post">
|
<form action="" method="post">
|
||||||
{% if form.email.errors %}{{ form.email.errors }}{% endif %}
|
{{ form.email.errors }}
|
||||||
<p><label for="id_email">{% trans 'E-mail address:' %}</label> {{ form.email }} <input type="submit" value="{% trans 'Reset my password' %}" /></p>
|
<p><label for="id_email">{% trans 'E-mail address:' %}</label> {{ form.email }} <input type="submit" value="{% trans 'Reset my password' %}" /></p>
|
||||||
</form>
|
</form>
|
||||||
|
|
||||||
|
|
|
@ -34,7 +34,7 @@
|
||||||
<tr>
|
<tr>
|
||||||
<td>{{ field.name }}</td>
|
<td>{{ field.name }}</td>
|
||||||
<td>{{ field.data_type }}</td>
|
<td>{{ field.data_type }}</td>
|
||||||
<td>{% if field.verbose %}{{ field.verbose }}{% endif %}{% if field.help_text %} - {{ field.help_text|safe }}{% endif %}</td>
|
<td>{{ field.verbose }}{% if field.help_text %} - {{ field.help_text|safe }}{% endif %}</td>
|
||||||
</tr>
|
</tr>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</tbody>
|
</tbody>
|
||||||
|
|
|
@ -1,18 +1,18 @@
|
||||||
{% extends "admin/base_site.html" %}
|
{% extends "admin/base_site.html" %}
|
||||||
{% load i18n %}
|
{% load i18n %}
|
||||||
{% block breadcrumbs %}<div class="breadcrumbs"><a href="../../../">Home</a> › <a href="../../">Documentation</a> › Templates › {{ name|escape }}</div>{% endblock %}
|
{% block breadcrumbs %}<div class="breadcrumbs"><a href="../../../">Home</a> › <a href="../../">Documentation</a> › Templates › {{ name }}</div>{% endblock %}
|
||||||
|
|
||||||
{% block title %}Template: {{ name|escape }}{% endblock %}
|
{% block title %}Template: {{ name }}{% endblock %}
|
||||||
|
|
||||||
{% block content %}
|
{% block content %}
|
||||||
<h1>Template: "{{ name|escape }}"</h1>
|
<h1>Template: "{{ name }}"</h1>
|
||||||
|
|
||||||
{% regroup templates|dictsort:"site_id" by site as templates_by_site %}
|
{% regroup templates|dictsort:"site_id" by site as templates_by_site %}
|
||||||
{% for group in templates_by_site %}
|
{% for group in templates_by_site %}
|
||||||
<h2>Search path for template "{{ name|escape }}" on {{ group.grouper }}:</h2>
|
<h2>Search path for template "{{ name }}" on {{ group.grouper }}:</h2>
|
||||||
<ol>
|
<ol>
|
||||||
{% for template in group.list|dictsort:"order" %}
|
{% for template in group.list|dictsort:"order" %}
|
||||||
<li><code>{{ template.file|escape }}</code>{% if not template.exists %} <em>(does not exist)</em>{% endif %}</li>
|
<li><code>{{ template.file }}</code>{% if not template.exists %} <em>(does not exist)</em>{% endif %}</li>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</ol>
|
</ol>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
|
|
|
@ -12,7 +12,7 @@
|
||||||
{% regroup filters|dictsort:"library" by library as filter_libraries %}
|
{% regroup filters|dictsort:"library" by library as filter_libraries %}
|
||||||
{% for library in filter_libraries %}
|
{% for library in filter_libraries %}
|
||||||
<div class="module">
|
<div class="module">
|
||||||
<h2>{% if library.grouper %}{{ library.grouper }}{% else %}Built-in filters{% endif %}</h2>
|
<h2>{% firstof library.grouper "Built-in filters" %}</h2>
|
||||||
{% if library.grouper %}<p class="small quiet">To use these filters, put <code>{% templatetag openblock %} load {{ library.grouper }} {% templatetag closeblock %}</code> in your template before using the filter.</p><hr />{% endif %}
|
{% if library.grouper %}<p class="small quiet">To use these filters, put <code>{% templatetag openblock %} load {{ library.grouper }} {% templatetag closeblock %}</code> in your template before using the filter.</p><hr />{% endif %}
|
||||||
{% for filter in library.list|dictsort:"name" %}
|
{% for filter in library.list|dictsort:"name" %}
|
||||||
<h3 id="{{ filter.name }}">{{ filter.name }}</h3>
|
<h3 id="{{ filter.name }}">{{ filter.name }}</h3>
|
||||||
|
@ -33,7 +33,7 @@
|
||||||
{% regroup filters|dictsort:"library" by library as filter_libraries %}
|
{% regroup filters|dictsort:"library" by library as filter_libraries %}
|
||||||
{% for library in filter_libraries %}
|
{% for library in filter_libraries %}
|
||||||
<div class="module">
|
<div class="module">
|
||||||
<h2>{% if library.grouper %}{{ library.grouper }}{% else %}Built-in filters{% endif %}</h2>
|
<h2>{% firstof library.grouper "Built-in filters" %}</h2>
|
||||||
<ul>
|
<ul>
|
||||||
{% for filter in library.list|dictsort:"name" %}
|
{% for filter in library.list|dictsort:"name" %}
|
||||||
<li><a href="#{{ filter.name }}">{{ filter.name }}</a></li>
|
<li><a href="#{{ filter.name }}">{{ filter.name }}</a></li>
|
||||||
|
|
|
@ -12,7 +12,7 @@
|
||||||
{% regroup tags|dictsort:"library" by library as tag_libraries %}
|
{% regroup tags|dictsort:"library" by library as tag_libraries %}
|
||||||
{% for library in tag_libraries %}
|
{% for library in tag_libraries %}
|
||||||
<div class="module">
|
<div class="module">
|
||||||
<h2>{% if library.grouper %}{{ library.grouper }}{% else %}Built-in tags{% endif %}</h2>
|
<h2>{% firstof library.grouper "Built-in tags" %}</h2>
|
||||||
{% if library.grouper %}<p class="small quiet">To use these tags, put <code>{% templatetag openblock %} load {{ library.grouper }} {% templatetag closeblock %}</code> in your template before using the tag.</p><hr />{% endif %}
|
{% if library.grouper %}<p class="small quiet">To use these tags, put <code>{% templatetag openblock %} load {{ library.grouper }} {% templatetag closeblock %}</code> in your template before using the tag.</p><hr />{% endif %}
|
||||||
{% for tag in library.list|dictsort:"name" %}
|
{% for tag in library.list|dictsort:"name" %}
|
||||||
<h3 id="{{ tag.name }}">{{ tag.name }}</h3>
|
<h3 id="{{ tag.name }}">{{ tag.name }}</h3>
|
||||||
|
@ -33,7 +33,7 @@
|
||||||
{% regroup tags|dictsort:"library" by library as tag_libraries %}
|
{% regroup tags|dictsort:"library" by library as tag_libraries %}
|
||||||
{% for library in tag_libraries %}
|
{% for library in tag_libraries %}
|
||||||
<div class="module">
|
<div class="module">
|
||||||
<h2>{% if library.grouper %}{{ library.grouper }}{% else %}Built-in tags{% endif %}</h2>
|
<h2>{% firstof library.grouper "Built-in tags" %}</h2>
|
||||||
<ul>
|
<ul>
|
||||||
{% for tag in library.list|dictsort:"name" %}
|
{% for tag in library.list|dictsort:"name" %}
|
||||||
<li><a href="#{{ tag.name }}">{{ tag.name }}</a></li>
|
<li><a href="#{{ tag.name }}">{{ tag.name }}</a></li>
|
||||||
|
|
|
@ -29,7 +29,7 @@
|
||||||
|
|
||||||
{% for view in site_views.list|dictsort:"url" %}
|
{% for view in site_views.list|dictsort:"url" %}
|
||||||
{% ifchanged %}
|
{% ifchanged %}
|
||||||
<h3><a href="{{ view.module }}.{{ view.name }}/">{{ view.url|escape }}</a></h3>
|
<h3><a href="{{ view.module }}.{{ view.name }}/">{{ view.url }}</a></h3>
|
||||||
<p class="small quiet">View function: {{ view.module }}.{{ view.name }}</p>
|
<p class="small quiet">View function: {{ view.module }}.{{ view.name }}</p>
|
||||||
<p>{{ view.title }}</p>
|
<p>{{ view.title }}</p>
|
||||||
<hr />
|
<hr />
|
||||||
|
|
|
@ -6,11 +6,11 @@
|
||||||
|
|
||||||
<div id="breadcrumbs"><a href="{{ root_url }}">Home</a> / <a href="{{ model.url }}">{{ model.verbose_name_plural|capfirst }}</a> / <a href="../../../../">Calendars</a> / <a href="../../../">By {{ field.verbose_name }}</a> / <a href="../../">{{ day.year }}</a> / <a href="../">{{ day|date:"F" }}</a> / {{ day.day }}</div>
|
<div id="breadcrumbs"><a href="{{ root_url }}">Home</a> / <a href="{{ model.url }}">{{ model.verbose_name_plural|capfirst }}</a> / <a href="../../../../">Calendars</a> / <a href="../../../">By {{ field.verbose_name }}</a> / <a href="../../">{{ day.year }}</a> / <a href="../">{{ day|date:"F" }}</a> / {{ day.day }}</div>
|
||||||
|
|
||||||
<h1>{{ object_list.count }} {% if object_list.count|pluralize %}{{ model.verbose_name_plural|escape }}{% else %}{{ model.verbose_name|escape }}{% endif %} with {{ field.verbose_name }} on {{ day|date:"F j, Y" }}</h1>
|
<h1>{{ object_list.count }} {% if object_list.count|pluralize %}{{ model.verbose_name_plural }}{% else %}{{ model.verbose_name }}{% endif %} with {{ field.verbose_name }} on {{ day|date:"F j, Y" }}</h1>
|
||||||
|
|
||||||
<ul class="objectlist">
|
<ul class="objectlist">
|
||||||
{% for object in object_list %}
|
{% for object in object_list %}
|
||||||
<li class="{% cycle 'odd' 'even' %}"><a href="{{ object.url }}">{{ object|escape }}</a></li>
|
<li class="{% cycle 'odd' 'even' %}"><a href="{{ object.url }}">{{ object }}</a></li>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</ul>
|
</ul>
|
||||||
|
|
||||||
|
|
|
@ -6,11 +6,11 @@
|
||||||
|
|
||||||
<div id="breadcrumbs"><a href="{{ root_url }}">Home</a> / <a href="{{ model.url }}">{{ model.verbose_name_plural|capfirst }}</a> / <a href="../../../">Calendars</a> / <a href="../../">By {{ field.verbose_name }}</a> / <a href="../">{{ month.year }}</a> / {{ month|date:"F" }}</div>
|
<div id="breadcrumbs"><a href="{{ root_url }}">Home</a> / <a href="{{ model.url }}">{{ model.verbose_name_plural|capfirst }}</a> / <a href="../../../">Calendars</a> / <a href="../../">By {{ field.verbose_name }}</a> / <a href="../">{{ month.year }}</a> / {{ month|date:"F" }}</div>
|
||||||
|
|
||||||
<h1>{{ object_list.count }} {% if object_list.count|pluralize %}{{ model.verbose_name_plural|escape }}{% else %}{{ model.verbose_name|escape }}{% endif %} with {{ field.verbose_name }} on {{ day|date:"F Y" }}</h1>
|
<h1>{{ object_list.count }} {% if object_list.count|pluralize %}{{ model.verbose_name_plural }}{% else %}{{ model.verbose_name }}{% endif %} with {{ field.verbose_name }} on {{ day|date:"F Y" }}</h1>
|
||||||
|
|
||||||
<ul class="objectlist">
|
<ul class="objectlist">
|
||||||
{% for object in object_list %}
|
{% for object in object_list %}
|
||||||
<li class="{% cycle 'odd' 'even' %}"><a href="{{ object.url }}">{{ object|escape }}</a></li>
|
<li class="{% cycle 'odd' 'even' %}"><a href="{{ object.url }}">{{ object }}</a></li>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</ul>
|
</ul>
|
||||||
|
|
||||||
|
|
|
@ -1,16 +1,16 @@
|
||||||
{% extends "databrowse/base_site.html" %}
|
{% extends "databrowse/base_site.html" %}
|
||||||
|
|
||||||
{% block title %}{{ model.verbose_name_plural|capfirst }} by {{ field.field.verbose_name }}: {{ value|escape }}{% endblock %}
|
{% block title %}{{ model.verbose_name_plural|capfirst }} by {{ field.field.verbose_name }}: {{ value }}{% endblock %}
|
||||||
|
|
||||||
{% block content %}
|
{% block content %}
|
||||||
|
|
||||||
<div id="breadcrumbs"><a href="{{ root_url }}">Home</a> / <a href="{{ model.url }}">{{ model.verbose_name_plural|capfirst }}</a> / <a href="{{ field.url }}">By {{ field.field.verbose_name }}</a> / {{ value|escape }}</div>
|
<div id="breadcrumbs"><a href="{{ root_url }}">Home</a> / <a href="{{ model.url }}">{{ model.verbose_name_plural|capfirst }}</a> / <a href="{{ field.url }}">By {{ field.field.verbose_name }}</a> / {{ value }}</div>
|
||||||
|
|
||||||
<h1>{{ model.verbose_name_plural|capfirst }} by {{ field.field.verbose_name }}: {{ value|escape }}</h1>
|
<h1>{{ model.verbose_name_plural|capfirst }} by {{ field.field.verbose_name }}: {{ value }}</h1>
|
||||||
|
|
||||||
<ul class="objectlist">
|
<ul class="objectlist">
|
||||||
{% for object in object_list %}
|
{% for object in object_list %}
|
||||||
<li class="{% cycle 'odd' 'even' %}"><a href="{{ object.url }}">{{ object|escape }}</a></li>
|
<li class="{% cycle 'odd' 'even' %}"><a href="{{ object.url }}">{{ object }}</a></li>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</ul>
|
</ul>
|
||||||
|
|
||||||
|
|
|
@ -10,7 +10,7 @@
|
||||||
|
|
||||||
<ul class="objectlist">
|
<ul class="objectlist">
|
||||||
{% for choice in field.choices %}
|
{% for choice in field.choices %}
|
||||||
<li class="{% cycle 'odd' 'even' %}"><a href="{{ choice.url }}">{{ choice.label|escape }}</a></li>
|
<li class="{% cycle 'odd' 'even' %}"><a href="{{ choice.url }}">{{ choice.label }}</a></li>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</ul>
|
</ul>
|
||||||
|
|
||||||
|
|
|
@ -1,16 +1,16 @@
|
||||||
{% extends "databrowse/base_site.html" %}
|
{% extends "databrowse/base_site.html" %}
|
||||||
|
|
||||||
{% block title %}{{ model.verbose_name_plural|capfirst|escape }} with {{ field.field.verbose_name|escape }} {{ value|escape }}{% endblock %}
|
{% block title %}{{ model.verbose_name_plural|capfirst }} with {{ field.field.verbose_name }} {{ value }}{% endblock %}
|
||||||
|
|
||||||
{% block content %}
|
{% block content %}
|
||||||
|
|
||||||
<div id="breadcrumbs"><a href="{{ root_url }}">Home</a> / <a href="{{ model.url }}">{{ model.verbose_name_plural|capfirst }}</a> / <a href="../../">Fields</a> / <a href="../">By {{ field.field.verbose_name|escape }}</a> / {{ value|escape }}</div>
|
<div id="breadcrumbs"><a href="{{ root_url }}">Home</a> / <a href="{{ model.url }}">{{ model.verbose_name_plural|capfirst }}</a> / <a href="../../">Fields</a> / <a href="../">By {{ field.field.verbose_name }}</a> / {{ value }}</div>
|
||||||
|
|
||||||
<h1>{{ object_list.count }} {% if object_list.count|pluralize %}{{ model.verbose_name_plural|escape }}{% else %}{{ model.verbose_name|escape }}{% endif %} with {{ field.field.verbose_name|escape }} {{ value|escape }}</h1>
|
<h1>{{ object_list.count }} {% if object_list.count|pluralize %}{{ model.verbose_name_plural }}{% else %}{{ model.verbose_name }}{% endif %} with {{ field.field.verbose_name }} {{ value }}</h1>
|
||||||
|
|
||||||
<ul class="objectlist">
|
<ul class="objectlist">
|
||||||
{% for object in object_list %}
|
{% for object in object_list %}
|
||||||
<li class="{% cycle 'odd' 'even' %}"><a href="{{ object.url }}">{{ object|escape }}</a></li>
|
<li class="{% cycle 'odd' 'even' %}"><a href="{{ object.url }}">{{ object }}</a></li>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</ul>
|
</ul>
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
{% extends "databrowse/base_site.html" %}
|
{% extends "databrowse/base_site.html" %}
|
||||||
|
|
||||||
{% block title %}Browsable fields in {{ model.verbose_name_plural|escape }}{% endblock %}
|
{% block title %}Browsable fields in {{ model.verbose_name_plural }}{% endblock %}
|
||||||
|
|
||||||
{% block content %}
|
{% block content %}
|
||||||
|
|
||||||
|
|
|
@ -1,16 +1,16 @@
|
||||||
{% extends "databrowse/base_site.html" %}
|
{% extends "databrowse/base_site.html" %}
|
||||||
|
|
||||||
{% block title %}{{ model.verbose_name_plural|capfirst|escape }} by {{ field.field.verbose_name|escape }}{% endblock %}
|
{% block title %}{{ model.verbose_name_plural|capfirst }} by {{ field.field.verbose_name }}{% endblock %}
|
||||||
|
|
||||||
{% block content %}
|
{% block content %}
|
||||||
|
|
||||||
<div id="breadcrumbs"><a href="{{ root_url }}">Home</a> / <a href="{{ model.url }}">{{ model.verbose_name_plural|capfirst }}</a> / <a href="../">Fields</a> / By {{ field.field.verbose_name|escape }}</div>
|
<div id="breadcrumbs"><a href="{{ root_url }}">Home</a> / <a href="{{ model.url }}">{{ model.verbose_name_plural|capfirst }}</a> / <a href="../">Fields</a> / By {{ field.field.verbose_name }}</div>
|
||||||
|
|
||||||
<h1>{{ model.verbose_name_plural|capfirst|escape }} by {{ field.field.verbose_name|escape }}</h1>
|
<h1>{{ model.verbose_name_plural|capfirst }} by {{ field.field.verbose_name }}</h1>
|
||||||
|
|
||||||
<ul class="objectlist">
|
<ul class="objectlist">
|
||||||
{% for object in object_list %}
|
{% for object in object_list %}
|
||||||
<li class="{% cycle 'odd' 'even' %}"><a href="{{ object|iriencode }}/">{{ object|escape }}</a></li>
|
<li class="{% cycle 'odd' 'even' %}"><a href="{{ object|iriencode }}/">{{ object }}</a></li>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</ul>
|
</ul>
|
||||||
|
|
||||||
|
|
|
@ -11,7 +11,7 @@
|
||||||
<h2><a href="{{ model.url }}">{{ model.verbose_name_plural|capfirst }}</a></h2>
|
<h2><a href="{{ model.url }}">{{ model.verbose_name_plural|capfirst }}</a></h2>
|
||||||
<p>
|
<p>
|
||||||
{% for object in model.sample_objects %}
|
{% for object in model.sample_objects %}
|
||||||
<a href="{{ object.url }}">{{ object|escape }}</a>,
|
<a href="{{ object.url }}">{{ object }}</a>,
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
<a class="more" href="{{ model.url }}">More →</a>
|
<a class="more" href="{{ model.url }}">More →</a>
|
||||||
</p>
|
</p>
|
||||||
|
|
|
@ -12,7 +12,7 @@
|
||||||
|
|
||||||
<ul class="objectlist">
|
<ul class="objectlist">
|
||||||
{% for object in model.objects %}
|
{% for object in model.objects %}
|
||||||
<li class="{% cycle 'odd' 'even' %}"><a href="{{ object.url }}">{{ object|escape }}</a></li>
|
<li class="{% cycle 'odd' 'even' %}"><a href="{{ object.url }}">{{ object }}</a></li>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</ul>
|
</ul>
|
||||||
|
|
||||||
|
|
|
@ -4,9 +4,9 @@
|
||||||
|
|
||||||
{% block content %}
|
{% block content %}
|
||||||
|
|
||||||
<div id="breadcrumbs"><a href="{{ root_url }}">Home</a> / <a href="{{ object.model.url }}">{{ object.model.verbose_name_plural|capfirst }}</a> / {{ object|escape }}</div>
|
<div id="breadcrumbs"><a href="{{ root_url }}">Home</a> / <a href="{{ object.model.url }}">{{ object.model.verbose_name_plural|capfirst }}</a> / {{ object }}</div>
|
||||||
|
|
||||||
<h1>{{ object.model.verbose_name|capfirst }}: {{ object|escape }}</h1>
|
<h1>{{ object.model.verbose_name|capfirst }}: {{ object }}</h1>
|
||||||
|
|
||||||
<table class="objectinfo">
|
<table class="objectinfo">
|
||||||
{% for field in object.fields %}
|
{% for field in object.fields %}
|
||||||
|
@ -15,7 +15,7 @@
|
||||||
<td>
|
<td>
|
||||||
{% if field.urls %}
|
{% if field.urls %}
|
||||||
{% for value, url in field.urls %}
|
{% for value, url in field.urls %}
|
||||||
{% if url %}<a href="{{ url }}">{% endif %}{{ value|escape }}{% if url %}</a>{% endif %}{% if not forloop.last %}, {% endif %}
|
{% if url %}<a href="{{ url }}">{% endif %}{{ value }}{% if url %}</a>{% endif %}{% if not forloop.last %}, {% endif %}
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
{% else %}None{% endif %}
|
{% else %}None{% endif %}
|
||||||
</td>
|
</td>
|
||||||
|
@ -29,7 +29,7 @@
|
||||||
{% if related_object.object_list %}
|
{% if related_object.object_list %}
|
||||||
<ul class="objectlist">
|
<ul class="objectlist">
|
||||||
{% for object in related_object.object_list %}
|
{% for object in related_object.object_list %}
|
||||||
<li class="{% cycle 'odd' 'even' %}"><a href="{{ object.url }}">{{ object|escape }}</a></li>
|
<li class="{% cycle 'odd' 'even' %}"><a href="{{ object.url }}">{{ object }}</a></li>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</ul>
|
</ul>
|
||||||
{% else %}
|
{% else %}
|
||||||
|
|
|
@ -8,7 +8,7 @@
|
||||||
{% for field in form %}
|
{% for field in form %}
|
||||||
<tr>
|
<tr>
|
||||||
<th>{{ field.label }}:</th>
|
<th>{{ field.label }}:</th>
|
||||||
<td>{{ field.data|escape }}</td>
|
<td>{{ field.data }}</td>
|
||||||
</tr>
|
</tr>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</table>
|
</table>
|
||||||
|
|
|
@ -2,11 +2,11 @@
|
||||||
{% block vars %}var {{ module }} = {};
|
{% block vars %}var {{ module }} = {};
|
||||||
{{ module }}.map = null; {{ module }}.controls = null; {{ module }}.panel = null; {{ module }}.re = new RegExp("^SRID=\d+;(.+)", "i"); {{ module }}.layers = {};
|
{{ module }}.map = null; {{ module }}.controls = null; {{ module }}.panel = null; {{ module }}.re = new RegExp("^SRID=\d+;(.+)", "i"); {{ module }}.layers = {};
|
||||||
{{ module }}.wkt_f = new OpenLayers.Format.WKT();
|
{{ module }}.wkt_f = new OpenLayers.Format.WKT();
|
||||||
{{ module }}.is_collection = {% if is_collection %}true{% else %}false{% endif %};
|
{{ module }}.is_collection = {{ is_collection|yesno:"true,false" }};
|
||||||
{{ module }}.collection_type = '{{ collection_type }}';
|
{{ module }}.collection_type = '{{ collection_type }}';
|
||||||
{{ module }}.is_linestring = {% if is_linestring %}true{% else %}false{% endif %};
|
{{ module }}.is_linestring = {{ is_linestring|yesno:"true,false" }};
|
||||||
{{ module }}.is_polygon = {% if is_polygon %}true{% else %}false{% endif %};
|
{{ module }}.is_polygon = {{ is_polygon|yesno:"true,false" }};
|
||||||
{{ module }}.is_point = {% if is_point %}true{% else %}false{% endif %};
|
{{ module }}.is_point = {{ is_point|yesno:"true,false" }};
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
{{ module }}.get_ewkt = function(feat){return 'SRID={{ srid }};' + {{ module }}.wkt_f.write(feat);}
|
{{ module }}.get_ewkt = function(feat){return 'SRID={{ srid }};' + {{ module }}.wkt_f.write(feat);}
|
||||||
{{ module }}.read_wkt = function(wkt){
|
{{ module }}.read_wkt = function(wkt){
|
||||||
|
@ -147,7 +147,7 @@
|
||||||
{% if scale_text %}{{ module }}.map.addControl(new OpenLayers.Control.Scale());{% endif %}
|
{% if scale_text %}{{ module }}.map.addControl(new OpenLayers.Control.Scale());{% endif %}
|
||||||
{% if layerswitcher %}{{ module }}.map.addControl(new OpenLayers.Control.LayerSwitcher());{% endif %}
|
{% if layerswitcher %}{{ module }}.map.addControl(new OpenLayers.Control.LayerSwitcher());{% endif %}
|
||||||
// Then add optional behavior controls
|
// Then add optional behavior controls
|
||||||
{% if scrollable %}{% else %}{{ module }}.map.getControlsByClass('OpenLayers.Control.Navigation')[0].disableZoomWheel();{% endif %}
|
{% if not scrollable %}{{ module }}.map.getControlsByClass('OpenLayers.Control.Navigation')[0].disableZoomWheel();{% endif %}
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
if (wkt){
|
if (wkt){
|
||||||
{{ module }}.enableEditing();
|
{{ module }}.enableEditing();
|
||||||
|
|
|
@ -1,9 +1,9 @@
|
||||||
{% autoescape off %}<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
|
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
|
||||||
{% spaceless %}
|
{% spaceless %}
|
||||||
{% for url in urlset %}
|
{% for url in urlset %}
|
||||||
<url>
|
<url>
|
||||||
<loc>{{ url.location|escape }}</loc>
|
<loc>{{ url.location }}</loc>
|
||||||
{% if url.lastmod %}<lastmod>{{ url.lastmod|date:"Y-m-d" }}</lastmod>{% endif %}
|
{% if url.lastmod %}<lastmod>{{ url.lastmod|date:"Y-m-d" }}</lastmod>{% endif %}
|
||||||
{% if url.changefreq %}<changefreq>{{ url.changefreq }}</changefreq>{% endif %}
|
{% if url.changefreq %}<changefreq>{{ url.changefreq }}</changefreq>{% endif %}
|
||||||
{% if url.priority %}<priority>{{ url.priority }}</priority>{% endif %}
|
{% if url.priority %}<priority>{{ url.priority }}</priority>{% endif %}
|
||||||
|
@ -11,4 +11,3 @@
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
{% endspaceless %}
|
{% endspaceless %}
|
||||||
</urlset>
|
</urlset>
|
||||||
{% endautoescape %}
|
|
||||||
|
|
|
@ -1,5 +1,4 @@
|
||||||
{% autoescape off %}<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<sitemapindex xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
|
<sitemapindex xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
|
||||||
{% for location in sitemaps %}<sitemap><loc>{{ location|escape }}</loc></sitemap>{% endfor %}
|
{% for location in sitemaps %}<sitemap><loc>{{ location }}</loc></sitemap>{% endfor %}
|
||||||
</sitemapindex>
|
</sitemapindex>
|
||||||
{% endautoescape %}
|
|
||||||
|
|
|
@ -73,13 +73,16 @@ DEFAULT_DIRECTORY_INDEX_TEMPLATE = """
|
||||||
<meta http-equiv="Content-type" content="text/html; charset=utf-8" />
|
<meta http-equiv="Content-type" content="text/html; charset=utf-8" />
|
||||||
<meta http-equiv="Content-Language" content="en-us" />
|
<meta http-equiv="Content-Language" content="en-us" />
|
||||||
<meta name="robots" content="NONE,NOARCHIVE" />
|
<meta name="robots" content="NONE,NOARCHIVE" />
|
||||||
<title>Index of {{ directory|escape }}</title>
|
<title>Index of {{ directory }}</title>
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<h1>Index of {{ directory|escape }}</h1>
|
<h1>Index of {{ directory }}</h1>
|
||||||
<ul>
|
<ul>
|
||||||
|
{% ifnotequal directory "/" %}
|
||||||
|
<li><a href="../">../</a></li>
|
||||||
|
{% endifnotequal %}
|
||||||
{% for f in file_list %}
|
{% for f in file_list %}
|
||||||
<li><a href="{{ f|urlencode }}">{{ f|escape }}</a></li>
|
<li><a href="{{ f|urlencode }}">{{ f }}</a></li>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</ul>
|
</ul>
|
||||||
</body>
|
</body>
|
||||||
|
|
Loading…
Reference in New Issue