Исходный код вики Приказы
Версия 6.3 от Admin Admin на 2024/05/12 23:37
Скрыть последних авторов
| author | version | line-number | content |
|---|---|---|---|
| |
2.1 | 1 | {{velocity}} |
| 2 | #set($pubRefs = $doc.getChildrenReferences()) | ||
| |
4.1 | 3 | #set($dateRefMap = {}) |
| 4 | #foreach($pubRef in $pubRefs) | ||
| |
2.1 | 5 | #set($pub = $xwiki.getDocument($pubRef)) |
| 6 | #set($title = $pub.getTitle()) | ||
| |
4.1 | 7 | #set($dateStr = $title.substring(9, 19)) |
| 8 | #set($date = $datetool.toDate("dd.MM.yyyy", $dateStr)) | ||
| 9 | #set($discard = $dateRefMap.put($date, $pubRef)) | ||
| 10 | #end | ||
| 11 | #set($sortedDates = $dateRefMap.keySet().toArray()) | ||
| |
6.3 | 12 | ##$sorter.sort($sortedDates, false) |
| 13 | #foreach($date in $sorter.sort($sortedDates, false)) | ||
| |
4.1 | 14 | #set($pubRef = $dateRefMap.get($date)) |
| 15 | #set($pub = $xwiki.getDocument($pubRef)) | ||
| 16 | #set($title = $pub.getTitle()) | ||
| |
2.2 | 17 | * [[$title>>$pubRef]] |
| |
2.1 | 18 | #end |
| 19 | {{/velocity}} |