Skip to content
Snippets Groups Projects
Commit 96b1e85e authored by Matthieu Fesselier's avatar Matthieu Fesselier
Browse files

Merge branch 'empty-widget' into 'dev'

Refresh multiple-field attribute doc

See merge request documentation/doc!24
parents 522c8400 27dbb355
No related branches found
No related tags found
No related merge requests found
......@@ -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``
......
......@@ -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:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment