Mercurial Hosting > nabble
comparison src/nabble/view/naml/view_mixed.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="call_view_mixed"> | |
2 <n.view_mixed /> | |
3 </macro> | |
4 | |
5 <subroutine name="view_mixed" requires="basic,nabble,servlet"> | |
6 <n.apply_app_namespace.view_mixed_page /> | |
7 </subroutine> | |
8 | |
9 <macro name="view_mixed_page"> | |
10 <n.if.not.get_node_from_parameter.has_pinned_subapps> | |
11 <then> | |
12 <n.call_view_standard/> | |
13 <n.exit/> | |
14 </then> | |
15 </n.if.not.get_node_from_parameter.has_pinned_subapps> | |
16 <n.view_mixed_html/> | |
17 </macro> | |
18 | |
19 <macro name="view_mixed_html"> | |
20 <n.app_html> | |
21 <head> | |
22 <n.app_title/> | |
23 <n.mixed_table_stylesheet/> | |
24 </head> | |
25 <body> | |
26 <n.new_topic_action_link/> | |
27 <n.topics_action_link/> | |
28 <n.people_action_link/> | |
29 <n.options_action_menu/> | |
30 | |
31 <n.mixed_table.mixed_table_columns /> | |
32 <n.forum_footer/> | |
33 </body> | |
34 </n.app_html> | |
35 </macro> | |
36 | |
37 <macro name="mixed_table_columns" requires="app_namespace"> | |
38 <n.pin_column/> | |
39 <n.mixed_topics_column/> | |
40 <n.replies_column/> | |
41 <n.last_post_column white_space="nowrap"/> | |
42 <n.views_column/> | |
43 </macro> | |
44 | |
45 <macro name="mixed_table_columns" requires="narrow_app_namespace"> | |
46 <n.pin_column/> | |
47 <n.mixed_topics_column/> | |
48 <n.replies_column/> | |
49 <n.last_post_column white_space="nowrap"/> | |
50 </macro> | |
51 | |
52 <macro name="mixed_table_stylesheet"> | |
53 <style type="text/css"> | |
54 table.main { | |
55 border-spacing:0; | |
56 width:100%; | |
57 border-width:1px; | |
58 border-style:solid; | |
59 } | |
60 table.main td { | |
61 padding:.1em; | |
62 height:2.2em; | |
63 } | |
64 tr.header-row td { | |
65 font-weight:bold; | |
66 padding: .2em .2em .1em; | |
67 border-bottom-width: 1px; | |
68 border-bottom-style: solid; | |
69 } | |
70 tr.category-row td { | |
71 border-width: 1px; | |
72 border-style: solid; | |
73 border-left: none; | |
74 border-right: none; | |
75 } | |
76 tr.main-row td { | |
77 border-width: 1px; | |
78 border-style: dotted; | |
79 border-left: none; | |
80 border-right: none; | |
81 border-top:none; | |
82 } | |
83 | |
84 tr.main-row td td { | |
85 border-color: transparent; | |
86 } | |
87 a.category-link { | |
88 text-decoration:none; | |
89 font-size:110%; | |
90 } | |
91 td.topics-column { | |
92 width:70%; | |
93 } | |
94 </style> | |
95 </macro> | |
96 | |
97 <macro name="mixed_table" dot_parameter="columns"> | |
98 <div style="clear:both"></div> | |
99 | |
100 <n.global_set_var name="mixed_table_column_count" value="[n.calc_table_column_count.columns/]" /> | |
101 | |
102 <table class="main medium-border-color"> | |
103 <n.string_list. values="[n.mixed_topics_per_page/]" > | |
104 <n.no_output.next_string/> | |
105 <n.child_topics_section. length="[n.current_string/]"> | |
106 <n.columns/> | |
107 </n.child_topics_section.> | |
108 | |
109 <n.page_node.subapps_list. filter="[n.pinned_filter/]"> | |
110 <n.while.has_more_strings n="2"> | |
111 <loop> | |
112 <n.no_output.next_string/> | |
113 <n.next_section. length="[n.current_string/]"><n.columns/></n.next_section.> | |
114 </loop> | |
115 </n.while.has_more_strings> | |
116 <n.if.has_more_strings> | |
117 <then.no_output.next_string/> | |
118 </n.if.has_more_strings> | |
119 <n.while.next_node> | |
120 <loop> | |
121 <n.sub_section. length="[n.current_string/]"><n.columns/></n.sub_section.> | |
122 </loop> | |
123 </n.while.next_node> | |
124 </n.page_node.subapps_list.> | |
125 </n.string_list.> | |
126 </table> | |
127 <div style="clear:both"></div> | |
128 </macro> | |
129 | |
130 <macro name="mixed_topics_per_page"> | |
131 6 | |
132 </macro> | |
133 | |
134 <macro name="mixed_table_column_count" dot_parameter="do"> | |
135 <n.int> | |
136 <i.global_var name="mixed_table_column_count" /> | |
137 <do.do /> | |
138 </n.int> | |
139 </macro> | |
140 | |
141 <macro name="next_section" dot_parameter="columns" parameters="length"> | |
142 <n.if.next_node> | |
143 <then.sub_section. length="[n.length/]"> | |
144 <n.columns/> | |
145 </then.sub_section.> | |
146 </n.if.next_node> | |
147 </macro> | |
148 | |
149 <macro name="sub_section" dot_parameter="columns" parameters="length"> | |
150 <n.if.current_node.can_be_viewed_by_visitor> | |
151 <then> | |
152 <n.if.current_node.type equals="gallery"> | |
153 <then.current_node.gallery_section length="[n.length/]"/> | |
154 <else> | |
155 <n.current_node.subapp_section. length="[n.length/]"> | |
156 <n.columns/> | |
157 </n.current_node.subapp_section.> | |
158 </else> | |
159 </n.if.current_node.type> | |
160 </then> | |
161 </n.if.current_node.can_be_viewed_by_visitor> | |
162 </macro> | |
163 | |
164 <macro name="child_topics_section" dot_parameter="columns" parameters="length"> | |
165 <n.if.page_node.has_child_topics> | |
166 <then> | |
167 <n.top_topics.> | |
168 <n.table_header.> | |
169 <tr class="header-row shaded-bg-color"> | |
170 <n.columns/> | |
171 </tr> | |
172 </n.table_header.> | |
173 <n.page_node.children_list. length="[n.length/]" filter="[n.no_pinned_subapps_filter/]"> | |
174 <n.loop.> | |
175 <tr class="main-row"> | |
176 <n.columns/> | |
177 </tr> | |
178 </n.loop.> | |
179 <n.if.there_is_more> | |
180 <then> | |
181 <tr class="main-row"> | |
182 <td> </td> | |
183 <td class="medium-border-color" colspan="[n.mixed_table_column_count.minus i='1'/]" style="padding:.6em .8em"> | |
184 <n.page_node.node_link | |
185 href="[n.url template='view_standard'/]" | |
186 title="[t]View all messages under this sub-forum[/t]" | |
187 text="[t]View more[/t]" | |
188 /> » | |
189 </td> | |
190 </tr> | |
191 </then> | |
192 </n.if.there_is_more> | |
193 </n.page_node.children_list.> | |
194 </n.top_topics.> | |
195 </then> | |
196 </n.if.page_node.has_child_topics> | |
197 </macro> | |
198 | |
199 <macro name="gallery_section" requires="node" parameters="length"> | |
200 <tr class="header-row category-row shaded-bg-color"> | |
201 <n.table_header.> | |
202 <td class="medium-border-color"></td> | |
203 <n.topics_column title="[n.node_link class='second-font category-link'/]" count="[n.topic_count/]"/> | |
204 <td class="medium-border-color" colspan="[n.mixed_table_column_count.minus i='1'/]"></td> | |
205 </n.table_header.> | |
206 </tr> | |
207 <tr class="main-row"> | |
208 <td colspan="[n.mixed_table_column_count/]" class="medium-border-color" style="width:auto;overflow:hidden"> | |
209 <n.slider.> | |
210 <n.topics_list. sort="pinned-and-last-node-date" length="[n.length/]" filter="[n.app_topic_filter/]"> | |
211 <n.loop.> | |
212 <td align="center" style="padding:0 .5em"> | |
213 <n.current_node.gallery_cell/> | |
214 </td> | |
215 </n.loop.> | |
216 <n.set_var. name="last_loop_has_more"><n.there_is_more/></n.set_var.> | |
217 </n.topics_list.> | |
218 </n.slider.> | |
219 </td> | |
220 </tr> | |
221 <n.subapp_section_extra_row has_more="[n.var name='has_more_rows'/]"/> | |
222 </macro> | |
223 | |
224 <macro name="subapp_section" requires="node" dot_parameter="columns" parameters="length"> | |
225 <tr class="header-row category-row shaded-bg-color"> | |
226 <n.table_header.> | |
227 <n.columns/> | |
228 </n.table_header.> | |
229 </tr> | |
230 <n.if.has_children> | |
231 <then> | |
232 <n.children_list. length="[n.length/]"> | |
233 <n.loop.> | |
234 <tr class="main-row"> | |
235 <n.columns/> | |
236 </tr> | |
237 </n.loop.> | |
238 <n.set_var. name="has_more_rows"><n.there_is_more/></n.set_var.> | |
239 </n.children_list.> | |
240 <n.subapp_section_extra_row has_more="[n.var name='has_more_rows'/]"/> | |
241 </then> | |
242 <else.subapp_section_extra_row has_more="[n.false/]"/> | |
243 </n.if.has_children> | |
244 </macro> | |
245 | |
246 <macro name="subapp_section_extra_row" parameters="has_more"> | |
247 <tr> | |
248 <td> </td> | |
249 <td colspan="[n.mixed_table_column_count.minus i='1'/]" style="padding:.6em .8em"> | |
250 <n.separate> | |
251 <text1> | |
252 <n.new_topic_link | |
253 text="[t]New Topic[/t]" | |
254 title="[t]Post new message in [t.location.subject/][/t]" | |
255 /> | |
256 </text1> | |
257 <separator> | |
258 <span class="weak-color" style="padding: 0 .5em">•</span> | |
259 </separator> | |
260 <text2> | |
261 <n.if.equal value1="[n.has_more/]" value2="[n.true/]"> | |
262 <then> | |
263 <n.node_link | |
264 title="[t]View all messages under this sub forum[/t]" | |
265 text="[t]View more[/t]" | |
266 /> » | |
267 </then> | |
268 </n.if.equal> | |
269 </text2> | |
270 </n.separate> | |
271 </td> | |
272 </tr> | |
273 </macro> |