Commit 731fadd0 authored by Côme Chilliet's avatar Côme Chilliet

Edited stuff according to Benoit’s requests

parent 5eb8bea1
......@@ -97,8 +97,10 @@ ArrayAttribute and SetAttribute
Allow to handle a multi-valuated attribute.
The constructor takes only two parameters:
An attribute, which is one of the above.
An array of default values.
* An attribute, which is one of the above.
* An array of default values.
A multiple select will be used for displaying values, with remove and add buttons.
SetAttribute is the same, but does not allow several identical values.
......
......@@ -18,7 +18,7 @@ custom template
By default simplePlugin does a template for you, but if you want to add some elements to the template, or just render the sections in a different order, or that kind of things, here's what to do:
Change **templatePath** value to your custom template path (usually in the constructor, using get_template_path).
In your template, you'll be able to use the $sections array that contains each section render.
In your template, you'll be able to use the **$sections** array that contains each section render.
For instance:
.. code-block:: smarty
......@@ -38,7 +38,7 @@ For instance:
-->
</script>
You need to add the hidden input at the end in order for the POST analysis to work.
You need to add the **hidden** input at the end in order for the POST analysis to work.
The script is needed if you want the auto-focusing of first field to work.
simplePlugin attributes values and methods
......
......@@ -38,7 +38,12 @@ No need to set any **plSection** on plugins with objectType *user* and selfModif
they'll appear in the 'My account' section anyway.
You can also create a new menu section in this attribute using the following syntax:
array('*mysection*' => array('name' => _('*My section*'), 'priority' => *100*))
.. code-block:: php
<?php
array('mysection' => array('name' => _('My section'), 'priority' => 100))
Replace *mysection* with a lowercase id for your section and *My section* with the name to display in the menu.
The existing sections are:
......@@ -114,6 +119,7 @@ But you can omit *filter* most of the time (defaults to '*myfield*=%oldvalue%')
.. code-block:: php
<?php
'plForeignKeys' => array(
'manager' => 'user'
)
......@@ -131,5 +137,15 @@ plCategory
ACL categories will be filled automagically if you use either **plManages** or **plObjectType**. This is the recommanded way to go.
If you do need to specify ACL categories, you can create an acl category by specifying a descriptive array for it:
:code:`'plCategory' => array('acl' => array('description' => _('ACL'), 'objectClass' => array('gosaAcl','gosaRole'))),
An ACL category only contains a description and a list of LDAP objectClasses (for some historical reason)`.
.. code-block:: php
<?php
'plCategory' => array(
'acl' => array(
'description' => _('ACL'),
'objectClass' => array('gosaAcl','gosaRole')
)
),
An ACL category only contains a description and a list of LDAP objectClasses (for some historical reason)
......@@ -168,10 +168,11 @@ For each section you might also specify keys 'icon' with a section icon path, or
Displaying the plugin in FusionDirectory
----------------------------------------
Put the plugin code into a directory FusionDirectory is reading (see above).
Run :shell:`fusiondirectory-setup --update-cache` as root.
Log out, log in.
A tab should now show in user edition mode, with the attributes we specified:
* Put the plugin code into a directory FusionDirectory is reading (see above).
* Run :shell:`fusiondirectory-setup --update-cache` as root.
* Log out, log in.
A tab should now shows in user edition mode, with the attributes we specified:
.. image:: /_static/images/demoplugin.png
......
......@@ -26,7 +26,7 @@ Here is the minimal index.theme file to inherit another icon theme.
Comment=Example from documentation
Inherits=oxygen
For an example of a more complex index.theme file look at the one of the default theme: https://git.fusiondirectory.org/gitweb/?p=main/fusiondirectory.git;a=blob;f=html/themes/breezy/index.theme;h=a8adbcbea8e9cf20fc3447232bacba54e4fbaa41;hb=refs/heads/master
For an example of a more complex index.theme file look at `the one of the default theme <https://gitlab.fusiondirectory.org/fusiondirectory/fd/blob/e2d1369485f03dec3ac9886deba8606ceec897f2/html/themes/breezy/index.theme>`_
All main icon themes should be working, you can activate them by using a symlink in the right folder.
For instance on Debian if I want gnome icon theme:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment