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 entity is in the result set and needs to be displayed. This view is supposed |
|
13 to render a maximum of informations about the entity. |
|
14 :secondary: |
|
15 secondary view of an entity. By default it renders the two first attributes |
|
16 of the entity as a clickable link redirecting to the primary view. |
|
17 :oneline: |
|
18 similar to the `secondary` view, but called when we want the view to stand |
|
19 on a single line, or just get a brief view. By default this view uses the |
|
20 parameter `MAX_LINE_CHAR` to control the result size. |
|
21 :text: |
|
22 similar to the `oneline` view, but should not contain HTML. |
|
23 :incontext, outofcontext: |
|
24 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 |
|
26 `textincontext` and `textoutofcontext` wrapped in a link leading to |
|
27 the primary view of the entity. |
|
28 :textincontext, textoutofcontext: |
|
29 similar to the `text` view, but called is an entity is considered out or |
|
30 in context. By default it returns respectively the result of the |
|
31 methods `.dc_title` and `.dc_long_title` of the entity. |
|
32 :list: |
|
33 creates a HTML list (`<ul>`) and call the view `listitem` for each entity |
|
34 of the result set |
|
35 :listitem: |
|
36 redirects by default to the `outofcontext` view |
|
37 :rss: |
|
38 creates a RSS/XML view and call the view `rssitem` for each entity of |
|
39 the result set |
|
40 :rssitem: |
|
41 create a RSS/XML view for each entity based on the results of the dunblin core |
|
42 methods of the entity (`dc_*`) |
|
43 |
|
44 Start view: |
|
45 |
|
46 :index: |
|
47 home page |
|
48 :schema: |
|
49 display the schema of the application |
|
50 |
|
51 Special views: |
|
52 |
|
53 :noresult: |
|
54 called if the result set is empty |
|
55 :finall: |
|
56 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. |
|
58 :table: |
|
59 creates a HTML table (`<table>`) and call the view `cell` for each cell of |
|
60 the result set. Applicable on any result set. |
|
61 :cell: |
|
62 by default redirects to the `final` view if this is a final entity or |
|
63 `outofcontext` view otherwise |
|
64 :null: |
|
65 view always applicable and which does not return anything |
|