comparison src/nabble/view/naml/view_topics.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_topics">
2 <n.view_topics />
3 </macro>
4
5 <subroutine name="view_topics" requires="basic,nabble,servlet">
6 <n.apply_app_namespace.view_topics_page />
7 </subroutine>
8
9 <macro name="view_topics_page">
10 <n.set_app_rows_per_page rows_per_page="[n.forum_topics_per_page/]"/>
11 <n.app_html>
12 <head>
13 <n.app_title/>
14 <n.topics_table_stylesheet/>
15 </head>
16 <body>
17 <n.new_topic_action_link/>
18 <n.subapps_action_link/>
19 <n.people_action_link/>
20 <n.options_action_menu/>
21
22 <n.app_topic_pagination margin=".8em .3em .5em 0"/>
23 <n.topics_table.topics_table_columns />
24 <n.app_topic_pagination margin=".8em .3em .5em 0"/>
25 <n.forum_footer/>
26 </body>
27 </n.app_html>
28 </macro>
29
30 <macro name="topics_table_columns" requires="app_namespace">
31 <n.pin_column/>
32 <n.topics_column count="[n.app_topic_count/]"/>
33 <n.replies_column/>
34 <n.last_post_column white_space="nowrap"/>
35 <n.views_column/>
36 <n.subapp_column/>
37 </macro>
38
39 <macro name="topics_table_columns" requires="narrow_app_namespace">
40 <n.pin_column/>
41 <n.topics_summary_column count="[n.app_topic_count/]" width="50%"/>
42 <n.last_post_column white_space="nowrap" width="50%"/>
43 </macro>
44
45 <macro name="topics_table_stylesheet">
46 <style type="text/css">
47 table.main {
48 width:99.9%;
49 border-width: 1px;
50 margin:0 1px;
51 border-style: solid;
52 border-collapse:collapse;
53 }
54 table.main td {
55 padding:.1em;
56 height:2.2em;
57 }
58 tr.header-row td {
59 font-weight:bold;
60 padding: .1em .2em;
61 border-bottom-width: 1px;
62 border-bottom-style: solid;
63 }
64 </style>
65 </macro>
66
67 <macro name="topics_table" dot_parameter="columns">
68 <div style="clear:both"></div>
69 <table class="main medium-border-color">
70 <n.table_header.>
71 <tr class="header-row shaded-bg-color">
72 <n.columns/>
73 </tr>
74 </n.table_header.>
75 <n.page_node.topics_list.
76 start="[n.app_index_record/]"
77 length="[n.app_rows_per_page/]"
78 sort="[n.topics_table_sort/]"
79 filter="[n.app_topic_filter/]"
80 >
81 <n.loop.>
82 <tr class="[n.even_row_background/] main-row">
83 <n.columns/>
84 </tr>
85 <n.if.next_node>
86 <then>
87 <tr class="[n.odd_row_background/] light-bg-color main-row">
88 <n.columns/>
89 </tr>
90 </then>
91 </n.if.next_node>
92 </n.loop.>
93 </n.page_node.topics_list.>
94 <n.if.not.page_node.has_topics filter="[n.app_topic_filter/]">
95 <then>
96 <tr>
97 <td></td>
98 <td colspan="10" style="padding:.8em 0">
99 <t>Empty</t>
100 </td>
101 </tr>
102 </then>
103 </n.if.not.page_node.has_topics>
104 </table>
105 <div style="clear:both"></div>
106 </macro>
107
108 <macro name="topics_table_sort">
109 pinned-and-last-node-date
110 </macro>