Исходный код вики Приказы
Версия 7.1 от Admin Admin на 2024/05/13 01:43
Последние авторы
| author | version | line-number | content |
|---|---|---|---|
| 1 | {{velocity}} | ||
| 2 | #set($pubRefs = $doc.getChildrenReferences()) | ||
| 3 | #set($entries = []) | ||
| 4 | #foreach($pubRef in $pubRefs) | ||
| 5 | #set($pub = $xwiki.getDocument($pubRef)) | ||
| 6 | #set($title = $pub.getTitle()) | ||
| 7 | #set($dateStr = $title.substring(10, 20)) | ||
| 8 | #set($date = $datetool.toDate("dd.MM.yyyy", $dateStr)) | ||
| 9 | #set($map = {"date": $date, "ref": $pubRef, "doc": $pub}) | ||
| 10 | #set($discard = $entries.add($map)) | ||
| 11 | #end | ||
| 12 | #foreach($entry in $collectiontool.sort($entries, "date:desc")) | ||
| 13 | #set($pubRef = $entry.ref) | ||
| 14 | #set($pub = $entry.doc) | ||
| 15 | #set($title = $pub.getTitle()) | ||
| 16 | #set($content = $pub.getContent()) | ||
| 17 | #set($firstParagraph = $stringtool.substringBefore($content, "{")) | ||
| 18 | * [[$title>>$pubRef]] | ||
| 19 | $firstParagraph | ||
| 20 | #end | ||
| 21 | {{/velocity}} |