diff --git a/django/contrib/admin/media/css/global.css b/django/contrib/admin/media/css/global.css index 9fa90d3542..5e14b774d1 100644 --- a/django/contrib/admin/media/css/global.css +++ b/django/contrib/admin/media/css/global.css @@ -141,6 +141,10 @@ input[type=submit].default:active { background-image:url(../img/admin/default-bg .submit-row input { margin:0 0 0 5px; } .submit-row .float-left { padding-top:.1em; } +/* ACTIONS */ +.actions { border-bottom:1px solid #eee; text-align:right; } +.collection { border-top: 1ex solid #7CA0C7; } + /* FORM ROWS */ .form-row { clear:both; padding:8px 12px; font-size:11px; } html>body .form-row { border-bottom:1px solid #eee; } diff --git a/django/contrib/admin/templates/admin/edit_inline_stacked.html b/django/contrib/admin/templates/admin/edit_inline_stacked.html index 62549ef82d..8c1c73752f 100644 --- a/django/contrib/admin/templates/admin/edit_inline_stacked.html +++ b/django/contrib/admin/templates/admin/edit_inline_stacked.html @@ -12,5 +12,11 @@ {% admin_field_line bound_field %} {% endif %} {% endfor %} +
+ +
{% endfor %} +
+ +
\ No newline at end of file diff --git a/django/contrib/admin/templates/admin/edit_inline_tabular.html b/django/contrib/admin/templates/admin/edit_inline_tabular.html index 4ccf61ddab..c4c76e464d 100644 --- a/django/contrib/admin/templates/admin/edit_inline_tabular.html +++ b/django/contrib/admin/templates/admin/edit_inline_tabular.html @@ -7,7 +7,7 @@ {{ fw.field.verbose_name|capfirst }} {% endif %} {% endfor %} - + {% for fcw in bound_related_object.form_field_collection_wrappers %} {% if change %}{% if original_row_needed %} @@ -31,14 +31,15 @@ {% if bound_related_object.show_url %} {% if fcw.obj.original %}View on site{% endif %} {% endif %} - + {% endfor %} +
- +
{% for fcw in bound_related_object.form_field_collection_wrappers %} {% for bound_field in fcw.bound_fields %} {% if bound_field.hidden %} diff --git a/django/contrib/admin/templatetags/admin_modify.py b/django/contrib/admin/templatetags/admin_modify.py index 2ff6b25e0e..9afe134dc2 100644 --- a/django/contrib/admin/templatetags/admin_modify.py +++ b/django/contrib/admin/templatetags/admin_modify.py @@ -139,8 +139,8 @@ class StackedBoundRelatedObject(BoundRelatedObject): super(StackedBoundRelatedObject, self).__init__(related_object, field_mapping, original) fields = self.relation.editable_fields() self.field_mappings.fill() - self.form_field_collection_wrappers = [FormFieldCollectionWrapper(field_mapping ,fields) - for field_mapping in self.field_mappings] + self.form_field_collection_wrappers = [FormFieldCollectionWrapper(field_mapping ,fields, i) + for (i,field_mapping) in self.field_mappings.items()] self.show_url = original and hasattr(self.relation.opts, 'get_absolute_url') def template_name(self):