1 .. -*- coding: utf-8 -*- |
|
2 |
|
3 Predefined views in the library |
|
4 ------------------------------- |
|
5 |
|
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 |
|
8 each others and the main ones are: |
|
9 |
|
10 *primary* |
|
11 Primary view of an entity, this is the view called by default when a single |
|
12 non final entity is in the result set and needs to be displayed. |
|
13 This view is supposed to render a maximum of informations about the entity. |
|
14 |
|
15 *text* |
|
16 This is the simplest text view for an entity. It displays the |
|
17 title of an entity. It should not contain HTML. |
|
18 |
|
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 |
|
23 parameter `MAX_LINE_CHAR` to control the result size. |
|
24 |
|
25 *secondary* |
|
26 This is a combinaison of an icon and a *oneline* view. |
|
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 |
|
32 as in or out of context. By default it respectively returns the result of |
|
33 `textincontext` and `textoutofcontext` wrapped in a link leading to |
|
34 the primary view of the entity. |
|
35 |
|
36 *textincontext, textoutofcontext* |
|
37 Similar to the `text` view, but called when an entity is considered out or |
|
38 in context. By default it returns respectively the result of the |
|
39 methods `.dc_title` and `.dc_long_title` of the entity. |
|
40 |
|
41 *list* |
|
42 This view displays a list of entities by creating a HTML list (`<ul>`) |
|
43 and call the view `listitem` for each entity of the result set. |
|
44 |
|
45 *listitem* |
|
46 This view redirects by default to the `outofcontext` view. |
|
47 |
|
48 *rss* |
|
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 |
|
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. |
|
59 |
|
60 Start view: |
|
61 |
|
62 *index* |
|
63 This view defines the home page of your application. It does not require |
|
64 a result set to apply to. |
|
65 |
|
66 *schema* |
|
67 A view dedicated to the display of the schema of the application |
|
68 |
|
69 Special views: |
|
70 |
|
71 *noresult* |
|
72 This view is the default view used when no result has been found |
|
73 (e.g. empty result set). |
|
74 |
|
75 *final* |
|
76 Display the value of a cell without trasnformation (in case of a non final |
|
77 entity, we see the eid). Applicable on any result set. |
|
78 |
|
79 *table* |
|
80 Creates a HTML table (`<table>`) and call the view `cell` for each cell of |
|
81 the result set. Applicable on any result set. |
|
82 |
|
83 *cell* |
|
84 By default redirects to the `final` view if this is a final entity or |
|
85 `outofcontext` view otherwise |
|
86 |
|
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 |
|