From 49611da0d9c9580e2fd03f4bc3ca59ced5fc03bf Mon Sep 17 00:00:00 2001 From: Matthieu Fesselier <matthieu.fesselier@gmail.com> Date: Mon, 18 May 2020 11:18:40 +0200 Subject: [PATCH] update: presentation fixes --- .../Components/SiB-Display.rst | 8 +- .../Components/SiB-Map.rst | 3 +- .../Mixins/counter-mixin.rst | 2 +- .../Mixins/grouper-mixin.rst | 2 +- .../Mixins/highlighter-mixin.rst | 4 +- .../Mixins/widget-mixin.rst | 4 +- .../Widgets/display-widgets.rst | 66 ++++++++----- .../Widgets/form-widgets.rst | 99 ++++++++++++------- .../Widgets/multiple-widgets.rst | 25 +++-- .../Widgets/other-widgets.rst | 31 ++++-- 10 files changed, 153 insertions(+), 91 deletions(-) diff --git a/source/import_documentation/Components/SiB-Display.rst b/source/import_documentation/Components/SiB-Display.rst index cfa0baf..395aa11 100644 --- a/source/import_documentation/Components/SiB-Display.rst +++ b/source/import_documentation/Components/SiB-Display.rst @@ -39,14 +39,14 @@ Please check their documentation to know more about their capabilities. Attributes ---------- -fields -~~~~~~ +``fields`` +~~~~~~~~~~ By default, all displayed fields are direct children of ``<solid-display>``. Make sure you don’t give your set the same name as a field as it would result in an infinite loop. -child-xyz -~~~~~~~~~~~~~~~~ +``child-xyz`` +~~~~~~~~~~~~~ add attribute ``xyz`` to all children. diff --git a/source/import_documentation/Components/SiB-Map.rst b/source/import_documentation/Components/SiB-Map.rst index 5037037..abd39d8 100644 --- a/source/import_documentation/Components/SiB-Map.rst +++ b/source/import_documentation/Components/SiB-Map.rst @@ -45,8 +45,7 @@ added to interact with the list of data being displayed. ``fields`` ~~~~~~~~~~ - -List of the fields to display in a popup which opens when a marker is clicked. If the attribute is not defined, no popup will show up. + List of the fields to display in a popup which opens when a marker is clicked. If the attribute is not defined, no popup will show up. Events ------- diff --git a/source/import_documentation/Mixins/counter-mixin.rst b/source/import_documentation/Mixins/counter-mixin.rst index 3b4662f..435090f 100644 --- a/source/import_documentation/Mixins/counter-mixin.rst +++ b/source/import_documentation/Mixins/counter-mixin.rst @@ -14,7 +14,7 @@ Attributes ---------- ``counter-template`` -~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~ Template used to show the number of resources. It takes a string in which you can use HTML tags, and the ``counter`` variable to add the number. diff --git a/source/import_documentation/Mixins/grouper-mixin.rst b/source/import_documentation/Mixins/grouper-mixin.rst index a0ad124..9974710 100644 --- a/source/import_documentation/Mixins/grouper-mixin.rst +++ b/source/import_documentation/Mixins/grouper-mixin.rst @@ -34,7 +34,7 @@ Attributes ``group-by-widget`` ~~~~~~~~~~~~~~~~~~~ - *default: ``solid-group-div``* + default: ``solid-group-div`` The name of the widget to use as a group widget. diff --git a/source/import_documentation/Mixins/highlighter-mixin.rst b/source/import_documentation/Mixins/highlighter-mixin.rst index 0d2af95..b0d0735 100644 --- a/source/import_documentation/Mixins/highlighter-mixin.rst +++ b/source/import_documentation/Mixins/highlighter-mixin.rst @@ -1,5 +1,5 @@ highlighter-mixin -========== +================= The highlighter mixin is a post-processor mixin, compatible with list-mixin. It provides the ability to put some resources at the top of the list, depending of the values of their properties. @@ -14,7 +14,7 @@ Attributes ---------- ``highlight-[field]`` -~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~ Put the resource at the top of the list if ``[field]`` is equal to the attribute value. In this example, all the users with a ``first_name`` equal to ``pierre`` will be at the beginning of the list. diff --git a/source/import_documentation/Mixins/widget-mixin.rst b/source/import_documentation/Mixins/widget-mixin.rst index 798df12..ca97f30 100644 --- a/source/import_documentation/Mixins/widget-mixin.rst +++ b/source/import_documentation/Mixins/widget-mixin.rst @@ -63,8 +63,8 @@ Attributes ~~~~~~~~~~~~~~~~~~ The widget to be used to display the ``[field]`` -default-widget -~~~~~~~~~~~~~~~~ +``default-widget`` +~~~~~~~~~~~~~~~~~~ The widget to use for all the fields, except if a specific one is defined for a field. ``action-[field]`` diff --git a/source/import_documentation/Widgets/display-widgets.rst b/source/import_documentation/Widgets/display-widgets.rst index 825468b..5c140b7 100644 --- a/source/import_documentation/Widgets/display-widgets.rst +++ b/source/import_documentation/Widgets/display-widgets.rst @@ -3,26 +3,46 @@ Display widgets Startin'blox provides a list of default widgets to display content: -- ``solid-display-value``: Displays the value. -- ``solid-display-div``: Displays the ``value`` inside a ``<div>`` - HTML tag. -- ``solid-display-labelled-div``: Displays the ``value`` inside a - ``<div>`` HTML tag, after the ``label`` contained in a ``<label>`` - HTML tag -- ``solid-display-multiline``:Displays the ``value`` inside a - ``<div>``, ``\n`` are replaced by ``<br>``. -- ``solid-display-labelled-boolean``: Displays the ``label`` inside a - ``<label>`` HTML tag if the ``value`` is true -- ``solid-display-img``: Inserts the ``value`` as the src attribute - value of an ``<img>`` HTML tag. -- ``solid-display-mailto``: Displays a link inside a ``<a>`` HTML tag - with a ``mailto:value`` as path. If a label is defined for this - field, it’s displayed as the content of the link. -- ``solid-display-tel``: Displays a link inside a ``<a>`` HTML tag - with a ``tel:value`` as path -- ``solid-display-link``: Displays a link inside a ``<a>`` HTML tag - with the value as path, and the label as text content -- ``solid-display-date``: Displays a date in the browser’s default - locale format -- ``solid-display-date-time``: Displays a date and a time in the - browser’s default locale format +``solid-display-value`` +~~~~~~~~~~~~~~~~~~~~~~~ + Displays the value. + +``solid-display-div`` +~~~~~~~~~~~~~~~~~~~~~ + Displays the ``value`` inside a ``<div>`` HTML tag. + +``solid-display-labelled-div`` +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Displays the ``value`` inside a ``<div>`` HTML tag, after the ``label`` contained in a ``<label>`` HTML tag. + +``solid-display-multiline`` +~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Displays the ``value`` inside a ``<div>``, ``\n`` are replaced by ``<br>``. + +``solid-display-labelled-boolean`` +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +Displays the ``label`` inside a ``<label>`` HTML tag if the ``value`` is true. + +``solid-display-img`` +~~~~~~~~~~~~~~~~~~~~~ + Inserts the ``value`` as the src attribute value of an ``<img>`` HTML tag. + +``solid-display-mailto`` +~~~~~~~~~~~~~~~~~~~~~~~~~ + Displays a link inside a ``<a>`` HTML tag with a ``mailto:value`` as path. If a label is defined for this field, it’s displayed as the content of the link. + +``solid-display-tel`` +~~~~~~~~~~~~~~~~~~~~~ + Displays a link inside a ``<a>`` HTML tag with a ``tel:value`` as path. + +``solid-display-link`` +~~~~~~~~~~~~~~~~~~~~~~ + Displays a link inside a ``<a>`` HTML tag with the value as path, and the label as text content. + +``solid-display-date`` +~~~~~~~~~~~~~~~~~~~~~~ + Displays a date in the browser’s default locale format. + +``solid-display-date-time`` +~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Displays a date and a time in the browser’s default locale format. diff --git a/source/import_documentation/Widgets/form-widgets.rst b/source/import_documentation/Widgets/form-widgets.rst index 3579fad..5c68c06 100644 --- a/source/import_documentation/Widgets/form-widgets.rst +++ b/source/import_documentation/Widgets/form-widgets.rst @@ -3,40 +3,65 @@ Form widgets Startin'blox provides a list of default widgets to use in a form: -Form widgets -~~~~~~~~~~~~ - -- ``solid-form-label-text``: Inserts an ``<input/>`` HTML tag of type - “textâ€, in a ``<label>`` HTML tag. -- ``solid-form-checkbox``: Inserts an ``<input/>`` HTML tag of type - “checkboxâ€, in a ``<label>`` HTML tag. -- ``solid-form-date``: Inserts an ``<input/>`` HTML tag of type - “dateâ€, in a ``<label>`` HTML tag. -- ``solid-form-range-date``: -- ``solid-form-json``: Inserts an ``<input/>`` HTML tag of type - “textâ€, in a ``<label>`` HTML tag, and with its ``value`` converted - from JSON to string -- ``solid-form-placeholder-text``: Inserts an ``<input/>`` HTML tag - of type “textâ€, with the ``label`` as placeholder. -- ``solid-form-textarea``: Inserts an ``<textarea>`` HTML tag in a - ``<label>`` HTML tag. -- ``solid-form-dropdown``: Inserts a ``<select>`` HTML tag to select - a unique value from a list. The list is provided via the - ``range-xyz``, which expects a container’s URL. **xyz** is the name - of the field using the ``solid-form-dropdown`` widget. -- ``solid-form-placeholder-dropdown``: Inserts a ``<select>`` HTML - tag to select a unique value from a list. It has no label but a - default disabled value as a label -- ``solid-form-auto-completion``: Inserts a ``<input />`` HTML tag - and load an autocomplete plugin. The list is provided via the - ``range-xyz``, which expects a container’s URL. **xyz** is the name - of the field using the ``solid-form-auto-completion`` widget. -- ``solid-form-number``: Inserts an ``<input/>`` HTML tag of type - “numberâ€, in a ``<label>`` HTML tag. -- ``solid-form-range-number``: -- ``solid-form-file``: Inserts an ``<input/>`` and an - ``<input type="file"/>``. when a file is selected it’s uploaded, URL - of file is returned by request and set as the ``<input/>`` value. The - upload URL is provided via the ``upload-url`` attribute. -- ``solid-form-hidden``: Inserts an ``<input/>`` HTML tag of type - “hiddenâ€, in a ``<label>`` HTML tag. \ No newline at end of file +``solid-form-label-text`` +~~~~~~~~~~~~~~~~~~~~~~~~~ + Inserts an ``<input/>`` HTML tag of type “textâ€, in a ``<label>`` HTML tag. + +``solid-form-checkbox`` +~~~~~~~~~~~~~~~~~~~~~~~ + Inserts an ``<input/>`` HTML tag of type “checkboxâ€, in a ``<label>`` HTML tag. + +``solid-form-date`` +~~~~~~~~~~~~~~~~~~~ + Inserts an ``<input/>`` HTML tag of type “dateâ€, in a ``<label>`` HTML tag. + +``solid-form-range-date`` +~~~~~~~~~~~~~~~~~~~~~~~~~ + + +``solid-form-json`` +~~~~~~~~~~~~~~~~~~~ + Inserts an ``<input/>`` HTML tag of type “textâ€, in a ``<label>`` HTML tag, and with its ``value`` converted from JSON to string + +``solid-form-placeholder-text`` +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Inserts an ``<input/>`` HTML tag of type “textâ€, with the ``label`` as placeholder. + +``solid-form-textarea`` +~~~~~~~~~~~~~~~~~~~~~~~ + Inserts an ``<textarea>`` HTML tag in a ``<label>`` HTML tag. + +``solid-form-dropdown`` +~~~~~~~~~~~~~~~~~~~~~~~ + Inserts a ``<select>`` HTML tag to select a unique value from a list. + The list is provided via the ``range-xyz``, which expects a container’s URL. + **xyz** is the name of the field using the ``solid-form-dropdown`` widget. + +``solid-form-placeholder-dropdown`` +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Inserts a ``<select>`` HTML tag to select a unique value from a list. + It has no label but a default disabled value as a label + +``solid-form-auto-completion`` +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Inserts a ``<input />`` HTML tag and load an autocomplete plugin. + The list is provided via the ``range-xyz``, which expects a container’s URL. + **xyz** is the name of the field using the ``solid-form-auto-completion`` widget. + +``solid-form-number`` +~~~~~~~~~~~~~~~~~~~~~ + Inserts an ``<input/>`` HTML tag of type “numberâ€, in a ``<label>`` HTML tag. + +``solid-form-range-number`` +~~~~~~~~~~~~~~~~~~~~~~~~~~~ + + +``solid-form-file`` +~~~~~~~~~~~~~~~~~~~ + Inserts an ``<input/>`` and an ``<input type="file"/>``. + When a file is selected it’s uploaded, URL of file is returned by request and set as the ``<input/>`` value. + The upload URL is provided via the ``upload-url`` attribute. + +``solid-form-hidden`` +~~~~~~~~~~~~~~~~~~~~~ + Inserts an ``<input/>`` HTML tag of type “hiddenâ€, in a ``<label>`` HTML tag. \ No newline at end of file diff --git a/source/import_documentation/Widgets/multiple-widgets.rst b/source/import_documentation/Widgets/multiple-widgets.rst index df428ae..94871e0 100644 --- a/source/import_documentation/Widgets/multiple-widgets.rst +++ b/source/import_documentation/Widgets/multiple-widgets.rst @@ -3,13 +3,18 @@ Multiple widgets Startin'blox provides a list of default widgets to handle multiples: -Multiple widgets -~~~~~~~~~~~~~~~~ - -- ``solid-multiple`` (default for display): Inserts all the widgets - in a ``<solid-multiple>`` tag. -- ``solid-multiple-form`` (default for forms): Inserts all the - widgets in a ``<solid-multiple-form>`` tag, with a “remove†button for - each widget, and an “add†button. -- ``solid-multiple-select``: Inserts all the values as ``<option>`` - in a ``<select>`` tag with a ``multiple`` attribute. +``solid-multiple`` +~~~~~~~~~~~~~~~~~~ + *default for display* + + Inserts all the widgets in a ``<solid-multiple>`` tag. + +``solid-multiple-form`` +~~~~~~~~~~~~~~~~~~~~~~~ + *default for forms* + + Inserts all the widgets in a ``<solid-multiple-form>`` tag, with a “remove†button for each widget, and an “add†button. + +``solid-multiple-select`` +~~~~~~~~~~~~~~~~~~~~~~~~~ + Inserts all the values as ``<option>`` in a ``<select>`` tag with a ``multiple`` attribute. diff --git a/source/import_documentation/Widgets/other-widgets.rst b/source/import_documentation/Widgets/other-widgets.rst index 83b213f..1e0db52 100644 --- a/source/import_documentation/Widgets/other-widgets.rst +++ b/source/import_documentation/Widgets/other-widgets.rst @@ -4,16 +4,29 @@ Other widgets Set widgets ~~~~~~~~~~~ -- ``solid-set-default`` (default): Inserts content directly in the - set tag. -- ``solid-set-div``: Inserts content in a ``<div/>`` HTML tag -- ``solid-set-ul``: Inserts content in a ``<ul/>`` HTML tag -- ``solid-set-fieldset``: Inserts content in a ``<fieldset/>`` HTML - tag +``solid-set-default`` ++++++++++++++++++++++ + *default* + + Inserts content directly in the set tag. + +``solid-set-div`` ++++++++++++++++++ + Inserts content in a ``<div/>`` HTML tag. + +``solid-set-ul`` +++++++++++++++++ + Inserts content in a ``<ul/>`` HTML tag. + +``solid-set-fieldset`` +++++++++++++++++++++++ + Inserts content in a ``<fieldset/>`` HTML tag. + Actions widgets ~~~~~~~~~~~~~~~ -- ``solid-action``: Displays a link inside a ``<solid-link>`` tag with - ``src`` for the ``data-src`` attribute, ``value`` for the ``next`` - attribute and ``label`` as text content +``solid-action`` +++++++++++++++++ + Displays a link inside a ``<solid-link>`` tag with ``src`` for the ``data-src`` attribute, + ``value`` for the ``next`` attribute and ``label`` as text content. -- GitLab