Skip to content

Commit

Permalink
magic-removal: cleaned up edit-inline tabular interface in preparatio…
Browse files Browse the repository at this point in the history
…n for new edit-inline interface (thanks for the new CSS/images, Wilson)

git-svn-id: http://code.djangoproject.com/svn/django/branches/magic-removal@1839 bcc190cf-cafb-0310-a4f2-bffc1f526a37
  • Loading branch information
jacobian committed Jan 6, 2006
1 parent c93965b commit 84b7590
Show file tree
Hide file tree
Showing 9 changed files with 175 additions and 124 deletions.
7 changes: 5 additions & 2 deletions django/contrib/admin/media/css/base.css
@@ -1,2 +1,5 @@
@import url(global.css);
@import url(changelists.css);
@import "null?\"\{";
@import url('global.css');
@import url('changelists.css');

/*\*/ @import "patch-iewin.css"; /**/
243 changes: 122 additions & 121 deletions django/contrib/admin/media/css/global.css

Large diffs are not rendered by default.

Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
49 changes: 48 additions & 1 deletion django/contrib/admin/templates/admin/edit_inline_tabular.html
@@ -1,4 +1,50 @@
{% load admin_modify %}

<fieldset class="module editinline">
<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>
{% endif %}
{% endfor %}
<th>&nbsp;</th>
</tr>
</thead>
<tfoot>
<tr>
<td colspan='{{ num_headers }}'>
<button class="addlink" name="command" value="{{ bound_related_object.relation.var_name }}.add">
Add another {{ bound_related_object.relation.opts.verbose_name }}
</button>
</td>
</tr>
</tfoot>
<tbody>
{% for fcw in bound_related_object.form_field_collection_wrappers %}
<tr class="{% cycle row1,row2 %}{% if fcw.obj.errors %} error{% endif %}">
{% for bound_field in fcw.bound_fields %}
{% if not bound_field.hidden %}
<td {{ bound_field.cell_class_attribute }}>
{{ bound_field.html_error_list }}
{% field_widget bound_field %}
</td>
{% endif %}
{% endfor %}
<td class="controls" >
<button class="inline-deletelink" name="command" value="{{ bound_related_object.relation.var_name }}.{{ fcw.index }}.delete">
Delete {{ bound_related_object.relation.opts.verbose_name }}
</button>
</td>
</tr>
{% endfor %}
</tbody>
</table>
</fieldset>

<!--
<fieldset class="module">
<h2>{{ bound_related_object.relation.opts.verbose_name_plural|capfirst }}</h2><table>
<thead><tr>
Expand All @@ -12,7 +58,7 @@ <h2>{{ bound_related_object.relation.opts.verbose_name_plural|capfirst }}</h2><t
{% 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 }}"></tr>
{% endif %}
{% endif %}{% endif %}
{% if fcw.obj.errors %}
Expand Down Expand Up @@ -48,3 +94,4 @@ <h2>{{ bound_related_object.relation.opts.verbose_name_plural|capfirst }}</h2><t
{% endfor %}
{% endfor %}
</fieldset>
-->

0 comments on commit 84b7590

Please sign in to comment.