Wiki source code of Văn bản đến
Last modified by Hai NT on 2026/11/23 02:24
Hide last authors
| author | version | line-number | content |
|---|---|---|---|
| |
15.1 | 1 | {{include reference="XWiki.LiveTableResultsMacros" /}} |
| 2 | |||
| |
1.1 | 3 | {{velocity}} |
| |
15.1 | 4 | #set ($columns = ['soKyHieu', 'trichYeu', 'ngayVanBan', 'coQuanBanHanh', 'lanhDao', 'hanXuLy', 'trangThaiNguon']) |
| |
16.1 | 5 | #set ($className = 'VanBanDen.Code.VanBanDenClass') |
| |
15.1 | 6 | #if ($xcontext.action == 'get' && "$!request.outputSyntax" == 'plain') |
| 7 | #set ($result = {'reqNo': $numbertool.toNumber($request.reqNo).intValue(), 'rows': [], 'totalrows': 0, 'returnedrows': 0}) | ||
| 8 | #if ("$!request.sort" == '' || $columns.contains($request.sort)) | ||
| |
16.1 | 9 | #set ($collist = $columns) |
| 10 | #gridresultwithfilter_buildQuery($className $collist '' '' {}) | ||
| |
15.1 | 11 | ## Dùng cùng bộ lọc và kiểm tra quyền của LiveTable, chỉ đưa ngày trống xuống cuối. |
| 12 | #if ($request.sort == 'ngayVanBan' && $orderDirection == 'desc' && $orderSql != '') | ||
| 13 | #set ($sql = "$sql nulls last, doc.fullName asc") | ||
| 14 | #end | ||
| 15 | #if ("$!request.tagcloud" == 'true') | ||
| 16 | #gridresult_buildTagCloudJSON($result) | ||
| 17 | #end | ||
| 18 | #gridresult_buildRowsJSON($result) | ||
| 19 | #end | ||
| 20 | #jsonResponse($result) | ||
| 21 | #else | ||
| |
1.1 | 22 | #set ($columnsProperties = { |
| |
14.1 | 23 | 'soKyHieu': {"link":"view"}, |
| 24 | 'trichYeu': {"link":"view"}, | ||
| |
12.1 | 25 | 'ngayVanBan': {"html":true}, |
| 26 | 'coQuanBanHanh': {"html":true}, | ||
| 27 | 'lanhDao': {"html":true}, | ||
| 28 | 'hanXuLy': {"html":true}, | ||
| 29 | 'trangThaiNguon': {"html":true} | ||
| |
1.1 | 30 | }) |
| 31 | #set ($options = { | ||
| |
16.1 | 32 | 'className': $className, |
| |
15.1 | 33 | 'resultPage': 'VanBanDen.WebHome', |
| |
1.1 | 34 | 'translationPrefix': 'vanbanden.livetable.', |
| 35 | 'tagCloud': true, | ||
| 36 | 'rowCount': 15, | ||
| 37 | 'maxPages': 10, | ||
| |
14.1 | 38 | 'selectedColumn': 'ngayVanBan', |
| 39 | 'defaultOrder': 'desc' | ||
| |
1.1 | 40 | }) |
| 41 | #livetable('vanbanden' $columns $columnsProperties $options) | ||
| |
15.1 | 42 | #end |
| |
1.1 | 43 | {{/velocity}} |