mirror of
https://github.com/django/django.git
synced 2025-07-04 09:49:12 +00:00
new-admin: Normalized spacing in admin template tags
git-svn-id: http://code.djangoproject.com/svn/django/branches/new-admin@1393 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
parent
82c071539b
commit
7da863576f
@ -6,12 +6,12 @@
|
||||
{% for js in bound_manipulator.javascript_imports %}{% include_admin_script js %}{% endfor %}
|
||||
{% endblock %}
|
||||
{% block coltype %}{{ bound_manipulator.coltype }}{% endblock %}
|
||||
{% block bodyclass %}{{app_label}}-{{bound_manipulator.object_name.lower}} change-form{% endblock %}
|
||||
{% block bodyclass %}{{ app_label }}-{{ bound_manipulator.object_name.lower }} change-form{% endblock %}
|
||||
{% block breadcrumbs %}{% if not is_popup %}
|
||||
<div class="breadcrumbs">
|
||||
<a href="../../../">{% trans "Home" %}</a> ›
|
||||
<a href="../">{{bound_manipulator.verbose_name_plural|capfirst}}</a> ›
|
||||
{% if add %}{% trans "Add" %} {{bound_manipulator.verbose_name}}{% else %}{{bound_manipulator.original|striptags|truncatewords:"18"}}{% endif %}
|
||||
<a href="../">{{ bound_manipulator.verbose_name_plural|capfirst }}</a> ›
|
||||
{% if add %}{% trans "Add" %} {{ bound_manipulator.verbose_name }}{% else %}{{ bound_manipulator.original|striptags|truncatewords:"18" }}{% endif %}
|
||||
</div>
|
||||
{% endif %}{% endblock %}
|
||||
{% block content %}<div id="content-main">
|
||||
@ -20,7 +20,7 @@
|
||||
{% if bound_manipulator.has_absolute_url %}<li><a href="/r/{{ bound_manipulator.content_type_id }}/{{ object_id }}/" class="viewsitelink">{% trans "View on site" %}</a></li>{% endif%}
|
||||
</ul>
|
||||
{% endif %}{% endif %}
|
||||
<form {{ bound_manipulator.form_enc_attrib }} action='{{ form_url }}' method="post">{% block form_top %}{%endblock%}
|
||||
<form {{ bound_manipulator.form_enc_attrib }} action='{{ form_url }}' method="post">{% block form_top %}{% endblock %}
|
||||
{% if is_popup %}<input type="hidden" name="_popup" value="1">{% endif %}
|
||||
{% if bound_manipulator.save_on_top %}{% submit_row bound_manipulator %}{% endif %}
|
||||
{% if form.error_dict %}
|
||||
@ -29,12 +29,12 @@
|
||||
</p>
|
||||
{% endif %}
|
||||
{% for bound_field_set in bound_manipulator.bound_field_sets %}
|
||||
<fieldset class="module aligned {{ bound_field_set.classes }}">
|
||||
{% if bound_field_set.name %}<h2>{{bound_field_set.name }}</h2>{% endif %}
|
||||
<fieldset class="module aligned {{ bound_field_set.classes }}">
|
||||
{% if bound_field_set.name %}<h2>{{ bound_field_set.name }}</h2>{% endif %}
|
||||
{% for bound_field_line in bound_field_set %}
|
||||
{% admin_field_line bound_field_line %}
|
||||
{% admin_field_line bound_field_line %}
|
||||
{% for bound_field in bound_field_line %}
|
||||
{% filter_interface_script_maybe bound_field %}
|
||||
{% filter_interface_script_maybe bound_field %}
|
||||
{% endfor %}
|
||||
{% endfor %}
|
||||
</fieldset>
|
||||
@ -50,24 +50,24 @@
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
{% for related_object in bound_manipulator.inline_related_objects %}{% edit_inline related_object %}{% endfor %}
|
||||
{% block after_related_objects%}{%endblock%}
|
||||
{% block after_related_objects %}{% endblock %}
|
||||
{% submit_row bound_manipulator %}
|
||||
{% if add %}
|
||||
<script type="text/javascript">document.getElementById("{{bound_manipulator.first_form_field_id}}").focus();</script>
|
||||
<script type="text/javascript">document.getElementById("{{ bound_manipulator.first_form_field_id }}").focus();</script>
|
||||
{% endif %}
|
||||
{% if bound_manipulator.auto_populated_fields %}
|
||||
<script type="text/javascript">
|
||||
{% auto_populated_field_script bound_manipulator.auto_populated_fields change %}
|
||||
{% auto_populated_field_script bound_manipulator.auto_populated_fields change %}
|
||||
</script>
|
||||
{% endif %}
|
||||
{% if change %}
|
||||
{% if bound_manipulator.ordered_objects %}
|
||||
{% if form.order_objects %}<ul id="orderthese">
|
||||
{% for object in form.order_objects %}
|
||||
<li id="p{% object_pk bound_manipulator object %}">
|
||||
<span id="handlep{% object_pk bound_manipulator object %}">{{ object|truncatewords:"5" }}</span>
|
||||
</li>
|
||||
{% endfor%}
|
||||
<li id="p{% object_pk bound_manipulator object %}">
|
||||
<span id="handlep{% object_pk bound_manipulator object %}">{{ object|truncatewords:"5" }}</span>
|
||||
</li>
|
||||
{% endfor %}
|
||||
</ul>{% endif %}
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
|
@ -2,19 +2,19 @@
|
||||
{% load i18n %}
|
||||
{% extends "admin/base_site" %}
|
||||
{% block bodyclass %}change-list{% endblock %}
|
||||
{% if not is_popup %}{% block breadcrumbs %}<div class="breadcrumbs"><a href="../../">{% trans "Home" %}</a> › {{cl.opts.verbose_name_plural|capfirst}} </div>{% endblock %}{% endif %}
|
||||
{% if not is_popup %}{% block breadcrumbs %}<div class="breadcrumbs"><a href="../../">{% trans "Home" %}</a> › {{ cl.opts.verbose_name_plural|capfirst }} </div>{% endblock %}{% endif %}
|
||||
{% block coltype %}flex{% endblock %}
|
||||
{% block content %}
|
||||
<div id="content-main">
|
||||
{%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 as name %}Add {{ name }}{% endblocktrans %}</a></li></ul>
|
||||
{% 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 as name %}Add {{ name }}{% endblocktrans %}</a></li></ul>
|
||||
{% endif %}
|
||||
<div class="module{%if cl.has_filters%} filtered{%endif%}" id="changelist">
|
||||
{% search_form cl%}
|
||||
{% date_hierarchy cl%}
|
||||
<div class="module{% if cl.has_filters %} filtered{% endif %}" id="changelist">
|
||||
{% search_form cl %}
|
||||
{% date_hierarchy cl %}
|
||||
{% filters cl %}
|
||||
{% result_list cl%}
|
||||
{% pagination cl%}
|
||||
{% result_list cl %}
|
||||
{% pagination cl %}
|
||||
</div>
|
||||
</div>
|
||||
{%endblock%}
|
||||
{% endblock %}
|
||||
|
@ -1,17 +1,13 @@
|
||||
<table cellspacing="0">
|
||||
<thead>
|
||||
<tr>
|
||||
{% for header in result_headers %}<th{{header.class_attrib}}>
|
||||
{%if header.sortable%}<a href="{{header.url}}" %>{%endif%}
|
||||
{{header.text|capfirst}}
|
||||
{%if header.sortable %}</a>{% endif %}</th>{% endfor %}
|
||||
{% for header in result_headers %}<th{{ header.class_attrib }}>
|
||||
{% if header.sortable %}<a href="{{ header.url }}">{% endif %}
|
||||
{{ header.text|capfirst }}
|
||||
{% if header.sortable %}</a>{% endif %}</th>{% endfor %}
|
||||
</tr>
|
||||
</thead>
|
||||
{%for result in results %}
|
||||
<tr class="{%cycle row1,row2%}" >
|
||||
{%for item in result %}
|
||||
{{item }}
|
||||
{%endfor%}
|
||||
</tr>
|
||||
{%endfor%}
|
||||
{% for result in results %}
|
||||
<tr class="{% cycle row1,row2 %}">{% for item in result %}{{ item }}{% endfor %}</tr>
|
||||
{% endfor %}
|
||||
</table>
|
||||
|
@ -1,9 +1,9 @@
|
||||
{% if show %}
|
||||
<div class="xfull">
|
||||
<ul class="toplinks">
|
||||
{% if back %}<li class="date-back"><a href="{{back.link}}">‹ {{back.title}}</a></li>{% endif %}
|
||||
{% if back %}<li class="date-back"><a href="{{ back.link }}">‹ {{ back.title }}</a></li>{% endif %}
|
||||
{% for choice in choices %}
|
||||
<li> {% if choice.link%}<a href="{{choice.link}}">{%endif%}{{choice.title}}{%if choice.link%}</a>{%endif%}</li>
|
||||
<li> {% if choice.link %}<a href="{{ choice.link }}">{% endif %}{{ choice.title }}{% if choice.link %}</a>{% endif %}</li>
|
||||
{% endfor %}
|
||||
</ul><br class="clear" />
|
||||
</div>
|
||||
|
@ -1,5 +1,5 @@
|
||||
<fieldset class="module aligned">
|
||||
{% for fcw in bound_related_object.form_field_collection_wrappers %}
|
||||
{% for fcw in bound_related_object.form_field_collection_wrappers %}
|
||||
<h2>{{ bound_related_object.relation.opts.verbose_name|capfirst }} #{{ forloop.counter }}</h2>
|
||||
{% if bound_related_object.show_url %}{% if fcw.obj.original %}
|
||||
<p><a href="/r/{{ fcw.obj.original.content_type_id }}/{{ fcw.obj.original.id }}/">View on site</a></p>
|
||||
@ -11,5 +11,5 @@
|
||||
{% admin_field_line bound_field %}
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
{%endfor%}
|
||||
{% endfor %}
|
||||
</fieldset>
|
@ -1,33 +1,32 @@
|
||||
<fieldset class="module">
|
||||
<h2>{{bound_related_object.relation.opts.verbose_name_plural|capfirst}}</h2><table>
|
||||
<h2>{{ bound_related_object.relation.opts.verbose_name_plural|capfirst }}</h2><table>
|
||||
<thead><tr>
|
||||
{% for fw in bound_related_object.field_wrapper_list %}
|
||||
{% if fw.needs_header %}
|
||||
<th{{fw.header_class_attribute}}> {{fw.field.verbose_name|capfirst}} </th>
|
||||
<th{{ fw.header_class_attribute }}>{{ fw.field.verbose_name|capfirst }}</th>
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
{% for fcw in bound_related_object.form_field_collection_wrappers %}
|
||||
|
||||
{% for fcw in bound_related_object.form_field_collection_wrappers %}
|
||||
{% if change %}{% if original_row_needed %}
|
||||
{% if fcw.obj.original %}
|
||||
<tr class="row-label {% cycle row1,row2 %}"><td colspan="{{num_headers}}"><strong>{{ fcw.obj.original }}</strong></tr>
|
||||
<tr class="row-label {% cycle row1,row2 %}"><td colspan="{{ num_headers }}"><strong>{{ fcw.obj.original }}</strong></tr>
|
||||
{% endif %}
|
||||
{% endif %}{% endif %}
|
||||
{% if fcw.obj.errors %}
|
||||
<tr class="errorlist"><td colspan="{{num_headers}}">
|
||||
<tr class="errorlist"><td colspan="{{ num_headers }}">
|
||||
{{ fcw.obj.html_combined_error_list }}
|
||||
</tr>
|
||||
{% endif %}
|
||||
<tr class="{% cycle row1,row2 %}">
|
||||
{% for bound_field in fcw.bound_fields %}
|
||||
{% if not bound_field.hidden %}
|
||||
<td {{bound_field.cell_class_attribute}}>
|
||||
<td {{ bound_field.cell_class_attribute }}>
|
||||
{% field_widget bound_field %}
|
||||
</td>
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
{% if bound_related_object.show_url %}<td>
|
||||
{% if fcw.obj.original %}<a href="/r/{{ fcw.obj.original.content_type_id }}/{{ fcw.obj.original.id }}/">View on site</a>{% endif %}
|
||||
{% if fcw.obj.original %}<a href="/r/{{ fcw.obj.original.content_type_id }}/{{ fcw.obj.original.id }}/">View on site</a>{% endif %}
|
||||
</td>{% endif %}
|
||||
</tr>
|
||||
|
||||
@ -35,10 +34,9 @@
|
||||
|
||||
{% for fcw in bound_related_object.form_field_collection_wrappers %}
|
||||
{% for bound_field in fcw.bound_fields %}
|
||||
{% if bound_field.hidden %}
|
||||
{% if bound_field.hidden %}
|
||||
{% field_widget bound_field %}
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
{% endfor %}
|
||||
</fieldset>
|
||||
|
||||
|
@ -3,19 +3,19 @@
|
||||
{% for bound_field in bound_fields %}
|
||||
{% if bound_field.has_label_first %}
|
||||
{% field_label bound_field %}
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
{% field_widget bound_field %}
|
||||
{% if not bound_field.has_label_first %}
|
||||
{% field_label bound_field %}
|
||||
{% endif %}
|
||||
{% if change %}
|
||||
{% if bound_field.field.primary_key %}
|
||||
{{ bound_field.original_value }}
|
||||
{% endif %}
|
||||
{{ bound_field.original_value }}
|
||||
{% endif %}
|
||||
{% if bound_field.raw_id_admin %}
|
||||
{% if bound_field.existing_display %} <strong>{{ bound_field.existing_display|truncatewords:"14" }}</strong>{% endif %}
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
{% if bound_field.field.help_text %}<p class="help">{{bound_field.field.help_text}}</p>{% endif %}
|
||||
{% if bound_field.field.help_text %}<p class="help">{{ bound_field.field.help_text }}</p>{% endif %}
|
||||
{% endfor %}
|
||||
</div>
|
||||
|
@ -1,7 +1,7 @@
|
||||
<h3>{%blocktrans%} By {{title}} {%endblocktrans%}</h3>
|
||||
<ul>
|
||||
{% for choice in choices %}
|
||||
<li{%if choice.selected%} class="selected"{%endif%}>
|
||||
<a href="{{choice.query_string}}">{{choice.display}}</a></li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
<h3>{% blocktrans %} By {{ title }} {% endblocktrans %}</h3>
|
||||
<ul>
|
||||
{% for choice in choices %}
|
||||
<li{% if choice.selected %} class="selected"{% endif %}>
|
||||
<a href="{{ choice.query_string }}">{{ choice.display }}</a></li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
|
@ -2,4 +2,4 @@
|
||||
<h2>Filter</h2>
|
||||
{% for spec in cl.filter_specs %}
|
||||
{% filter cl spec %}
|
||||
{% endfor %}</div>{% endif %}
|
||||
{% endfor %}</div>{% endif %}
|
||||
|
@ -1,13 +1,9 @@
|
||||
|
||||
<p class="paginator">
|
||||
{% if pagination_required %}
|
||||
{%for i in page_range %}
|
||||
{% paginator_number cl i %}
|
||||
{%endfor%}
|
||||
{%endif%}
|
||||
{{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">Show all</a>{%endif%}
|
||||
|
||||
{% if pagination_required %}
|
||||
{% for i in page_range %}
|
||||
{% paginator_number cl i %}
|
||||
{% endfor %}
|
||||
{% endif %}
|
||||
{{ 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">Show all</a>{% endif %}
|
||||
</p>
|
||||
|
||||
|
@ -1,14 +1,14 @@
|
||||
{%if cl.lookup_opts.admin.search_fields %}
|
||||
{% if cl.lookup_opts.admin.search_fields %}
|
||||
<div id="toolbar"><form id="changelist-search" action="" method="get">
|
||||
<label><img src="{% admin_media_prefix %}img/admin/icon_searchbox.png" /></label>
|
||||
<input type="text" size="40" name="{{search_var}}" value="{{cl.query|escape}}" id="searchbar" />
|
||||
<label><img src="{% admin_media_prefix %}img/admin/icon_searchbox.png" /></label>
|
||||
<input type="text" size="40" name="{{ search_var }}" value="{{ cl.query|escape }}" id="searchbar" />
|
||||
<input type="submit" value="Go" />
|
||||
{%if show_result_count %}
|
||||
<span class="small quiet">{{cl.result_count}} result{{cl.result_count|pluralize}} (<a href="?">{{cl.full_result_count}} total</a>)</span>
|
||||
{%endif%}
|
||||
{% if show_result_count %}
|
||||
<span class="small quiet">{{ cl.result_count }} result{{ cl.result_count|pluralize }} (<a href="?">{{ cl.full_result_count }} total</a>)</span>
|
||||
{% endif %}
|
||||
{% 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|escape }}" value="{{ pair.1|escape }}"/>{% endifnotequal %}
|
||||
{% endfor %}
|
||||
</form></div>
|
||||
<script type="text/javascript">document.getElementById("searchbar").focus();</script>
|
||||
{%endif%}
|
||||
{% endif %}
|
||||
|
@ -1,8 +1,8 @@
|
||||
{% load i18n %}
|
||||
<div class="submit-row">
|
||||
{% if show_delete_link %}<p class="float-left"><a href="delete/" class="deletelink">{% trans "Delete" %}</a></p>{% endif %}
|
||||
{% if show_save_as_new %}<input type="submit" value="{% trans 'Save as new' %}" name="_saveasnew" {{onclick_attrib}}/>{%endif%}
|
||||
{% if show_save_and_add_another %}<input type="submit" value="{% trans 'Save and add another' %}" name="_addanother" {{onclick_attrib}} />{% endif %}
|
||||
{% if show_save_and_continue %}<input type="submit" value="{% trans 'Save and continue editing' %}" name="_continue" {{onclick_attrib}}/>{% endif %}
|
||||
{% if show_save %}<input type="submit" value="{% trans 'Save' %}" class="default" {{onclick_attrib}}/>{% endif %}
|
||||
{% if show_save_as_new %}<input type="submit" value="{% trans 'Save as new' %}" name="_saveasnew" {{ onclick_attrib }}/>{%endif%}
|
||||
{% if show_save_and_add_another %}<input type="submit" value="{% trans 'Save and add another' %}" name="_addanother" {{ onclick_attrib }} />{% endif %}
|
||||
{% if show_save_and_continue %}<input type="submit" value="{% trans 'Save and continue editing' %}" name="_continue" {{ onclick_attrib }}/>{% endif %}
|
||||
{% if show_save %}<input type="submit" value="{% trans 'Save' %}" class="default" {{ onclick_attrib }}/>{% endif %}
|
||||
</div>
|
||||
|
Loading…
x
Reference in New Issue
Block a user