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 8f935dbe56e372e16dd8c5fa4e40ecaab4303765..83c8c52da7c7e5a8b8146212e4c33ca50fd1642e 100644 --- a/source/import_documentation/Mixins/widget-mixin.rst +++ b/source/import_documentation/Mixins/widget-mixin.rst @@ -125,19 +125,36 @@ Attributes ``multiple-[field]`` ~~~~~~~~~~~~~~~~~~~~ - Show ``[field]`` as multiple field containing - one widget for each child. + Allows to display the container ``[field]`` nested in the current resource. + + 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 without value, default multiple widget is used. - All attributes starting by ``each`` will be applied on each child, - without the prefix ``each``. - - ``each-label-[field]``: label of each child of multiple widget - - ``each-class-[field]``: class of each child of multiple widget - - ``each-range-[field]``: range value of each child of multiple widget + It can be used in : + + - ``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"`` + + .. 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: