Изменения документа HRlink. Новости об обновлениях

Редактировал(а) HRlink 22.08.2025

От версии 36.1
отредактировано HRlink
на 22.08.2025
Изменить комментарий: К данной версии нет комментариев
К версии 31.1
отредактировано HRlink
на 22.08.2025
Изменить комментарий: К данной версии нет комментариев

Сводка

Подробности

Свойства страницы
Содержимое
... ... @@ -1,10 +1,27 @@
1 1  {{velocity}}
2 -#set($category = "Blog.HRlink.-Novosti-ob-obnovleniiakh-.WebHome")
3 -#set($query = ", BaseObject as obj, StringProperty as cat where obj.name = doc.fullName and obj.className = 'Blog.BlogPostClass' and cat.id.id = obj.id and cat.name = 'category' and cat.value = :category order by doc.creationDate desc")
4 -#set($results = $services.query.hql($query).bindValue('category', $category).setLimit(15).execute())
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
5 5  
6 -#foreach($docName in $results)
7 - #set($doc = $xwiki.getDocument($docName))
8 - #displayBlogPost($doc)
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
9 9  #end
10 10  {{/velocity}}