# HG changeset patch # User Damien Correia # Date 1534264030 -7200 # Node ID 9783741e866da32f0bcf8be4d8fb4555396414f9 # Parent 8e05d726d4ad522fcce573b1639a137f86f0671f Updated doc diff -r 8e05d726d4ad -r 9783741e866d src/source/_static/add_newtopic.png Binary file src/source/_static/add_newtopic.png has changed diff -r 8e05d726d4ad -r 9783741e866d src/source/_static/content_actions_toolbar.png Binary file src/source/_static/content_actions_toolbar.png has changed diff -r 8e05d726d4ad -r 9783741e866d src/source/_static/content_other_actions.png Binary file src/source/_static/content_other_actions.png has changed diff -r 8e05d726d4ad -r 9783741e866d src/source/_static/content_paragraph.png Binary file src/source/_static/content_paragraph.png has changed diff -r 8e05d726d4ad -r 9783741e866d src/source/_static/content_properties.png Binary file src/source/_static/content_properties.png has changed diff -r 8e05d726d4ad -r 9783741e866d src/source/_static/content_publication_form.png Binary file src/source/_static/content_publication_form.png has changed diff -r 8e05d726d4ad -r 9783741e866d src/source/_static/content_publish_toolbar.png Binary file src/source/_static/content_publish_toolbar.png has changed diff -r 8e05d726d4ad -r 9783741e866d src/source/_static/content_validation.png Binary file src/source/_static/content_validation.png has changed diff -r 8e05d726d4ad -r 9783741e866d src/source/_static/select_paragraph.png Binary file src/source/_static/select_paragraph.png has changed diff -r 8e05d726d4ad -r 9783741e866d src/source/_static/shared_content_settings.png Binary file src/source/_static/shared_content_settings.png has changed diff -r 8e05d726d4ad -r 9783741e866d src/source/api-doc/howto-i18n.rst --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/source/api-doc/howto-i18n.rst Tue Aug 14 18:27:10 2018 +0200 @@ -0,0 +1,10 @@ +.. _howto-i18n: + + +pot-create -o ref.pot scr/ +msgmerge -U def.po ref.pot +msgfmt def.po + +#bin/pot-create -o src/onf_website/locales/onf_website.pot src/ +#msgmerge -U --previous --sort-by-file src/onf_website/locales/fr/LC_MESSAGES/onf_website.po src/onf_website/locales/onf_website.pot +#msgfmt src/onf_website/locales/fr/LC_MESSAGES/onf_website.po -o src/onf_website/locales/fr/LC_MESSAGES/onf_website.mo diff -r 8e05d726d4ad -r 9783741e866d src/source/appextend.rst --- a/src/source/appextend.rst Tue Aug 14 18:26:02 2018 +0200 +++ b/src/source/appextend.rst Tue Aug 14 18:27:10 2018 +0200 @@ -15,3 +15,4 @@ howto-renderer howto-rename howto-skin + howto-template diff -r 8e05d726d4ad -r 9783741e866d src/source/developerguide.rst --- a/src/source/developerguide.rst Tue Aug 14 18:26:02 2018 +0200 +++ b/src/source/developerguide.rst Tue Aug 14 18:27:10 2018 +0200 @@ -7,7 +7,6 @@ .. toctree:: :maxdepth: 2 - Zope Component Architecture Package directory layout appextend traverser 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 + diff -r 8e05d726d4ad -r 9783741e866d src/source/howto-rename.rst --- a/src/source/howto-rename.rst Tue Aug 14 18:26:02 2018 +0200 +++ b/src/source/howto-rename.rst Tue Aug 14 18:27:10 2018 +0200 @@ -1,12 +1,13 @@ .. _renamehowto: -How to rename classes of existing objects -========================================= +How to rename classes of existing objects ? +=========================================== -When you develop new features to PyAMS we sometimes have to rename or modify classes of already stored objects if you do -that you will never access yours objects. But PyAMS provides `zodbupdate` script to update easily update the change in ZODB. +PyAMS provides `zodbupdate` script to update easily update the change in ZODB. Because, when you develop new features +to PyAMS we sometimes have to rename or modify classes of already stored objects and if you do that you will never access +yours objects **1) Include you package in the require resource for you webapp** diff -r 8e05d726d4ad -r 9783741e866d src/source/howto-renderer.rst --- a/src/source/howto-renderer.rst Tue Aug 14 18:26:02 2018 +0200 +++ b/src/source/howto-renderer.rst Tue Aug 14 18:27:10 2018 +0200 @@ -30,16 +30,17 @@ """Context paragraph custom renderer""" label = _("Custom contact renderer") - settings_interface = IContactParagraphDefaultRendererSettings + #settings_interface = IContactParagraphDefaultRendererSettings In this example, we have defined an adapter named 'custom' with :py:class:`IContactParagraph`, :py:class:`IPyAMSLayer` as context and provides :py:class:`ISharedContentRenderer` interface. Using ``@template_config()`` decorator, the renderer will be displayed in html container according to the template +`templates/contact-custom.pt` The new renderer inherit of :py:class:`ContactParagraphDefaultRenderer`, have a new **label** (line 8) -and is associated an **settings_interface** (line 9) +and this associated **settings_interface** is not modify(line 9) .. tip:: @@ -47,6 +48,7 @@ It's takes the context and the new template path as params. + 2. Create a new Renderer from scratch ------------------------------------- diff -r 8e05d726d4ad -r 9783741e866d src/source/index.rst --- a/src/source/index.rst Tue Aug 14 18:26:02 2018 +0200 +++ b/src/source/index.rst Tue Aug 14 18:27:10 2018 +0200 @@ -13,7 +13,6 @@ :caption: Getting started Introduction - Application architecture Quickstart .. toctree:: @@ -27,7 +26,8 @@ :maxdepth: 2 :caption: Installation - ZODB Server + Architectures + Database: ZODB Server Installing PyAMS Configuring and Running PyAMS Managing PyAMS environment @@ -38,9 +38,10 @@ :maxdepth: 2 :caption: Technical documentation + Zope Component Architecture developerguide packages - tests + .. toctree:: :maxdepth: 2 @@ -48,6 +49,12 @@ scripts +.. toctree:: + :maxdepth: 2 + :caption: Python Tests + + tests + Indices and tables ------------------ diff -r 8e05d726d4ad -r 9783741e866d src/source/packages.rst --- a/src/source/packages.rst Tue Aug 14 18:26:02 2018 +0200 +++ b/src/source/packages.rst Tue Aug 14 18:27:10 2018 +0200 @@ -10,6 +10,7 @@ .. toctree:: :maxdepth: 1 + PyAMS Utils PyAMS ZMI PyAMS Content PyAMS Skin @@ -19,10 +20,9 @@ PyAMS Template PyAMS Pagelet PyAMS Viewlet - PyAMS Utils -PyAMS additional packages +Additional PyAMS packages ------------------------- PyAMS is built on many additional packages, and provides a whole set of extensions. Here is a list of them: diff -r 8e05d726d4ad -r 9783741e866d src/source/userguide.rst --- a/src/source/userguide.rst Tue Aug 14 18:26:02 2018 +0200 +++ b/src/source/userguide.rst Tue Aug 14 18:27:10 2018 +0200 @@ -4,40 +4,227 @@ ================== Users or Site Managers - Individuals who use PyAMS features to create a custom application or website. + Individuals who use PyAMS features to create a custom application or website. + + +To Begin +-------- + +Login +^^^^^ + +Begin by logging into the “administration area” or the back end of your website. +Now log into PyAMS using your username and password. + + .. image:: _static/pyams-login.png + + +Dashboard +^^^^^^^^^ + +After logging in you are on the main Administration Screen called the Dashboard. This is the starting point to create page and article +also settings your workspace. If you are lost click on "Home" to come back on the Dashboard. + + .. image:: _static/pyams-dashboard.png + + + +At the top of the screen is the “toolbar”, this navigation menu is to create new publication content (site , article, view...) +On the left side of the screen is the main navigation menu detailing each of the administrative functions you can perform. + + +Article - The shared contents +----------------------------- + + +Articles are sorted by category news, topic or long read, each category have different attributes, and they can quickly +identify the type of content. + +The News are a short article to spotlight an information. This is typically the type of content used for blog posts or news feeds + + +Create a News +^^^^^^^^^^^^^ + +To create a News, click on the "Shared contents" on the top bar and select "News" then click on **+ Add news topic** + + .. image:: _static/add_newtopic.png + +(*) The progress bar below the title is an indicator to optimize for indexation by search engines. + +When you are completed the form you will be redirected and invited to complete the properties of the article + + +Manage a News +^^^^^^^^^^^^^ + + .. image:: _static/content_properties.png + + +On this page you can modify the title and the url display, content description and write an unpublish note + +In Addition you can wrapped the articles with custom feature like: + +- A header or main illustration placed on the top of your article +- An illustration for the links that targets the article. + + +The interface also allows you to perform additional actions such as publishing and versioning but, we will come back to it later + + + +Edit the content of an article +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +PyAMS offers a user-friendly interface for editing the content of an article, to do that, move on the side bar +and the section **Composition** and click on **Contents...** + + .. image:: _static/select_paragraph.png + +An article is composed of many paragraphs or blocks. Depending on the configuration of the shared tool, +one or more paragraphs may already be present when creating a new article to help the author structure his document. + +Each paragraph corresponds to a type of media and will facilitate the modification the articulation of an article. +To add a new block, click **Add ..** + + .. image:: _static/content_paragraph.png + +(*) The list of available paragraph varies depending on the nature of the article and the configuration of the shared tools -How to create a web site Page and blog? ---------------------------------------- +Paragraph +--------- + +Header +^^^^^^ + +Rich Text +^^^^^^^^^ + +Illustration +^^^^^^^^^^^^ + +Media Gallery +^^^^^^^^^^^^^ + +Video +^^^^^ + +External video +^^^^^^^^^^^^^^ + +Audio +^^^^^ + +Associations +^^^^^^^^^^^^ + +Contact +^^^^^^^ + +Framed Text +^^^^^^^^^^^ + +Image Maps +^^^^^^^^^^ + +Key number +^^^^^^^^^^ + +Key point +^^^^^^^^^ + +Location number +^^^^^^^^^^^^^^^ + +Logos +^^^^^ + +Milestones +^^^^^^^^^^ + +Pictogram +^^^^^^^^^ + +Verbatim +^^^^^^^^ + +Raw HTML +^^^^^^^^ + +Verify the content +------------------ + +Audit +^^^^^ + +Preview +^^^^^^^ + + +Publishing an Article +--------------------- + +When you are writing an article, it's not already visible for the visitors, but when the content is ready the editor +has the possibility to make a request by clicking on the button **Change status**. + + + .. image:: _static/content_publish_toolbar.png + + +You will be asked to validate the date of publication and check if the content corresponds to your expectations, + + .. image:: _static/content_publication_form.png + + +If you work alone the validated content will be put online. + + +If you have collaborators, you have the possibility to used a publication workflow that include reviewers. The editor +make a **Request of publication** to the review for the validation of the request. Then, the reviewer receives a +notification inviting him to consult the article in question. + +The reviewer has the choice to accept or refuse the publication or also create a new version of the article. + + +.. warning:: + + Important**: Once published the content can not be erased, + However you can always unpublish it to remove the access to visitors. + + +Web site Page / Blog +-------------------- To create a new page for your website click on `Site tree` - .. image:: _static/select_sitetree.png - - - -Click on **+ + Add...** and choose the to create a `blog` or a `site manager` - - - .. image:: _static/select_website_content.png + .. image:: _static/select_sitetree.png A blog or weblog is a simple editorial structure where news and topics are stacked in a chronological order. +Click on **+ Add...** and choose the to create a `blog` or a `site manager` -Website Portal Templates ------------------------- + + .. image:: _static/select_website_content.png + + + -You can create a generic template shared for all users, to do that ya need to have some admin privilege. +Website Design +--------------- + +You can create a generic template shared for all users, to do that ya need to have some webdesign privilege. + On the `Control panel`, click on `Portal Templates` - .. image:: _static/select_portlet.png + .. image:: _static/select_portlet.png -In the Portal Templates menu +For example In the Portal Templates menu - .. image:: _static/user_create_template.png + .. image:: _static/user_create_template.png 1) Click on **+add template** 2) Name your new template @@ -65,17 +252,9 @@ - -How to create a News? ---------------------- - - .. image:: _static/select_paragraph.png +How to add content in the page ? +-------------------------------- -How to create a Topic? ----------------------- - - - -Publishing content ------------------- +Une fois le contenu d'un article disponible et publié, vous aurez surmenet besion de le faire apparaitre dans votre site ou blog +Pour lier un article a un site ou un blog.