diff -r 8e05d726d4ad -r 9783741e866d src/source/howto-paragraph.rst --- a/src/source/howto-paragraph.rst Tue Aug 14 18:26:02 2018 +0200 +++ b/src/source/howto-paragraph.rst Tue Aug 14 18:27:10 2018 +0200 @@ -247,38 +247,18 @@ Adding the following marker interface, we add new behavior to the Paragraph `ContactPhoneParagraph` . -Paragraph in the ZMI -"""""""""""""""""""" - -1) Inner form -------------- - -.. code-block:: python +Paragraph advanced +"""""""""""""""""" - @adapter_config(context=(IContactPhoneParagraph, IPyAMSLayer), provides=IParagraphInnerEditor) - @implementer(IInnerForm, IPropertiesEditForm, IAssociationParentForm) - class ContactPhoneParagraphInnerEditForm(ContactPhoneParagraphPropertiesEditForm): - """Contact paragraph inner edit form""" +You can attach Associated files, links or illustration and manage them directly through the rubric `Links and Attachments`. - legend = None - ajax_handler = 'inner-properties.json' +.. image:: _static/select_links_n_attachment.png -Marker interfaces: - -:py:class:`IPropertiesEditForm` - -:py:class:`IAssociationParentForm` - +1) Paragraph with Links and Attachements +---------------------------------------- -.. image:: _static/associations_form.png - - - -2) Inside a dedicated menu --------------------------- - -.. image:: _static/select_links_n_attachment.png +To "activate" this features the paragrath object must to implement specific interface .. code-block:: python @@ -290,7 +270,9 @@ ... -Marker interfaces: +These interfaces will allow to link other data to the paragraph. + +**Marker interfaces:** +--------------------------------+ |:py:class:`IIllustrationTarget` | @@ -321,8 +303,43 @@ +----------------+-------------------+ -ZMI overview: +**ZMI overview:** + .. image:: _static/select_add_links.png +2) Add link and association form +-------------------------------- + +You can add form to manage links and attachments directly in paragraph form to do that your form must implement +``IPropertiesEditForm`` and/or ``IAssociationParentForm`` + + +.. code-block:: python + + @adapter_config(context=(IContactPhoneParagraph, IPyAMSLayer), provides=IParagraphInnerEditor) + @implementer(IInnerForm, IPropertiesEditForm, IAssociationParentForm) + class ContactPhoneParagraphInnerEditForm(ContactPhoneParagraphPropertiesEditForm): + """Contact paragraph inner edit form""" + + legend = None + ajax_handler = 'inner-properties.json' + + +**Marker interfaces:** + ++-----------------------------------+ +|:py:class:`IPropertiesEditForm` | ++=========+=========================+ +| | Add Illustration form | ++---------+-------------------------+ + ++-----------------------------------+ +|:py:class:`IAssociationParentForm` | ++===========+=======================+ +| | Add Association form | ++-----------+-----------------------+ + +.. image:: _static/associations_form.png +