Ticket #6779: inline_delete_only_existing.diff
File inline_delete_only_existing.diff, 2.6 KB (added by , 17 years ago) |
---|
-
django/contrib/admin/templates/admin/edit_inline/stacked.html
6 6 {% for inline_admin_form in inline_admin_formset %} 7 7 <div class="inline-related {% if forloop.last %}last-related{% endif %}"> 8 8 <h2><b>{{ inline_admin_formset.opts.verbose_name|title }}:</b> {% if inline_admin_form.original %}{{ inline_admin_form.original }}{% else %} #{{ forloop.counter }}{% endif %} 9 {% if inline_admin_formset.formset.deletable %}<span class="delete">{{ inline_admin_form.deletion_field.field }} {{ inline_admin_form.deletion_field.label_tag }}</span>{% endif %}9 {% if inline_admin_formset.formset.deletable and inline_admin_form.original %}<span class="delete">{{ inline_admin_form.deletion_field.field }} {{ inline_admin_form.deletion_field.label_tag }}</span>{% endif %} 10 10 </h2> 11 11 {% if inline_admin_form.show_url %} 12 12 <p><a href="/r/{{ inline_admin_form.original.content_type_id }}/{{ inline_admin_form.original.id }}/">View on site</a></p> -
django/contrib/admin/templates/admin/edit_inline/tabular.html
13 13 {% endfor %} 14 14 {% if inline_admin_formset.formset.deletable %}<th>{% trans "Delete" %}?</th>{% endif %} 15 15 </tr></thead> 16 16 17 17 {% for inline_admin_form in inline_admin_formset %} 18 18 19 19 <tr class="{% cycle row1,row2 %} {% if inline_admin_form.original or inline_admin_form.show_url %}has_original{% endif %}"> 20 20 21 21 <td class="original">{% if inline_admin_form.original or inline_admin_form.show_url %}<p> … … 44 44 {% endfor %} 45 45 {% endfor %} 46 46 {% endfor %} 47 48 {% if inline_admin_formset.formset.deletable %}<td class="delete">{ { inline_admin_form.deletion_field.field }}</td>{% endif %}49 47 48 {% if inline_admin_formset.formset.deletable %}<td class="delete">{% if inline_admin_form.original %}{{ inline_admin_form.deletion_field.field }}{% endif %}</td>{% endif %} 49 50 50 </tr> 51 51 52 52 {% endfor %} 53 53 54 54 </table> 55 55 56 56 </fieldset> 57 57 </div> 58 58 59 59 {# <ul class="tools"> #} 60 60 {# <li><a class="add" href="">Add another {{ inline_admin_formset.opts.verbose_name|title }}</a></li> #} 61 61 {# </ul> #} 62 62 63 63 </div>