Wiki source code of Văn bản đến
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']) |
| 5 | #set ($vanBanDenClass = 'VanBanDen.Code.VanBanDenClass') | ||
| 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)) | ||
| 9 | #gridresultwithfilter_buildQuery($vanBanDenClass $columns '' '' {}) | ||
| 10 | ## 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. | ||
| 11 | #if ($request.sort == 'ngayVanBan' && $orderDirection == 'desc' && $orderSql != '') | ||
| 12 | #set ($sql = "$sql nulls last, doc.fullName asc") | ||
| 13 | #end | ||
| 14 | #if ("$!request.tagcloud" == 'true') | ||
| 15 | #gridresult_buildTagCloudJSON($result) | ||
| 16 | #end | ||
| 17 | #gridresult_buildRowsJSON($result) | ||
| 18 | #end | ||
| 19 | #jsonResponse($result) | ||
| 20 | #else | ||
| |
1.1 | 21 | #set ($columnsProperties = { |
| |
14.1 | 22 | 'soKyHieu': {"link":"view"}, |
| 23 | 'trichYeu': {"link":"view"}, | ||
| |
12.1 | 24 | 'ngayVanBan': {"html":true}, |
| 25 | 'coQuanBanHanh': {"html":true}, | ||
| 26 | 'lanhDao': {"html":true}, | ||
| 27 | 'hanXuLy': {"html":true}, | ||
| 28 | 'trangThaiNguon': {"html":true} | ||
| |
1.1 | 29 | }) |
| 30 | #set ($options = { | ||
| |
15.1 | 31 | 'className': $vanBanDenClass, |
| 32 | 'resultPage': 'VanBanDen.WebHome', | ||
| |
1.1 | 33 | 'translationPrefix': 'vanbanden.livetable.', |
| 34 | 'tagCloud': true, | ||
| 35 | 'rowCount': 15, | ||
| 36 | 'maxPages': 10, | ||
| |
14.1 | 37 | 'selectedColumn': 'ngayVanBan', |
| 38 | 'defaultOrder': 'desc' | ||
| |
1.1 | 39 | }) |
| 40 | #livetable('vanbanden' $columns $columnsProperties $options) | ||
| |
15.1 | 41 | #end |
| |
1.1 | 42 | {{/velocity}} |