- Author:
- nasp
- Posted:
- October 7, 2011
- Language:
- HTML/template
- Version:
- 1.3
- Score:
- 1 (after 1 ratings)
Here's the python code to produce an admin related widget with the edit and delete link also.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 | {{ widget }}
{% if can_change_related %}
<a class="related-widget-wrapper-link related-widget-wrapper-change-link" id="edit_id_{{ name }}" data-href-template="{{ change_url_template }}"{% if change_url %} href="{{ change_url }}"{% endif %} title="{{ change_help_text }}">
<img src="{{ media_prefix }}img/admin/icon_changelink.gif" width="10" height="10" alt="{{ change_help_text }}"/>
</a>
{% endif %}
{% if can_add_related %}
<a class="related-widget-wrapper-link related-widget-wrapper-add-link add-related" href="{{ add_url }}" id="add_id_{{ name }}" title="{{ add_help_text }}">
<img src="{{ media_prefix }}img/admin/icon_addlink.gif" width="10" height="10" alt="{{ add_help_text }}"/>
</a>
{% endif %}
{% if can_delete_related %}
<a class="related-widget-wrapper-link related-widget-wrapper-delete-link" id="delete_id_{{ name }}" data-href-template="{{ delete_url_template }}"{% if delete_url %} href="{{ delete_url }}"{% endif %} title="{{ delete_help_text }}">
<img src="{{ media_prefix }}img/admin/icon_deletelink.gif" width="10" height="10" alt="{{ delete_help_text }}"/>
</a>
{% endif %}
|
More like this
- Bootstrap Accordian by Netplay4 5 years, 10 months ago
- Bootstrap theme for django-endless-pagination? by se210 8 years, 10 months ago
- Bootstrap theme for django-endless-pagination? by se210 8 years, 10 months ago
- Reusable form template with generic view by roldandvg 8 years, 11 months ago
- Pagination Django with Boostrap by guilegarcia 9 years, 1 month ago
Comments
Please login first before commenting.