doc/book/en/B1021-views-stdlib.en.txt
changeset 308 73a352526577
parent 292 2d9e83c34b23
equal deleted inserted replaced
307:6231a61dabfa 308:73a352526577
     5 
     5 
     6 A certain number of views are used to build the web interface, which apply
     6 A certain number of views are used to build the web interface, which apply
     7 to one or more entities. Their identifier is what distinguish them from
     7 to one or more entities. Their identifier is what distinguish them from
     8 each others and the main ones are:
     8 each others and the main ones are:
     9 
     9 
    10 :primary:
    10 *primary*
    11     primary view of an entity, this is the view called by default when a single
    11     Primary view of an entity, this is the view called by default when a single
    12     entity is in the result set and needs to be displayed. This view is supposed
    12     non final entity is in the result set and needs to be displayed. 
    13     to render a maximum of informations about the entity.
    13     This view is supposed to render a maximum of informations about the entity.
    14 :secondary:
    14 
    15     secondary view of an entity. By default it renders the two first attributes
    15 *text*
    16      of the entity as a clickable link redirecting to the primary view.
    16     This is the simplest text view for an entity. It displays the 
    17 :oneline:
    17     title of an entity. It should not contain HTML.
    18     similar to the `secondary` view, but called when we want the view to stand
    18 
    19     on a single line, or just get a brief view. By default this view uses the
    19 *oneline*
       
    20     This is a hyper linked *text* view. Similar to the `secondary` view, 
       
    21     but called when we want the view to stand on a single line, or just 
       
    22     get a brief view. By default this view uses the
    20     parameter `MAX_LINE_CHAR` to control the result size.
    23     parameter `MAX_LINE_CHAR` to control the result size.
    21 :text:
    24 
    22     similar to the `oneline` view, but should not contain HTML.
    25 *secondary*
    23 :incontext, outofcontext:
    26     This is a combinaison of an icon and a *oneline* view.
    24     similar to the `secondary` view, but called when an entity is considered
    27     By default it renders the two first attributes of the entity as a 
       
    28     clickable link redirecting to the primary view.
       
    29 
       
    30 *incontext, outofcontext*
       
    31     Similar to the `secondary` view, but called when an entity is considered
    25     as in or out of context. By default it respectively returns the result of 
    32     as in or out of context. By default it respectively returns the result of 
    26     `textincontext` and `textoutofcontext` wrapped in a link leading to 
    33     `textincontext` and `textoutofcontext` wrapped in a link leading to 
    27     the primary view of the entity.
    34     the primary view of the entity.
    28 :textincontext, textoutofcontext:
    35 
    29     similar to the `text` view, but called is an entity is considered out or
    36 *textincontext, textoutofcontext*
       
    37     Similar to the `text` view, but called when an entity is considered out or
    30     in context. By default it returns respectively the result of the 
    38     in context. By default it returns respectively the result of the 
    31     methods `.dc_title` and `.dc_long_title` of the entity.
    39     methods `.dc_title` and `.dc_long_title` of the entity.
    32 :list:
    40 
    33     creates a HTML list (`<ul>`) and call the view `listitem` for each entity
    41 *list*
    34     of the result set
    42     This view displays a list of entities by creating a HTML list (`<ul>`) 
    35 :listitem:
    43     and call the view `listitem` for each entity of the result set.
    36     redirects by default to the `outofcontext` view
    44 
    37 :rss:
    45 *listitem*
    38     creates a RSS/XML view and call the view `rssitem` for each entity of
    46     This view redirects by default to the `outofcontext` view.
    39     the result set
    47 
    40 :rssitem:
    48 *rss*
    41     create a RSS/XML view for each entity based on the results of the dunblin core
    49     Creates a RSS/XML view and call the view `rssitem` for each entity of
       
    50     the result set.
       
    51 
       
    52 *rssitem*
       
    53     Create a RSS/XML view for each entity based on the results of the dublin core
    42     methods of the entity (`dc_*`)
    54     methods of the entity (`dc_*`)
       
    55 
       
    56 *sidebox*
       
    57   This view displays usually a side box of some related entities 
       
    58   in a primary view.
    43 
    59 
    44 Start view:
    60 Start view:
    45 
    61 
    46 :index:
    62 *index*
    47     home page
    63     This view defines the home page of your application. It does not require
    48 :schema:
    64     a result set to apply to.
    49     display the schema of the application
    65 
       
    66 *schema*
       
    67     A view dedicated to the display of the schema of the application
    50 
    68 
    51 Special views:
    69 Special views:
    52 
    70 
    53 :noresult:
    71 *noresult*
    54     called if the result set is empty
    72     This view is the default view used when no result has been found
    55 :finall:
    73     (e.g. empty result set).
    56     display the value of a cell without trasnformation (in case of a non final
    74 
       
    75 *final*
       
    76     Display the value of a cell without trasnformation (in case of a non final
    57     entity, we see the eid). Applicable on any result set.
    77     entity, we see the eid). Applicable on any result set.
    58 :table:
    78 
    59     creates a HTML table (`<table>`) and call the view `cell` for each cell of
    79 *table*
       
    80     Creates a HTML table (`<table>`) and call the view `cell` for each cell of
    60     the result set. Applicable on any result set.
    81     the result set. Applicable on any result set.
    61 :cell:
    82 
    62     by default redirects to the `final` view if this is a final entity or
    83 *cell*
       
    84     By default redirects to the `final` view if this is a final entity or
    63     `outofcontext` view otherwise
    85     `outofcontext` view otherwise
    64 :null:
    86 
    65     view always applicable and which does not return anything
    87 *null*
       
    88     This view is the default view used when nothing needs to be rendered.
       
    89     It is always applicable and it does not return anything