{% extends "admin/base_site.html" %} {% load i18n %} {% block bodyclass %}grp-doc{% endblock %} {% block content-class %}{% endblock %} {% block title %}Grappelli Documentation » Object-Tools{% endblock %} {% block extrahead %} {% endblock %} {% block breadcrumbs %}
The object-tools carry certain actions which apply directly to an object.
They appear on the right-hand side within the #grp-content-title and are used with changelists and changeforms.
Title of your object
{% filter force_escape %}
Title of your object
{% templatetag openblock %} block object-tools {% templatetag closeblock %}{% templatetag openblock %} endblock {% templatetag closeblock %}
{% endfilter %}
The object-tools are defined in a block {% templatetag openblock %} block object-tools {% templatetag closeblock %}.
They are always written as a ul.grp-object-tools carrying another block {% templatetag openblock %} block object-tools-items {% templatetag closeblock %} which contains li and a elements representing the object-tools options.
Title of your object
{% filter force_escape %}
{% templatetag openblock %} block object-tools {% templatetag closeblock %}
{% templatetag openblock %} block object-tools-items {% templatetag closeblock %}
- Object-Tools Item
- Object-Tools Item
{% templatetag openblock %} endblock {% templatetag closeblock %}
{% templatetag openblock %} endblock {% templatetag closeblock %}
{% endfilter %}
There are different types of items which might be defined by the use of classes for the a elements. The very basic item is not further specified – it comes as a plain link.
The item for adding something (usually used on changelists) gets the class .grp-add-link.
The item for viewing something outside the admin (usually used on changeforms) may get the class .grp-viewsite-link but stylewise it is recognized by its target="_blank". All links with such a target are handled as external links.
Title of your object
{% filter force_escape %}
{% templatetag openblock %} block object-tools {% templatetag closeblock %}
{% templatetag openblock %} block object-tools-items {% templatetag closeblock %}
- History
- Add something
- View on site
- View on site
{% templatetag openblock %} endblock {% templatetag closeblock %}
{% templatetag openblock %} endblock {% templatetag closeblock %}
{% endfilter %}
By default the items visually appear in a reduced state.
Add .grp-state-focus to elements you want to characterize as major ones.
Title of your object
{% filter force_escape %}
{% templatetag openblock %} block object-tools {% templatetag closeblock %}
{% templatetag openblock %} block object-tools-items {% templatetag closeblock %}
- Item
- Focused Item
{% templatetag openblock %} endblock {% templatetag closeblock %}
{% templatetag openblock %} endblock {% templatetag closeblock %}
{% endfilter %}