add doc for UI : macros and CSS classes

This commit is contained in:
2016-02-22 21:08:47 +01:00
parent 786c3e6184
commit 901fa399e9
7 changed files with 148 additions and 4 deletions

View File

@@ -0,0 +1,46 @@
.. Copyright (C) 2014 Champs Libres Cooperative SCRLFS
Permission is granted to copy, distribute and/or modify this document
under the terms of the GNU Free Documentation License, Version 1.3
or any later version published by the Free Software Foundation;
with no Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts.
A copy of the license is included in the section entitled "GNU
Free Documentation License".
.. _activity-bundle:
Activity bundle
###############
This bundle provides the ability to record people in the software. This bundle is required by other bundle.
.. contents:: Table of content
:local:
Entities provided
*****************
.. todo::
Describe the entities provided.
Macros
******
Activity reason sticker
=======================
Macro file
`ChillActivityBundle:ActivityReason:macro.html.twig`
Macro envelope
:code:`reason(r)`
:code:`p` is an instance of :class:`Chill\ActivityBundle\Entity\ActivityReason`
When to use this macro ?
When you want to represent an activity reason.
Example usage :
.. code-block:: html+jinja
{% import 'ChillActivityBundle:ActivityReason:macro.html.twig' as m %}
{{ m.reason(r) }}

View File

@@ -18,6 +18,7 @@ You will find here documentation about bundles working with Chill.
Custom Fields bundle <custom-fields.rst>
Person bundle <person.rst>
Report bundle <report.rst>
Activity bundle <activity.rst>
Your bundle here ?
-------------------

View File

@@ -110,3 +110,27 @@ person_fields *array*
.. note::
If you hide multiple fields, for a better integration you may want to override the template, for a better appeareance. See `the symfony documentation <http://symfony.com/doc/current/book/templating.html#overriding-bundle-templates>`_ about this feature.
Macros
******
Sticker for a person
=====================
Macro file
`ChillPersonBundle:Person:macro.html.twig`
Macro envelope
:code:`render(p, withLink=false)`
:code:`p` is an instance of :class:`Chill\PersonBundle\Entity\Person`
:code:`withLink` :class:`boolean`
When to use this macro ?
When you want to represent a person.
Example usage :
.. code-block:: html+jinja
{% import "ChillPersonBundle:Person:macro.html.twig" as person_ %}
{{ person_.render(person, true) }}