Wiki source code of CurriculumClassSheet
Last modified by Eugen Colesnicov on 2013/03/20 13:56
Show last authors
author | version | line-number | content |
---|---|---|---|
1 | {{velocity}} | ||
2 | {{html wiki="true"}} | ||
3 | |||
4 | $xwiki.jsfx.use("js/scriptaculous/scriptaculous.js") | ||
5 | $xwiki.jsx.use("XWiki.DatePickerExtension", {'defer':false}) | ||
6 | $xwiki.ssx.use("XWiki.DatePickerExtension") | ||
7 | |||
8 | ## You can modify this page to customize the presentation of your object. | ||
9 | ## At first you should keep the default presentation and just save the document. | ||
10 | |||
11 | #set ($Parent = $doc.getParent()) | ||
12 | #set ($FullParent = $xwiki.getDocument($Parent).getFullName()) | ||
13 | #set ($ShortParent = $xwiki.getDocument($Parent).getName()) | ||
14 | |||
15 | #if ($context.action == "view") | ||
16 | ## #set ($par = $xwiki.getDocument($doc.getParent()).getFullName()) | ||
17 | ## $response.sendRedirect($xwiki.getURL($par)) | ||
18 | #end | ||
19 | |||
20 | #set($class = $doc.getObject('etvcCVcode.CurriculumClass').xWikiClass) | ||
21 | |||
22 | #set($obj = "") | ||
23 | #set($obj = $doc.getObject("etvcCVcode.CurriculumClass")) | ||
24 | #set($class = $obj.xWikiClass) | ||
25 | #set($suff=":") | ||
26 | |||
27 | <table> | ||
28 | #foreach($prop in $class.properties) | ||
29 | #set($desc=$prop.prettyName) | ||
30 | #set($field=$prop.getName()) | ||
31 | <tr> | ||
32 | <td class="label"><label>$desc$suff</label></td> | ||
33 | |||
34 | ## #if(($context.action == 'inline') and ($prop.type == 'DateClass')) | ||
35 | ## $obj.set($field,$util.getDate()) | ||
36 | ## #end | ||
37 | |||
38 | <td>$doc.display($field) | ||
39 | #if(($context.action == 'inline') and ($prop.type == 'DateClass')) | ||
40 | <script type="text/javascript"> | ||
41 | var dpicker = new DatePicker({ | ||
42 | relative : "${class.name}_${class.number}_${prop.name}", | ||
43 | language : "$context.language", | ||
44 | dateFormat : [["dd","mm","yyyy"], "/"] | ||
45 | }); | ||
46 | </script> | ||
47 | #end | ||
48 | </td> | ||
49 | </tr> | ||
50 | #end | ||
51 | |||
52 | ## #foreach($prop in $class.properties) | ||
53 | ## ; $prop.prettyName | ||
54 | ## : $doc.display($prop.getName()) | ||
55 | ## #end | ||
56 | |||
57 | #set($showcomments = "no") | ||
58 | |||
59 | {{/html}} | ||
60 | {{/velocity}} |