Mercurial Hosting > nabble
comparison src/nabble/view/naml/columns.naml @ 0:7ecd1a4ef557
add content
author | Franklin Schmidt <fschmidt@gmail.com> |
---|---|
date | Thu, 21 Mar 2019 19:15:52 -0600 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
-1:000000000000 | 0:7ecd1a4ef557 |
---|---|
1 <macro name="table_header" dot_parameter="do"> | |
2 <n.do/> | |
3 </macro> | |
4 | |
5 <macro name="calc_table_column_count" dot_parameter="columns"> | |
6 <n.global_set_var name="calc_table_column_count" value="0" /> | |
7 <n.columns/> | |
8 <n.global_var name="calc_table_column_count" /> | |
9 </macro> | |
10 | |
11 <macro name="table_column" parameters="head,body"> | |
12 <n.if.is_in_command name="calc_table_column_count"> | |
13 <then.global_set_var. name="calc_table_column_count"> | |
14 <n.int> | |
15 <i.global_var name="calc_table_column_count" /> | |
16 <do.plus i="1" /> | |
17 </n.int> | |
18 </then.global_set_var.> | |
19 <else.if.is_in_command name="table_header"> | |
20 <then.head /> | |
21 <else.body /> | |
22 </else.if.is_in_command> | |
23 </n.if.is_in_command> | |
24 </macro> | |
25 | |
26 <macro name="topic_count_column" parameters="title,width"> | |
27 <n.table_column> | |
28 <head> | |
29 <td class="[n.column_default_border/] topic-count-column nowrap" align="center" style="[n.width_style.width/]"> | |
30 <n.default. to="[t]Topics[/t]"><n.title/></n.default.> | |
31 </td> | |
32 </head> | |
33 <body> | |
34 <td class="weak-color [n.column_default_border/]" align="center"><n.current_node.topic_count/></td> | |
35 </body> | |
36 </n.table_column> | |
37 </macro> | |
38 | |
39 <macro name="post_count_column" parameters="title,width"> | |
40 <n.table_column> | |
41 <head> | |
42 <td class="[n.column_default_border/] post_count_column nowrap" align="center" style="[n.width_style.width/]"> | |
43 <n.default. to="[t]Posts[/t]"><n.title/></n.default.> | |
44 </td> | |
45 </head> | |
46 <body> | |
47 <td class="weak-color [n.column_default_border/]" align="center"><n.current_node.post_count/></td> | |
48 </body> | |
49 </n.table_column> | |
50 </macro> | |
51 | |
52 <macro name="last_post_column" parameters="title,width,white_space"> | |
53 <n.table_column> | |
54 <head> | |
55 <td class="[n.column_default_border/] nowrap last-post-column" style="[n.width_style.width/]"> | |
56 <n.default. to="[t]Last Post[/t]"><n.title/></n.default.> | |
57 </td> | |
58 </head> | |
59 <body> | |
60 <n.current_node.> | |
61 <td class="[n.column_default_border/] weak-color"> | |
62 <n.if.either condition1="[n.is_post/]" condition2="[n.has_topics/]"> | |
63 <then> | |
64 <n.last_node.> | |
65 <table class="avatar-table"> | |
66 <tr> | |
67 <n.last_post_column_start/> | |
68 <td style="width:100%;padding:0 .3em;border:none;[n.style. property='white-space'][n.white_space/][/n.style.]"> | |
69 <n.smart_post_link> | |
70 <text.when_created.short_format/> | |
71 </n.smart_post_link> | |
72 <span class="weak-color nowrap" style="padding-left:.2em"> | |
73 <t>by <t.author.owner.name truncate="20"/></t> | |
74 </span> | |
75 </td> | |
76 </tr> | |
77 </table> | |
78 </n.last_node.> | |
79 </then> | |
80 <else> | |
81 <span style="padding-left:.4em"> | |
82 <t>Empty</t> | |
83 </span> | |
84 </else> | |
85 </n.if.either> | |
86 </td> | |
87 </n.current_node.> | |
88 </body> | |
89 </n.table_column> | |
90 </macro> | |
91 | |
92 <macro name="last_post_column_start"> | |
93 </macro> | |
94 | |
95 <macro name="subcategories_column" parameters="title,width"> | |
96 <n.table_column> | |
97 <head> | |
98 <td class="[n.column_default_border/] subcategories-column nowrap" style="[n.width_style.width/]" colspan="2"> | |
99 <n.default. to="[t]Subcategories[/t]"><n.title/></n.default.> | |
100 </td> | |
101 </head> | |
102 <body> | |
103 <td class="[n.column_default_border/]" style="width:1em"> | |
104 <n.if.current_node.is_app> | |
105 <then><img src="/images/forum.png" width="25" height="23"/></then> | |
106 <else><img src="/images/thread.png" width="25" height="23"/></else> | |
107 </n.if.current_node.is_app> | |
108 </td> | |
109 <td class="weak-color [n.column_default_border/] adbayes-content" style="width:60%"> | |
110 <div style="font-weight:bold;margin-bottom:.3em"> | |
111 <n.current_node.node_link/> | |
112 </div> | |
113 <span class="weak-color node-snippet" style="font-size:90%;display:block;padding-bottom:.5em"> | |
114 <n.if.current_node.is_app> | |
115 <then.current_node.node_message_as_html/> | |
116 <else> | |
117 <n.truncate. size="300"> | |
118 <n.remove_html_tags.current_node.message.as_text/> | |
119 </n.truncate.> | |
120 </else> | |
121 </n.if.current_node.is_app> | |
122 <n.if.current_node.has_subapps> | |
123 <then> | |
124 <div class="sub-forums weak-color"> | |
125 <b><t>Sub-Forums</t>:</b> | |
126 <n.current_node.subapps_list.loop.> | |
127 <n.current_node.node_link class="nowrap" />  | |
128 </n.current_node.subapps_list.loop.> | |
129 </div> | |
130 </then> | |
131 </n.if.current_node.has_subapps> | |
132 </span> | |
133 </td> | |
134 </body> | |
135 </n.table_column> | |
136 </macro> | |
137 | |
138 <macro name="pin_column"> | |
139 <n.table_column> | |
140 <head> | |
141 <td class="[n.column_default_border/] pin-column nowrap" style="width:24px"></td> | |
142 </head> | |
143 <body> | |
144 <n.current_node.> | |
145 <td class="[n.column_default_border/] pin-column" style="padding-left:.2em"> | |
146 <n.if.is_app> | |
147 <then> | |
148 <n.if.is_pinned_in_loop> | |
149 <then><img src="/images/forum_pin.png" width="29" height="23" title="[t]Pinned sub-forum[/t]" alt="[t]Pinned sub-forum[/t]"/></then> | |
150 <else><img src="/images/forum.png" width="25" height="23" title="[t]Floating sub-forum[/t]" alt="[t]Floating sub-forum[/t]"/></else> | |
151 </n.if.is_pinned_in_loop> | |
152 </then> | |
153 <else> | |
154 <n.if.is_pinned_in_loop> | |
155 <then><img src="/images/pin.png" width="20" height="21" alt="pin"/></then> | |
156 </n.if.is_pinned_in_loop> | |
157 </else> | |
158 </n.if.is_app> | |
159 </td> | |
160 </n.current_node.> | |
161 </body> | |
162 </n.table_column> | |
163 </macro> | |
164 | |
165 <macro name="replies_column" parameters="width,title"> | |
166 <n.table_column> | |
167 <head> | |
168 <td class="[n.column_default_border/] replies-column nowrap" align="center" style="[n.width_style.width/]"> | |
169 <n.default. to="[t]Replies[/t]"><n.title/></n.default.> | |
170 </td> | |
171 </head> | |
172 <body> | |
173 <td class="[n.column_default_border/]" align="center"><n.current_node.replies/></td> | |
174 </body> | |
175 </n.table_column> | |
176 </macro> | |
177 | |
178 <macro name="topics_column" parameters="width,title,count"> | |
179 <n.table_column> | |
180 <head> | |
181 <td class="[n.column_default_border/] topics-column nowrap" style="[n.width_style.width/]"> | |
182 <table class="avatar-table"> | |
183 <tr> | |
184 <td class="nowrap" style="font-weight:bold;border:none"> | |
185 <n.default. to="[t]Topics[/t]"><n.title/></n.default.> | |
186 <span class="weak-color" style="font-size:80%;margin-right:1.7em">(<n.count/>)</span> | |
187 </td> | |
188 </tr> | |
189 </table> | |
190 </td> | |
191 </head> | |
192 <body> | |
193 <n.current_node.> | |
194 <td class="[n.column_default_border/]"> | |
195 <table> | |
196 <tr> | |
197 <n.topics_column_start/> | |
198 <td class="adbayes-content" style="width:100%;padding-left:.3em;border:none;word-break:break-word"> | |
199 <n.if.is_app> | |
200 <then> | |
201 <b><n.node_link/></b> | |
202 <span class="weak-color"> | |
203 (<n.remove_spaces_between_tags.> | |
204 <n.one_or_many.topic_count> | |
205 <one_text><t>topic</t></one_text> | |
206 <many_text><t>topics</t></many_text> | |
207 </n.one_or_many.topic_count> | |
208 </n.remove_spaces_between_tags.>) | |
209 </span> | |
210 </then> | |
211 <else> | |
212 <n.smart_post_link/> | |
213 <span class="weak-color"> | |
214 <t>by <t.author.owner.name truncate="20"/></t> | |
215 </span> | |
216 </else> | |
217 </n.if.is_app> | |
218 </td> | |
219 </tr> | |
220 </table> | |
221 </td> | |
222 </n.current_node.> | |
223 </body> | |
224 </n.table_column> | |
225 </macro> | |
226 | |
227 <macro name="topics_column_start"> | |
228 </macro> | |
229 | |
230 <macro name="mixed_topics_column"> | |
231 <n.topics_column> | |
232 <title> | |
233 <n.if.is_in_command name="top_topics"> | |
234 <then><t>Topics</t></then> | |
235 <else><n.current_node.node_link class='second-font category-link'/></else> | |
236 </n.if.is_in_command> | |
237 </title> | |
238 <count> | |
239 <n.if.is_in_command name="top_topics"> | |
240 <then><n.page_node.topic_count filter="[n.children_filter/]"/></then> | |
241 <else><n.current_node.child_count/></else> | |
242 </n.if.is_in_command> | |
243 </count> | |
244 </n.topics_column> | |
245 </macro> | |
246 | |
247 <macro name="top_topics" dot_parameter="do"> | |
248 <n.do/> | |
249 </macro> | |
250 | |
251 | |
252 <macro name="views_column" parameters="title"> | |
253 <n.table_column> | |
254 <head> | |
255 <td class="[n.column_default_border/] views-column nowrap" align="center"> | |
256 <n.default. to="[t]Views[/t]"><n.title/></n.default.> | |
257 </td> | |
258 </head> | |
259 <body> | |
260 <td class="weak-color [n.column_default_border/]" align="center"><n.current_node.views/></td> | |
261 </body> | |
262 </n.table_column> | |
263 </macro> | |
264 | |
265 <macro name="subapp_column" parameters="width,title"> | |
266 <n.table_column> | |
267 <head> | |
268 <n.if.page_node.has_subapps> | |
269 <then> | |
270 <td class="[n.column_default_border/] subapp-column nowrap" align="center" style="[n.width_style.width/]"> | |
271 <n.default. to="[t]Sub Forum[/t]"><n.title/></n.default.> | |
272 </td> | |
273 </then> | |
274 </n.if.page_node.has_subapps> | |
275 </head> | |
276 <body> | |
277 <n.if.page_node.has_subapps> | |
278 <then> | |
279 <td class="[n.column_default_border/] adbayes-content" style="font-size:90%" align="center"><n.current_node.subapp_link/></td> | |
280 </then> | |
281 </n.if.page_node.has_subapps> | |
282 </body> | |
283 </n.table_column> | |
284 </macro> | |
285 | |
286 <macro name="topics_summary_column" parameters="width,title,count"> | |
287 <n.table_column> | |
288 <head> | |
289 <td class="[n.column_default_border/] topics-summary-column nowrap" style="[n.width_style.width/]"> | |
290 <table class="avatar-table"> | |
291 <tr> | |
292 <td class="nowrap" style="font-weight:bold;border:none"> | |
293 <n.default. to="[t]Topics[/t]"><n.title/></n.default.> | |
294 <span class="weak-color" style="font-size:80%;margin-right:1.7em">(<n.count/>)</span> | |
295 </td> | |
296 </tr> | |
297 </table> | |
298 </td> | |
299 </head> | |
300 <body> | |
301 <n.current_node.> | |
302 <td class="[n.column_default_border/] adbayes-content" style="padding:.4em 0"> | |
303 <table> | |
304 <tr> | |
305 <td><n.owner.avatar size="small" group="A"/></td> | |
306 <td style="width:100%"> | |
307 <n.smart_post_link/> | |
308 <t>by <t.author.owner.name truncate="20"/></t> | |
309 </td> | |
310 </tr> | |
311 </table> | |
312 <div class="weak-color" style="width:100%;font-size:80%;margin-left:.4em"> | |
313 <n.if.has_replies> | |
314 <then.replies_link/> | |
315 <else> | |
316 0 <t>replies</t> | |
317 </else> | |
318 </n.if.has_replies>, | |
319 <n.views show_text="true"/> | |
320 <n.if.is_in_subapp> | |
321 <then> | |
322 - <t>in <t.location.italic.subapp_link_on_hover/></t> | |
323 </then> | |
324 </n.if.is_in_subapp> | |
325 </div> | |
326 </td> | |
327 </n.current_node.> | |
328 </body> | |
329 </n.table_column> | |
330 </macro> | |
331 | |
332 <!-- Table Defaults / To be overridden --> | |
333 | |
334 <macro name="column_default_border"> | |
335 medium-border-color | |
336 </macro> | |
337 | |
338 <macro name="even_row_background"> | |
339 </macro> | |
340 | |
341 <macro name="odd_row_background"> | |
342 light-bg-color | |
343 </macro> |