Исходный код вики DirectoriesClassSheet
Редактировал(а) Eugen Colesnicov 2013/03/24 06:00
Последние авторы
author | version | line-number | content |
---|---|---|---|
1 | {{velocity}} | ||
2 | {{html wiki="true"}} | ||
3 | ## You can modify this page to customize the presentation of your object. | ||
4 | ## At first you should keep the default presentation and just save the document. | ||
5 | |||
6 | #set($docextras = []) | ||
7 | $xwiki.ssx.use("etvcCorrespondence2Code.AboutSheet") | ||
8 | |||
9 | #set ($Parent = $doc.getParent()) | ||
10 | #set ($FullParent = $xwiki.getDocument($Parent).getFullName()) | ||
11 | #set ($ShortParent = $xwiki.getDocument($Parent).getName()) | ||
12 | |||
13 | ###if ($context.action == "view") | ||
14 | ## #set ($par = $xwiki.getDocument($doc.getParent()).getFullName()) | ||
15 | ## $response.sendRedirect($xwiki.getURL($par)) | ||
16 | ###end | ||
17 | |||
18 | #set($class = $doc.getObject('etvcCorrespondence2Code.DirectoriesClass').xWikiClass) | ||
19 | #foreach($prop in $class.properties) | ||
20 | |||
21 | #set($obj = $doc.getObject("etvcCorrespondence2Code.DirectoriesClass")) | ||
22 | #set ($curval = $doc.getValue("DirectoryType", $obj)) | ||
23 | |||
24 | #if ($ShortParent == $curval) | ||
25 | #if ($prop.getName() != "DirectoryType") | ||
26 | ##$prop.prettyName | ||
27 | ; $msg.get($prop.getName()) | ||
28 | : $doc.display($prop.getName()) | ||
29 | #end | ||
30 | #else | ||
31 | ##$prop.prettyName | ||
32 | ; $msg.get($prop.getName()) | ||
33 | : $doc.display($prop.getName()) | ||
34 | #end | ||
35 | |||
36 | #end | ||
37 | {{/html}} | ||
38 | {{/velocity}} |