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