Версия 31.1 от HRlink на 22.08.2025

Скрыть последних авторов
HRlink 30.1 1 {{velocity}}
HRlink 31.1 2 #set($full = $doc.fullName)
3 #if($full.endsWith('.WebHome'))
4 #set($prefix = $full.substring(0, $full.length() - 8) + '.')
5 #else
6 #set($prefix = $full + '.')
HRlink 30.1 7 #end
8
HRlink 31.1 9 #set($rows = $services.query.xwql(
10 "select doc.fullName from Document doc " +
11 "where doc.fullName like :pref and doc.name <> 'WebHome' " +
12 "order by doc.date desc"
13 ).bindValue('pref', $prefix + '%').setLimit(50).execute())
HRlink 30.1 14
HRlink 31.1 15 #if($rows.isEmpty())
HRlink 30.1 16 <p>Пока нет публикаций в этой ветке.</p>
17 #else
HRlink 31.1 18 #foreach($fn in $rows)
19 #set($d = $xwiki.getDocument($fn))
HRlink 30.1 20 <article style="margin:14px 0; padding-bottom:10px; border-bottom:1px solid #e5e7eb">
21 <div style="color:#6b7280; font-size:.9em">$datetool.format('dd MMM yyyy', $d.date)</div>
22 <h3 style="margin:.2rem 0"><a href="$d.getURL('view')">$escapetool.html($d.displayTitle)</a></h3>
23 <div>$!d.getPlainContent().substring(0,300)…</div>
24 </article>
25 #end
26 #end
27 {{/velocity}}