{% load sitevars %}{% sitevars %}<span class="nobreak">{{ basewidget }}
<span class="related-buttons">{% if model.get_list_url %}
  <a href="{{ model.get_list_url }}" class="related-lookup" id="lookup_id_{{ field }}" onclick="return showRelatedLookupPopup(this);">
    <img src="{{ admin }}/img/admin/icon_searchbox.png" width="12" height="10" style="cursor: pointer;" alt="Select related item" title="Select related item" />
  </a>{% endif %}{% if instance %}{% if instance.get_edit_url %}
  <a href="{{ instance.get_edit_url }}" class="related-edit" id="edit_id_{{ field }}" onclick="return showRelatedEditPopup(this);">
    <img src="{{ admin }}/img/admin/icon_changelink.gif" width="10" height="10" style="cursor: pointer;" alt="Edit related item" title="Edit related item" />
  </a>{% endif %}{% endif %}{% if model.get_create_url %}
  <a href="{{ model.get_create_url }}" class="related-add" id="add_id_{{ field }}" onclick="return showRelatedAddPopup(this);">
    <img src="{{ admin }}/img/admin/icon_addlink.gif" width="10" height="10" style="cursor: pointer;" alt="Add new related item" title="Add new related item" />
  </a>{% endif %}
</span></span>