diff --git a/source/import_documentation/Mixins/grouper-mixin.rst b/source/import_documentation/Mixins/grouper-mixin.rst index 047b670293f0622c728063caab4298fe2c2aa511..9b8270511b2b2b99bf4a080bf4ab738fd8ace98e 100644 --- a/source/import_documentation/Mixins/grouper-mixin.rst +++ b/source/import_documentation/Mixins/grouper-mixin.rst @@ -33,11 +33,23 @@ Attributes When used with the pagination, each group is paginated. -``group-by-widget`` +``group-widget`` ~~~~~~~~~~~~~~~~~~~ - default: ``solid-group-div`` + default: ``solid-group-default`` The name of the widget to use as a group widget. + It takes the name of the group as a ``value`` and put content in a ``div[data-content]``. + Here is an example of a custom group widget: + + .. code:: html + + <solid-widget name="custom-group"> + <template> + <h2>${value}</h2> + <section data-content></section> + </template> + </solid-widget> + ``group-class`` diff --git a/source/import_documentation/Mixins/widget-mixin.rst b/source/import_documentation/Mixins/widget-mixin.rst index 7dd3e31941cccb74a7ef896b3190bb7948f2837b..83c8c52da7c7e5a8b8146212e4c33ca50fd1642e 100644 --- a/source/import_documentation/Mixins/widget-mixin.rst +++ b/source/import_documentation/Mixins/widget-mixin.rst @@ -125,12 +125,10 @@ Attributes ``multiple-[field]`` ~~~~~~~~~~~~~~~~~~~~ - This attribute allows to manage containers inside a resource. - Show ``[field]`` as multiple field containing - one widget for each child. + Allows to display the container ``[field]`` nested in the current resource. - Multiple accepts a container's URL as value (= the ``field`` must refer to an URL) - and creates an intern component to display it, its resource is this container. + It takes a container URI as a value, fetch all the resources + of this container and display them. Multiple widget can be specified, example: ``multiple-skills="my-custom-multiple-widget"``. If argument is used @@ -139,14 +137,24 @@ Attributes It can be used in : - - Solid-display : the field in ``multiple-field`` will be transfered in a solid-multiple component by default. - If ``multiple-field`` is followed by something, this will be transfered inside a - solid-display (``multiple-[field]-empty-widget``, ``multiple-[field]-next``) . - - Solid-form : the "field" in ``multiple-field`` will be transfered in a - solid-form-multiple component by default. - Thanks to the multiple attribute, it is possible to add and remove elements. + - ``solid-display``: a nested ``solid-display`` will be created with the container URI as + data-src. + All attributes of the form ``multiple-[field]-[attribute]`` are transfered + on the nested ``solid-display`` as ``[attribute]``. + For example, to choose the fields you want to display, you can set: + ``multiple-[field]-fields="name, @id"`` - In both cases, the widget of ``multiple-[field]`` can be modified. + .. code:: html + + <solid-display + data-src="http://server/users/1/" + fields="skills" + multiple-skills + multiple-skills-fields="name" + ></solid-display> + + - ``solid-form`` : all the resources of the container are displayed in a text widget. + Buttons are automatically created to add and remove elements. For ``solid-form`` only: