Wiki源代码Home
隐藏最后作者
author | version | line-number | content |
---|---|---|---|
![]() |
58.2 | 1 | == {{displayIcon name="bell"/}} 通知公告 == |
![]() |
1.1 | 2 | |
![]() |
57.1 | 3 | |
![]() |
59.2 | 4 | (% style="font-size:16px" %)内部网站,不提供注册功能。 |
![]() |
1.1 | 5 | |
![]() |
59.2 | 6 | |
![]() |
58.2 | 7 | == == |
![]() |
1.1 | 8 | |
![]() |
58.2 | 9 | == == |
![]() |
1.1 | 10 | |
![]() |
58.2 | 11 | == == |
![]() |
1.1 | 12 | |
13 | |||
![]() |
59.1 | 14 | |
![]() |
60.1 | 15 | (% class="col-xs-12 col-sm-6" %) |
![]() |
1.1 | 16 | ((( |
![]() |
59.3 | 17 | === 近期更新 === |
![]() |
106.1 | 18 | |
![]() |
70.1 | 19 | {{velocity}} |
![]() |
105.1 | 20 | ## 定义一级链接列表 |
21 | #set($topLevelPages = ["Home", "AI For Service", "AIO知识库", "脚本&自动化"]) | ||
![]() |
76.1 | 22 | |
![]() |
106.1 | 23 | ## 输出结果 |
![]() |
105.1 | 24 | #foreach($topPage in $topLevelPages) |
![]() |
106.1 | 25 | = $topPage = |
![]() |
105.1 | 26 | ## 查询每个一级链接下的最近更新页面 |
![]() |
107.1 | 27 | #set($query = $services.query.hql(""" |
28 | select doc.fullName | ||
29 | from XWikiDocument doc | ||
30 | where doc.space = :space | ||
31 | and doc.fullName not like '%:WebPreferences' | ||
32 | and doc.fullName not like '%:WebHome' | ||
33 | and doc.fullName not like '%:WebSearch' | ||
34 | and doc.fullName not like '%:WebRss' | ||
35 | and doc.fullName not like '%:WebStatistics' | ||
36 | order by doc.date desc | ||
37 | """)) | ||
![]() |
105.1 | 38 | #set($query = $query.bindValue("space", $topPage)) |
![]() |
106.1 | 39 | #set($query = $query.setLimit(3)) |
![]() |
105.1 | 40 | #set($recentDocs = $query.execute()) |
41 | |||
![]() |
106.1 | 42 | #if($recentDocs.isEmpty()) |
43 | No recent updates. | ||
44 | #else | ||
45 | #foreach($docFullName in $recentDocs) | ||
46 | #set($document = $xwiki.getDocument($docFullName)) | ||
47 | #if($document) | ||
48 | #set($docTitle = $document.getDisplayTitle()) | ||
49 | ## 仅当用户有查看权限时显示 | ||
50 | #if($xwiki.hasAccessLevel('view', $xcontext.user, $document.getFullName())) | ||
51 | #if($docTitle == '') | ||
52 | #set($docTitle = "Untitled Document") | ||
53 | #end | ||
54 | * [[${docTitle}>>${document.getExternalURL('view')}]] | ||
![]() |
105.1 | 55 | #end |
56 | #end | ||
57 | #end | ||
58 | #end | ||
59 | #end | ||
![]() |
65.1 | 60 | {{/velocity}} |
![]() |
107.1 | 61 | |
![]() |
1.1 | 62 | ))) |
![]() |
38.1 | 63 | |
![]() |
60.1 | 64 | (% class="col-xs-12 col-sm-6" %) |
![]() |
38.1 | 65 | ((( |
![]() |
58.8 | 66 | === 相关链接 === |
![]() |
43.1 | 67 | |
![]() |
71.1 | 68 | (% style="font-size:14px" %)[[北区AIO项目看板(IPV6访问)>>http://nas.nicebro.fun:57567||rel="noopener noreferrer" target="_blank"]] |
![]() |
38.1 | 69 | ))) |
![]() |
61.1 | 70 | |
71 |