Django

Code

Changeset 1393

Show
Ignore:
Timestamp:
11/23/05 22:24:29 (3 years ago)
Author:
adrian
Message:

new-admin: Normalized spacing in admin template tags

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • django/branches/new-admin/django/contrib/admin/templates/admin/change_form.html

    r1169 r1393  
    77{% endblock %} 
    88{% block coltype %}{{ bound_manipulator.coltype }}{% endblock %} 
    9 {% block bodyclass %}{{app_label}}-{{bound_manipulator.object_name.lower}} change-form{% endblock %} 
     9{% block bodyclass %}{{ app_label }}-{{ bound_manipulator.object_name.lower }} change-form{% endblock %} 
    1010{% block breadcrumbs %}{% if not is_popup %} 
    1111<div class="breadcrumbs"> 
    1212     <a href="../../../">{% trans "Home" %}</a> &rsaquo; 
    13      <a href="../">{{bound_manipulator.verbose_name_plural|capfirst}}</a> &rsaquo; 
    14      {% if add %}{% trans "Add" %} {{bound_manipulator.verbose_name}}{% else %}{{bound_manipulator.original|striptags|truncatewords:"18"}}{% endif %} 
     13     <a href="../">{{ bound_manipulator.verbose_name_plural|capfirst }}</a> &rsaquo; 
     14     {% if add %}{% trans "Add" %} {{ bound_manipulator.verbose_name }}{% else %}{{ bound_manipulator.original|striptags|truncatewords:"18" }}{% endif %} 
    1515</div> 
    1616{% endif %}{% endblock %} 
     
    2121  </ul> 
    2222{% endif %}{% endif %} 
    23 <form {{ bound_manipulator.form_enc_attrib }} action='{{ form_url }}' method="post">{% block form_top %}{%endblock%} 
     23<form {{ bound_manipulator.form_enc_attrib }} action='{{ form_url }}' method="post">{% block form_top %}{% endblock %} 
    2424{% if is_popup %}<input type="hidden" name="_popup" value="1">{% endif %} 
    2525{% if bound_manipulator.save_on_top %}{% submit_row bound_manipulator %}{% endif %} 
     
    3030{% endif %} 
    3131{% for bound_field_set in bound_manipulator.bound_field_sets %} 
    32    <fieldset class="module aligned {{ bound_field_set.classes }}">  
    33     {% if bound_field_set.name %}<h2>{{bound_field_set.name }}</h2>{% endif %} 
     32   <fieldset class="module aligned {{ bound_field_set.classes }}"> 
     33    {% if bound_field_set.name %}<h2>{{ bound_field_set.name }}</h2>{% endif %} 
    3434    {% for bound_field_line in bound_field_set %} 
    35        {% admin_field_line bound_field_line %} 
     35        {% admin_field_line bound_field_line %} 
    3636        {% for bound_field in bound_field_line %} 
    37             {% filter_interface_script_maybe bound_field %}  
     37            {% filter_interface_script_maybe bound_field %} 
    3838        {% endfor %} 
    3939    {% endfor %} 
     
    5151{% endif %} 
    5252{% for related_object in bound_manipulator.inline_related_objects %}{% edit_inline related_object %}{% endfor %} 
    53 {% block after_related_objects%}{%endblock%} 
     53{% block after_related_objects %}{% endblock %} 
    5454{% submit_row bound_manipulator %} 
    5555{% if add %} 
    56    <script type="text/javascript">document.getElementById("{{bound_manipulator.first_form_field_id}}").focus();</script> 
     56   <script type="text/javascript">document.getElementById("{{ bound_manipulator.first_form_field_id }}").focus();</script> 
    5757{% endif %} 
    5858{% if bound_manipulator.auto_populated_fields %} 
    5959   <script type="text/javascript"> 
    60    {% auto_populated_field_script bound_manipulator.auto_populated_fields change %}  
     60   {% auto_populated_field_script bound_manipulator.auto_populated_fields change %} 
    6161   </script> 
    6262{% endif %} 
     
    6565      {% if form.order_objects %}<ul id="orderthese"> 
    6666          {% for object in form.order_objects %} 
    67             <li id="p{% object_pk bound_manipulator object %}"> 
    68             <span id="handlep{% object_pk bound_manipulator object %}">{{ object|truncatewords:"5" }}</span> 
    69             </li> 
    70             {% endfor%} 
     67             <li id="p{% object_pk bound_manipulator object %}"> 
     68             <span id="handlep{% object_pk bound_manipulator object %}">{{ object|truncatewords:"5" }}</span> 
     69             </li> 
     70             {% endfor %} 
    7171      </ul>{% endif %} 
    7272   {% endif %} 
  • django/branches/new-admin/django/contrib/admin/templates/admin/change_list.html

    r1246 r1393  
    33{% extends "admin/base_site" %} 
    44{% block bodyclass %}change-list{% endblock %} 
    5 {% if not is_popup %}{% block breadcrumbs %}<div class="breadcrumbs"><a href="../../">{% trans "Home" %}</a> &rsaquo; {{cl.opts.verbose_name_plural|capfirst}} </div>{% endblock %}{% endif %} 
     5{% if not is_popup %}{% block breadcrumbs %}<div class="breadcrumbs"><a href="../../">{% trans "Home" %}</a> &rsaquo; {{ cl.opts.verbose_name_plural|capfirst }} </div>{% endblock %}{% endif %} 
    66{% block coltype %}flex{% endblock %} 
    77{% block content %} 
    88<div id="content-main"> 
    9 {%if has_add_permission %} 
    10   <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> 
     9{% if has_add_permission %} 
     10<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> 
    1111{% endif %} 
    12 <div class="module{%if cl.has_filters%} filtered{%endif%}" id="changelist"> 
    13 {% search_form cl%} 
    14 {% date_hierarchy cl%} 
     12<div class="module{% if cl.has_filters %} filtered{% endif %}" id="changelist"> 
     13{% search_form cl %} 
     14{% date_hierarchy cl %} 
    1515{% filters cl %} 
    16 {% result_list cl%} 
    17 {% pagination cl%} 
     16{% result_list cl %} 
     17{% pagination cl %} 
    1818</div> 
    1919</div> 
    20 {%endblock%} 
     20{% endblock %} 
  • django/branches/new-admin/django/contrib/admin/templates/admin/change_list_results.html

    r1308 r1393  
    22<thead> 
    33<tr> 
    4 {% for header in result_headers %}<th{{header.class_attrib}}> 
    5 {%if header.sortable%}<a href="{{header.url}}" %>{%endif%} 
    6 {{header.text|capfirst}} 
    7 {%if header.sortable %}</a>{% endif %}</th>{% endfor %} 
     4{% for header in result_headers %}<th{{ header.class_attrib }}> 
     5{% if header.sortable %}<a href="{{ header.url }}">{% endif %} 
     6{{ header.text|capfirst }} 
     7{% if header.sortable %}</a>{% endif %}</th>{% endfor %} 
    88</tr> 
    99</thead> 
    10 {%for result in results %} 
    11   <tr class="{%cycle row1,row2%}" > 
    12   {%for item in result %} 
    13     {{item }} 
    14   {%endfor%} 
    15   </tr> 
    16 {%endfor%} 
     10{% for result in results %} 
     11<tr class="{% cycle row1,row2 %}">{% for item in result %}{{ item }}{% endfor %}</tr> 
     12{% endfor %} 
    1713</table> 
  • django/branches/new-admin/django/contrib/admin/templates/admin/date_hierarchy.html

    r1159 r1393  
    22<div class="xfull"> 
    33<ul class="toplinks"> 
    4 {% if back %}<li class="date-back"><a href="{{back.link}}">&lsaquo; {{back.title}}</a></li>{% endif %} 
     4{% if back %}<li class="date-back"><a href="{{ back.link }}">&lsaquo; {{ back.title }}</a></li>{% endif %} 
    55{% for choice in choices %} 
    6 <li> {% if choice.link%}<a href="{{choice.link}}">{%endif%}{{choice.title}}{%if choice.link%}</a>{%endif%}</li> 
     6<li> {% if choice.link %}<a href="{{ choice.link }}">{% endif %}{{ choice.title }}{% if choice.link %}</a>{% endif %}</li> 
    77{% endfor %} 
    88</ul><br class="clear" /> 
  • django/branches/new-admin/django/contrib/admin/templates/admin/edit_inline_stacked.html

    r1286 r1393  
    11<fieldset class="module aligned"> 
    2    {% for fcw in bound_related_object.form_field_collection_wrappers %}  
     2   {% for fcw in bound_related_object.form_field_collection_wrappers %} 
    33      <h2>{{ bound_related_object.relation.opts.verbose_name|capfirst }}&nbsp;#{{ forloop.counter }}</h2> 
    44      {% if bound_related_object.show_url %}{% if fcw.obj.original %} 
     
    1212         {% endif %} 
    1313      {% endfor %} 
    14     {%endfor%} 
     14    {% endfor %} 
    1515</fieldset> 
  • django/branches/new-admin/django/contrib/admin/templates/admin/edit_inline_tabular.html

    r1286 r1393  
    11<fieldset class="module"> 
    2    <h2>{{bound_related_object.relation.opts.verbose_name_plural|capfirst}}</h2><table> 
     2   <h2>{{ bound_related_object.relation.opts.verbose_name_plural|capfirst }}</h2><table> 
    33   <thead><tr> 
    44   {% for fw in bound_related_object.field_wrapper_list %} 
    55      {% if fw.needs_header %} 
    6          <th{{fw.header_class_attribute}}> {{fw.field.verbose_name|capfirst}}  </th> 
     6         <th{{ fw.header_class_attribute }}>{{ fw.field.verbose_name|capfirst }}</th> 
    77      {% endif %} 
    88   {% endfor %} 
    9    {% for fcw in bound_related_object.form_field_collection_wrappers %}  
    10         
     9   {% for fcw in bound_related_object.form_field_collection_wrappers %} 
    1110      {% if change %}{% if original_row_needed %} 
    1211         {% if fcw.obj.original %} 
    13             <tr class="row-label {% cycle row1,row2 %}"><td colspan="{{num_headers}}"><strong>{{ fcw.obj.original }}</strong></tr> 
     12            <tr class="row-label {% cycle row1,row2 %}"><td colspan="{{ num_headers }}"><strong>{{ fcw.obj.original }}</strong></tr> 
    1413         {% endif %} 
    1514      {% endif %}{% endif %} 
    1615      {% if fcw.obj.errors %} 
    17          <tr class="errorlist"><td colspan="{{num_headers}}"> 
     16         <tr class="errorlist"><td colspan="{{ num_headers }}"> 
    1817            {{ fcw.obj.html_combined_error_list }} 
    1918         </tr> 
     
    2221      {% for bound_field in fcw.bound_fields %} 
    2322         {% if not bound_field.hidden %} 
    24          <td {{bound_field.cell_class_attribute}}>  
     23         <td {{ bound_field.cell_class_attribute }}> 
    2524            {% field_widget bound_field %} 
    2625         </td> 
     
    2827      {% endfor %} 
    2928      {% if bound_related_object.show_url %}<td> 
    30          {% if fcw.obj.original %}<a href="/r/{{ fcw.obj.original.content_type_id }}/{{ fcw.obj.original.id }}/">View on site</a>{% endif %}  
     29         {% if fcw.obj.original %}<a href="/r/{{ fcw.obj.original.content_type_id }}/{{ fcw.obj.original.id }}/">View on site</a>{% endif %} 
    3130      </td>{% endif %} 
    3231      </tr> 
     
    3635   {% for fcw in bound_related_object.form_field_collection_wrappers %} 
    3736      {% for bound_field in fcw.bound_fields %} 
    38          {% if bound_field.hidden %}   
     37         {% if bound_field.hidden %} 
    3938            {% field_widget bound_field %} 
    4039         {% endif %} 
     
    4241   {% endfor %} 
    4342</fieldset> 
    44  
  • django/branches/new-admin/django/contrib/admin/templates/admin/field_line.html

    r1042 r1393  
    44  {% if bound_field.has_label_first %} 
    55    {% field_label bound_field %} 
    6   {% endif %}     
     6  {% endif %} 
    77  {% field_widget bound_field %} 
    88  {% if not bound_field.has_label_first %} 
     
    1111  {% if change %} 
    1212    {% if bound_field.field.primary_key %} 
    13           {{ bound_field.original_value }}  
    14        {% endif %} 
     13      {{ bound_field.original_value }} 
     14    {% endif %} 
    1515    {% if bound_field.raw_id_admin %} 
    1616      {% if bound_field.existing_display %}&nbsp;<strong>{{ bound_field.existing_display|truncatewords:"14" }}</strong>{% endif %} 
    17        {% endif %} 
     17    {% endif %} 
    1818  {% endif %} 
    19   {% if bound_field.field.help_text %}<p class="help">{{bound_field.field.help_text}}</p>{% endif %} 
     19  {% if bound_field.field.help_text %}<p class="help">{{ bound_field.field.help_text }}</p>{% endif %} 
    2020{% endfor %} 
    2121</div> 
  • django/branches/new-admin/django/contrib/admin/templates/admin/filter.html

    r1128 r1393  
    1  <h3>{%blocktrans%} By {{title}} {%endblocktrans%}</h3> 
    2  <ul>          
    3  {% for choice in choices %} 
    4        <li{%if choice.selected%} class="selected"{%endif%}> 
    5        <a href="{{choice.query_string}}">{{choice.display}}</a></li> 
    6  {% endfor %} 
    7  </ul> 
     1<h3>{% blocktrans %} By {{ title }} {% endblocktrans %}</h3> 
     2<ul> 
     3{% for choice in choices %} 
     4    <li{% if choice.selected %} class="selected"{% endif %}> 
     5    <a href="{{ choice.query_string }}">{{ choice.display }}</a></li> 
     6{% endfor %} 
     7</ul> 
  • django/branches/new-admin/django/contrib/admin/templates/admin/pagination.html

    r1308 r1393  
    1  
    21<p class="paginator"> 
    3 {% if pagination_required %}  
    4 {%for i in page_range %}  
    5         {% paginator_number cl i %} 
    6 {%endfor%} 
    7 {%endif%} 
    8 {{cl.result_count}} {% ifequal cl.result_count 1 %}{{cl.opts.verbose_name}}{%else%}{{cl.opts.verbose_name_plural}}{%endifequal%} 
    9 {% if show_all_url %}&nbsp;&nbsp;<a href="{{show_all_url}}" class="showall">Show all</a>{%endif%} 
    10  
     2{% if pagination_required %} 
     3{% for i in page_range %} 
     4    {% paginator_number cl i %} 
     5{% endfor %} 
     6{% endif %} 
     7{{ cl.result_count }} {% ifequal cl.result_count 1 %}{{ cl.opts.verbose_name }}{% else %}{{ cl.opts.verbose_name_plural }}{% endifequal %} 
     8{% if show_all_url %}&nbsp;&nbsp;<a href="{{ show_all_url }}" class="showall">Show all</a>{% endif %} 
    119</p> 
    12  
    13      
  • django/branches/new-admin/django/contrib/admin/templates/admin/search_form.html

    r1028 r1393  
    1 {%if cl.lookup_opts.admin.search_fields %} 
     1{% if cl.lookup_opts.admin.search_fields %} 
    22<div id="toolbar"><form id="changelist-search" action="" method="get"> 
    3 <label><img src="{% admin_media_prefix %}img/admin/icon_searchbox.png" /></label>  
    4 <input type="text" size="40" name="{{search_var}}" value="{{cl.query|escape}}" id="searchbar" /> 
     3<label><img src="{% admin_media_prefix %}img/admin/icon_searchbox.png" /></label> 
     4<input type="text" size="40" name="{{ search_var }}" value="{{ cl.query|escape }}" id="searchbar" /> 
    55<input type="submit" value="Go" /> 
    6 {%if show_result_count %} 
    7        <span class="small quiet">{{cl.result_count}} result{{cl.result_count|pluralize}} (<a href="?">{{cl.full_result_count}} total</a>)</span> 
    8 {%endif%} 
     6{% if show_result_count %} 
     7    <span class="small quiet">{{ cl.result_count }} result{{ cl.result_count|pluralize }} (<a href="?">{{ cl.full_result_count }} total</a>)</span> 
     8{% endif %} 
    99{% for pair in cl.params.items %} 
    10        {%ifnotequal pair.0 search_var%}<input type="hidden" name="{{pair.0|escape}}" value="{{pair.1|escape}}"/>{%endifnotequal%} 
     10    {% ifnotequal pair.0 search_var %}<input type="hidden" name="{{ pair.0|escape }}" value="{{ pair.1|escape }}"/>{% endifnotequal %} 
    1111{% endfor %} 
    1212</form></div> 
    1313<script type="text/javascript">document.getElementById("searchbar").focus();</script> 
    14 {%endif%} 
     14{% endif %} 
  • django/branches/new-admin/django/contrib/admin/templates/admin/submit_line.html

    r1079 r1393  
    22<div class="submit-row"> 
    33{% if show_delete_link %}<p class="float-left"><a href="delete/" class="deletelink">{% trans "Delete" %}</a></p>{% endif %} 
    4 {% if show_save_as_new %}<input type="submit" value="{% trans 'Save as new' %}" name="_saveasnew" {{onclick_attrib}}/>{%endif%} 
    5 {% if show_save_and_add_another %}<input type="submit" value="{% trans 'Save and add another' %}" name="_addanother" {{onclick_attrib}} />{% endif %} 
    6 {% if show_save_and_continue %}<input type="submit" value="{% trans 'Save and continue editing' %}" name="_continue" {{onclick_attrib}}/>{% endif %} 
    7 {% if show_save %}<input type="submit" value="{% trans 'Save' %}" class="default" {{onclick_attrib}}/>{% endif %} 
     4{% if show_save_as_new %}<input type="submit" value="{% trans 'Save as new' %}" name="_saveasnew" {{ onclick_attrib }}/>{%endif%} 
     5{% if show_save_and_add_another %}<input type="submit" value="{% trans 'Save and add another' %}" name="_addanother" {{ onclick_attrib }} />{% endif %} 
     6{% if show_save_and_continue %}<input type="submit" value="{% trans 'Save and continue editing' %}" name="_continue" {{ onclick_attrib }}/>{% endif %} 
     7{% if show_save %}<input type="submit" value="{% trans 'Save' %}" class="default" {{ onclick_attrib }}/>{% endif %} 
    88</div>