Исходный код вики Распоряжения

Версия 2.1 от Admin Admin на 2024/05/28 11:04

Последние авторы
1 Распоряжения Правительства Российской Федерации (в обратном хронологическом порядке):
2
3 {{velocity}}
4 #set($pubRefs = $doc.getChildrenReferences())
5 #set($entries = [])
6 #foreach($pubRef in $pubRefs)
7 #set($pub = $xwiki.getDocument($pubRef))
8 #set($title = $pub.getTitle())
9 #set($start = $title.indexOf("от ") + 3)
10 #set($end = $title.indexOf(" №"))
11 #if($start >= 0 && $end > $start)
12 #set($dateStr = $title.substring($start, $end))
13 #set($date = $datetool.toDate("dd.MM.yyyy", $dateStr))
14 #set($map = {"date": $date, "ref": $pubRef, "doc": $pub})
15 #set($discard = $entries.add($map))
16 #end
17 #end
18 #foreach($entry in $collectiontool.sort($entries, "date:desc"))
19 #set($pubRef = $entry.ref)
20 #set($pub = $entry.doc)
21 #set($title = $pub.getTitle())
22 #set($content = $pub.getContent())
23 #set($firstParagraph = $stringtool.substringBefore($content, "{"))
24 * [[**$title**>>$pubRef]]
25 $firstParagraph
26 ##Ниже перенос строки для дополнительного отступа
27
28 #end
29 {{/velocity}}