From 38885e8a0d7e692ae41a7e77927d5d91e459a55b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Julien=20Fastr=C3=A9?= Date: Wed, 23 Dec 2015 21:23:03 +0100 Subject: [PATCH] add doc for `show_emtpy_values_in_views` ref Chill-project/Chill-CustomFields#18 --- source/bundles/custom-fields.rst | 35 ++++++++++++++++++++++---------- 1 file changed, 24 insertions(+), 11 deletions(-) diff --git a/source/bundles/custom-fields.rst b/source/bundles/custom-fields.rst index fede84048..508b90f6f 100644 --- a/source/bundles/custom-fields.rst +++ b/source/bundles/custom-fields.rst @@ -13,7 +13,7 @@ Custom fields bundle This bundle provides the ability to add custom fields to existing entities. -Those custom fields contains extra data and will be stored in the DB, along with other data's entities. It may be string, text, date, ... or a link to an existing or to-be-created other entities. +Those custom fields contains extra data and will be stored in the DB, along with other data's entities. It may be string, text, date, ... or a link to an existing entities. In the database, custom fields are stored in json format. @@ -22,7 +22,12 @@ In the database, custom fields are stored in json format. The full specification discussed `here. `_ `JSON Type on postgresql documentation `_ + The documentation of json type, which is used to store data in the database. +.. contents:: Table of contents + :depth: 4 + :local: + Custom Fields concepts ---------------------- @@ -282,7 +287,7 @@ For rendering custom fields, two function are available : For rendering custom fields group, a function is available : -* `chill_custom_fields_group_widget to render the widget. It will display the custom fields of the group in a dd / dt structure. +* `chill_custom_fields_group_widget` to render the widget. It will display the custom fields of the group in a dd / dt structure. **chill_custom_field_label** @@ -328,7 +333,7 @@ Examples: **chill_custom_fields_group_widget** -This function only display custom fields that are `active. +This function only display custom fields that are `active`. The signature is : @@ -404,19 +409,27 @@ Example : } +Available configuration +------------------------ +Those options are available in the configuration, under the `chill_custom_field` key. -Development tips ----------------- +Example : -If you want to test the rendering of a custom fields group, you may use this method : +.. code-block:: yaml -1. Run the built-in server **from the custom-fields directory** : + chill_custom_field: + show_empty_values_in_views: false -.. code-block:: bash +show_empty_values_in_views *boolean*: + Allow to hide / show empty values in views. The aim of this configuration parameter is to hide (or show) empty values when :term:`custom fields group` are rendered. - ./run-server.sh + Default value : `true` -2. assuming that your custom fields id is `1`, go to your navigator and enter url : `http://localhost:8000/customfieldsgroup/test/render/1` +Glossary +-------- - +.. glossary:: + + custom fields group + A group of custom fields