mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-06-07 18:44:08 +00:00
add doc for show_emtpy_values_in_views
ref Chill-project/Chill-CustomFields#18
This commit is contained in:
parent
d23046edff
commit
38885e8a0d
@ -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. <https://redmine.champs-libres.coop/issues/239>`_
|
||||
|
||||
`JSON Type on postgresql documentation <http://www.postgresql.org/docs/9.3/static/datatype-json.html>`_
|
||||
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
|
||||
|
Loading…
x
Reference in New Issue
Block a user