{% load i18n admin_urls %} {% load mix_admin %} {% block object-tools-items %} {% comment %} Eric: custom action 3:自定义 action {% endcomment %} {% if action_form.fields.action.choices and is_mix %} {% for action in action_form.fields.action.choices %} {% with action_name=action|first %} {% if action_name != '' %} {% with options=action_options|get_item:action_name %}
  • {% if action_name == 'delete_selected' %}批量删除{% else %}{{ action|last }}{% endif %}
  • {% endwith %} {% endif %} {% endwith %} {% endfor %} {% endif %} {% comment %} Eric: custom action 3:自定义 action {% endcomment %} {% if has_add_permission %}
  • {% url cl.opts|admin_urlname:'add' as add_url %} 增加
  • {% endif %} {% endblock %}