subcategories_column

NAML documentation   Watch a video
   Usages of this macro
... in tweaks.naml
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
<override_macro name="subcategories_column" parameters="title,width">
    <n.table_column
Macro
Parameters: head, body
>
        <head>
            <td class="[n.column_default_border
Macro
/] subcategories-column nowrap" style="[n.width_style
Macro
Parameters: width
.width/]" colspan="2">
                <n.default
Binary
Namespace: BasicNamespace
Parameters: to, text
. to="[t]Subcategories[/t]"><n.title/></n.default.>
            </td>
        </head>
        <body>
            <td class="[n.column_default_border
Macro
/]" style="width:1em">
                <n.if
Binary
Namespace: BasicNamespace
Parameters: condition, else, then
.current_node
Binary
Namespace: NodeList
Parameters: do
.is_app
Binary
Namespace: NodeNamespace
>
                    <then><img src="/images/forum.png" width="25" height="23"/></then>
                    <else><img src="/images/thread.png" width="25" height="23"/></else>
                </n.if.current_node.is_app>
            </td>
            <td class="weak-color [n.column_default_border
Macro
/] adbayes-content" style="width:60%">
                <div style="font-weight:bold;margin-bottom:.3em">
                    <n.current_node
Binary
Namespace: NodeList
Parameters: do
.node_link
Macro
Requires: node
Parameters: text, href, title, class
/>
                </div>
                <span class="weak-color node-snippet" style="font-size:90%;display:block;padding-bottom:.5em">
                    <n.if
Binary
Namespace: BasicNamespace
Parameters: condition, else, then
.current_node
Binary
Namespace: NodeList
Parameters: do
.is_app
Binary
Namespace: NodeNamespace
>
                        <then.current_node
Binary
Namespace: NodeList
Parameters: do
.node_message_as_html
Macro
Requires: node
/>
                        <else>
                            <n.truncate
Binary
Namespace: NabbleNamespace
Parameters: size, if_truncated, text
. size="200">
                                <n.remove_html_tags
Macro
Parameters: text
.current_node
Binary
Namespace: NodeList
Parameters: do
.message
Binary
Namespace: NodeNamespace
Parameters: do
.as_text
Binary
Namespace: MessageNamespace
/>
                            </n.truncate.>
                        </else>
                    </n.if.current_node.is_app>
                    <n.if
Binary
Namespace: BasicNamespace
Parameters: condition, else, then
.current_node
Binary
Namespace: NodeList
Parameters: do
.has_subapps
Binary
Namespace: NodeNamespace
>
                        <then>
                            <div class="sub-forums weak-color">
                                <b><t>Sub-Forums</t>:</b>
                                <n.current_node
Binary
Namespace: NodeList
Parameters: do
.subapps_list
Binary
Namespace: NodeNamespace
Parameters: filter, do
.loop
Macro
Requires: sequence
Parameters: by, do
.>
                                    <n.current_node
Binary
Namespace: NodeList
Parameters: do
.node_link
Macro
Requires: node
Parameters: text, href, title, class
 class="nowrap" />&#32;
                                </n.current_node.subapps_list.loop.>
                            </div>
                        </then>
                    </n.if.current_node.has_subapps>
                </span>
            </td>
        </body>
    </n.table_column>
</override_macro>
Overrides default macro
... in columns.naml
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
<macro name="subcategories_column" parameters="title,width">
    <n.table_column>
        <head>
            <td class="[n.column_default_border/] subcategories-column nowrap" style="[n.width_style.width/]" colspan="2">
                <n.default. to="[t]Subcategories[/t]"><n.title/></n.default.>
            </td>
        </head>
        <body>
            <td class="[n.column_default_border/]" style="width:1em">
                <n.if.current_node.is_app>
                    <then><img src="/images/forum.png" width="25" height="23"/></then>
                    <else><img src="/images/thread.png" width="25" height="23"/></else>
                </n.if.current_node.is_app>
            </td>
            <td class="weak-color [n.column_default_border/] adbayes-content" style="width:60%">
                <div style="font-weight:bold;margin-bottom:.3em">
                    <n.current_node.node_link/>
                </div>
                <span class="weak-color node-snippet" style="font-size:90%;display:block;padding-bottom:.5em">
                    <n.if.current_node.is_app>
                        <then.current_node.node_message_as_html/>
                        <else>
                            <n.truncate. size="300">
                                <n.remove_html_tags.current_node.message.as_text/>
                            </n.truncate.>
                        </else>
                    </n.if.current_node.is_app>
                    <n.if.current_node.has_subapps>
                        <then>
                            <div class="sub-forums weak-color">
                                <b><t>Sub-Forums</t>:</b>
                                <n.current_node.subapps_list.loop.>
                                    <n.current_node.node_link class="nowrap" />&#32;
                                </n.current_node.subapps_list.loop.>
                            </div>
                        </then>
                    </n.if.current_node.has_subapps>
                </span>
            </td>
        </body>
    </n.table_column>
</macro>