Código fuente wiki de CategorySheet
Última modificación por Administrator el 2014/10/29 07:38
Mostrar los últimos autores
author | version | line-number | content |
---|---|---|---|
1 | {{include reference="Blog.CategoriesCode"/}} | ||
2 | |||
3 | {{velocity}} | ||
4 | {{html wiki=true}} | ||
5 | #set ($discard = $xwiki.ssx.use("Blog.ManageCategories")) | ||
6 | #set ($discard = $xwiki.jsx.use("Blog.ManageCategories")) | ||
7 | #if ($doc.getObject($blogCategoryClassname)) | ||
8 | #getEntriesForCategory($doc.fullName $discard $totalEntries) | ||
9 | = Category: #getCategoryName($doc) ($totalEntries posts) [[#toolImage('feed' '[RSS]')>>Blog.CategoryRss||queryString="xpage=plain&category=$escapetool.url($doc.fullName)" title="RSS"]] = | ||
10 | ## Keep testing the inline action for backward compatibility with older categories. | ||
11 | #if ($xcontext.action != 'edit' && $xcontext.action != 'inline') | ||
12 | {{include reference="Blog.CreatePost"/}} | ||
13 | |||
14 | #getCategoriesHierarchy($doc.space $tree) | ||
15 | #if ("$!tree.get($doc.fullName)" != '') | ||
16 | (% class="blog-categories-list subcategories" %) | ||
17 | ((( | ||
18 | ((( | ||
19 | **Subcategories** | ||
20 | ))) | ||
21 | ((( | ||
22 | #displayCategoriesHierarchyRecursive($tree $doc.fullName 1 'simple') | ||
23 | ))) | ||
24 | ))) | ||
25 | #end | ||
26 | (% class="clearfloats" %)((())) | ||
27 | |||
28 | #getEntriesForCategory($doc.fullName $entries $totalEntries) | ||
29 | #if ($totalEntries == 0) | ||
30 | {{info}}{{translation key="xe.blog.categories.noentries"/}}{{/info}} | ||
31 | #else | ||
32 | #displayBlog($entries 'category' true true) | ||
33 | ## displayNavigationLinks requires a blog document, to determine how should the entries be split into pages. Return this | ||
34 | ## document, as the macro fallbacks to 'paginated' in case the right setting cannot be determined. | ||
35 | #displayNavigationLinks($doc) | ||
36 | #end | ||
37 | #end | ||
38 | #elseif ($doc.fullName == $blogCategorySheet) | ||
39 | {{translation key="xe.blog.categories.sheetmessage"/}} | ||
40 | #else | ||
41 | {{warning}}{{translation key="xe.blog.categories.notcategory"/}}{{/warning}} | ||
42 | #end | ||
43 | {{/html}} | ||
44 | {{/velocity}} |