Изменения документа HRlink. Новости об обновлениях
Редактировал(а) HRlink 22.08.2025
Сводка
-
Свойства страницы (1 изменено, 0 добавлено, 0 удалено)
Подробности
- Свойства страницы
-
- Содержимое
-
... ... @@ -1,9 +1,27 @@ 1 -{{children sort="date" order="desc" depth="1"/}} 1 +{{velocity}} 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 + '.') 7 +#end 2 2 3 -{{html clean="false"}} 4 -<style> 5 - .xwikirendering-macro-children ul { list-style: none; padding-left: 0; } 6 - .xwikirendering-macro-children li { padding: 8px 0; border-bottom: 1px solid #eee; } 7 - .xwikirendering-macro-children li:last-child { border-bottom: 0; } 8 -</style> 9 -{{/html}} 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()) 14 + 15 +#if($rows.isEmpty()) 16 + <p>Пока нет публикаций в этой ветке.</p> 17 +#else 18 + #foreach($fn in $rows) 19 + #set($d = $xwiki.getDocument($fn)) 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}}