{% extends "admin/base_site.html" %} {% load i18n %} {% block bodyclass %}grp-doc{% endblock %} {% block content-class %}{% endblock %} {% block title %}Grappelli Documentation » Tools{% endblock %} {% block extrahead %} {% endblock %} {% block breadcrumbs %}
Tools are certain actions which apply to specific contents (e.g. modules or rows).
Tools are always written as a ul.grp-tools carrying li and a elements representing the tools options.
They appear on the right-hand side within their parent element.
Using icons for tools basically requires to add the class .grp-icon to the a.
The actual icons are furthermore defined by additional classes, e.g. .grp-add-handler.
In the example below you'll find all icons & classes delivered with Grappelli.
If you add custom icons make sure that they meet following requirements: Each icon should be placed – horizontally and vertically centered – on a canvas with the size of 24 x 24 pixels. The size of the actual icon might vary.
You can combine icons with text. Just add the class .grp-icon-text to the a.
Of course you have to add a specific icon-class too, e.g. .grp-icon-text.grp-add-handler.
For a tool represented as plain text without an icon just add the class .grp-text to the a.
In that case you don't have to add a specific icon-class.
{% filter force_escape %}
{% endfilter %}
Tools refering to modules have to be placed directly after the modules heading.
Tools refering to rows have to be placed as last elements within rows.
Tools refering to groups have to be placed directly after the groups heading.
In special cases you might repeat tools at the bottom of groups, e.g. an add-handler.
For that purpose place a .grp-module.grp-transparent at the end of the group and put the tools inside a .grp-row (as shown in the example below).
{% filter force_escape %}
{% endfilter %}