From dc67b658a63b411f7c59105171040afea5ec1717 Mon Sep 17 00:00:00 2001 From: Florian Merges Date: Tue, 18 Feb 2020 19:29:35 +0000 Subject: [PATCH 1/2] Add icon option to Models and Flows --- content/docs/models/contents.lr | 10 ++++++---- content/docs/models/flow/contents.lr | 3 ++- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/content/docs/models/contents.lr b/content/docs/models/contents.lr index 61e30ca6..d39fe139 100644 --- a/content/docs/models/contents.lr +++ b/content/docs/models/contents.lr @@ -61,10 +61,12 @@ The following options are used for all types: - `label`: the label for the field. This is shown in the UI in larger letters - `description`: an optional string that provides some description for the field that is shown in the UI to give a bit more explanation. -- `addon_label`: an optional string that is supported by all types that are - rendered as an input field. This string is shown as an UI label on the -right side of the input field to give it more context. For instance, it can - be used to clarify units of a field (pixel, percent etc.). +- `addon_label`: an optional string or icon that is supported by all types + that are rendered as an input field. This string or icon is shown as an UI + label on the right side of the input field to give it more context. For + instance, it can be used to clarify units of a field (pixel, percent etc.). + If an icon is to be used it must be a valid Fontawesome 4 icon name and + between double brackets (e.g.: [[github]]). - `width`: defines the width of the input in the admin as a fraction. For instance `1/4` sets it to a quarter of the width, `1/2` to a half etc. - `size` can be set to `normal`, `small` or `large` to affect the size a diff --git a/content/docs/models/flow/contents.lr b/content/docs/models/flow/contents.lr index a81918d8..dd1f67c7 100644 --- a/content/docs/models/flow/contents.lr +++ b/content/docs/models/flow/contents.lr @@ -38,7 +38,8 @@ default = default This should be self explanatory. One thing that is different about blocks compared to regular models is that they support the `button_label` attribute which can be used to customize the label of the button that adds blocks to -a flow. +a flow. Similar to the `addon_label` attribute of the [Regular Models +:ref](../), you can use an icon as a label instead. ## Templates From cb92dd278fefbee30860a789584d8f650f0834b0 Mon Sep 17 00:00:00 2001 From: Florian Merges Date: Tue, 18 Feb 2020 19:34:37 +0000 Subject: [PATCH 2/2] Add external link to Fontawesome 4 icons --- content/docs/models/contents.lr | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/content/docs/models/contents.lr b/content/docs/models/contents.lr index d39fe139..a7db9b85 100644 --- a/content/docs/models/contents.lr +++ b/content/docs/models/contents.lr @@ -65,8 +65,8 @@ The following options are used for all types: that are rendered as an input field. This string or icon is shown as an UI label on the right side of the input field to give it more context. For instance, it can be used to clarify units of a field (pixel, percent etc.). - If an icon is to be used it must be a valid Fontawesome 4 icon name and - between double brackets (e.g.: [[github]]). + If an icon is to be used it must be a valid [Fontawesome 4 :ext](https://fontawesome.com/v4.7.0/icons/) + icon name between double brackets (e.g.: [[github]]). - `width`: defines the width of the input in the admin as a fraction. For instance `1/4` sets it to a quarter of the width, `1/2` to a half etc. - `size` can be set to `normal`, `small` or `large` to affect the size a