blob: 3e9406dae3062a1aa01d0836b4ba35c21328237a [file] [log] [blame]
Copybara854996b2021-09-07 19:36:02 +00001[for panels][# There will always be exactly one panel.]
2 [include "../tracker/issue-list-headings.ezt"]
3[end]
4
5[if-any table_data][else]
6<tr>
7 <td colspan="40" class="id">
8 <div style="padding: 3em; text-align: center">
9 This hotlist currently has no issues.<br>
10 [if-any owner_permissions editor_permissions]
11 Select 'Add issues...' in the above 'Actions...' dropdown menu to add some.
12 [end]
13 </div>
14 </td>
15 </tr>
16[end]
17
18
19
20<script type="text/javascript" nonce="[nonce]">
21runOnLoad(function(){
22 [if-any table_data]
23 var tableData = [[]
24 [for table_data]
25 {
26 "group":
27 [if-any table_data.group][if-any table_data.group.cells]
28 {
29 "rowsInGroup": "[table_data.group.rows_in_group]",
30 "cells": [[]
31 [for table_data.group.cells]
32 {
33 "groupName": "[table_data.group.cells.group_name]",
34 "values": [[]
35 [for table_data.group.cells.values]
36 {
37 "item": [if-any table_data.group.cells.values.item]"[format "js"][table_data.group.cells.values.item][end]"[else]"None"[end],
38 }[if-index table_data.group.cells.values last][else],[end]
39 [end]
40 ],
41 }[if-index table_data.group.cells last][else],[end]
42 [end]
43 ],
44 },
45 [else]"no",[end][else]"no",[end]
46 "cells" : [[]
47 [for table_data.cells]
48 {
49 "type": "[table_data.cells.type]",
50 "values": [[]
51 [for table_data.cells.values]
52 {
53 [is table_data.cells.type "issues"]
54 "id": "[format "js"][table_data.cells.values.item.id][end]",
55 "href": "[format "js"][table_data.cells.values.item.href][end]",
56 "title": "[format "js"][table_data.cells.values.item.title][end]",
57 "closed": "[format "js"][table_data.cells.values.item.closed][end]",
58 [else]
59 "item": "[format "js"][table_data.cells.values.item][end]",
60 [end]
61 "isDerived": "[table_data.cells.values.is_derived]",
62 }[if-index table_data.cells.values last][else],[end]
63 [end]
64 ],
65 "colIndex": "[table_data.cells.col_index]",
66 "align": "[table_data.cells.align]",
67 "noWrap": "[table_data.cells.NOWRAP]",
68 "nonColLabels": [[]
69 [for table_data.cells.non_column_labels]
70 {
71 "value": "[format "js"][table_data.cells.non_column_labels.value][end]",
72 "isDerived": "[table_data.cells.non_column_labels.is_derived]",
73 }[if-index table_data.cells.non_column_labels last][else],[end]
74 [end]
75 ],
76 }[if-index table_data.cells last][else],[end]
77 [end]
78 ],
79 "issueRef": "[table_data.issue_ref]",
80 "idx": "[table_data.idx]",
81 "projectName": "[table_data.project_name]",
82 "localID": "[table_data.local_id]",
83 "projectURL": [format "js"]"[table_data.project_url]"[end],
84 "issueID": "[table_data.issue_id]",
85 "isStarred": "[table_data.starred]",
86 "issueCleanURL": [format "js"]"[table_data.issue_clean_url]"[end],
87 "issueContextURL": [format "js"]"[table_data.issue_ctx_url]"[end],
88 }[if-index table_data last][else],[end]
89 [end]
90 ];
91
92 var pageSettings = {
93 "cursor": "[cursor]",
94 "userLoggedIn": "[if-any logged_in_user]yes[end]",
95 "ownerPerm": "[owner_permissions]",
96 "editorPerm": "[editor_permissions]",
97 "isCrossProject": "[is_cross_project]",
98 "readOnly": "[read_only]",
99 "allowRerank": "[allow_rerank]",
100 "hotlistID": "[hotlist_id]",
101 "colSpec": "[col_spec]",
102 "can": "[can]"
103 };
104
105 renderHotlistTable(tableData, pageSettings);
106 [if-any allow_rerank]
107 activateDragDrop(tableData, pageSettings, "[hotlist_id]");
108 [end]
109 [else]
110 [end]
111});
112</script>
113
114<script type="text/javascript" defer src="[version_base]/static/js/tracker/render-hotlist-table.js" nonce="[nonce]"></script>
115