doc/book/fr/chap_visualisation_donnees.txt
changeset 82 57f37f7af21b
parent 71 69a4bf8f5e49
child 90 7fd4ffeb082b
equal deleted inserted replaced
78:079c4d11a616 82:57f37f7af21b
     1 .. -*- coding: utf-8 -*-
     1 .. -*- coding: utf-8 -*-
     2 
     2 
       
     3 .. _DefinitionVues:
     3 
     4 
     4 Définition de vues
     5 Définition de vues
     5 ==================
     6 ==================
     6 
     7 
     7 Les classes de base des vues
     8 Les classes de base des vues
    99 09-12` output HTML tags and values of the entity's attributes.
   100 09-12` output HTML tags and values of the entity's attributes.
   100 
   101 
   101 When displaying same blog entry as before, you will notice that the
   102 When displaying same blog entry as before, you will notice that the
   102 page is now looking much nicer.
   103 page is now looking much nicer.
   103 
   104 
   104 .. image:: ../images/lax-book.09-new-view-blogentry.en.png
   105 .. image:: images/lax-book.09-new-view-blogentry.en.png
   105    :alt: blog entries now look much nicer
   106    :alt: blog entries now look much nicer
   106 
   107 
   107 Let us now improve the primary view of a blog ::
   108 Let us now improve the primary view of a blog ::
   108 
   109 
   109   01. class BlogPrimaryView(baseviews.PrimaryView):
   110   01. class BlogPrimaryView(baseviews.PrimaryView):
   136 view with that name that can accepts the entity.**
   137 view with that name that can accepts the entity.**
   137 
   138 
   138 Assuming we added entries to the blog titled `MyLife`, displaying it
   139 Assuming we added entries to the blog titled `MyLife`, displaying it
   139 now allows to read its description and all its entries.
   140 now allows to read its description and all its entries.
   140 
   141 
   141 .. image:: ../images/lax-book.10-blog-with-two-entries.en.png
   142 .. image:: images/lax-book.10-blog-with-two-entries.en.png
   142    :alt: a blog and all its entries
   143    :alt: a blog and all its entries
   143 
   144 
   144 **Before we move forward, remember that the selection/view principle is
   145 **Before we move forward, remember that the selection/view principle is
   145 at the core of `LAX`. Everywhere in the engine, data is requested
   146 at the core of `LAX`. Everywhere in the engine, data is requested
   146 using the RQL language, then HTML/XML/text/PNG is output by applying a
   147 using the RQL language, then HTML/XML/text/PNG is output by applying a
   195 -----------------------------------------------------------------------------------
   196 -----------------------------------------------------------------------------------
   196 
   197 
   197 Le template principal par défaut construit la page selon la décomposition
   198 Le template principal par défaut construit la page selon la décomposition
   198 suivante :
   199 suivante :
   199 
   200 
   200 .. image:: ../images/main_template_layout.png
   201 .. image:: images/main_template_layout.png
   201 
   202 
   202 Le rectancle contenant le `view.dispatch()` représente l'emplacement où est
   203 Le rectancle contenant le `view.dispatch()` représente l'emplacement où est
   203 inséré la vue de contenu à afficher. Les autres représentent des sous-templates
   204 inséré la vue de contenu à afficher. Les autres représentent des sous-templates
   204 appelé pour construire la page. Les implémentations par défaut de tout ces
   205 appelé pour construire la page. Les implémentations par défaut de tout ces
   205 templates sont dans le module `cubicweb.web.views.basetemplates`. Vous pouvez
   206 templates sont dans le module `cubicweb.web.views.basetemplates`. Vous pouvez