topics_column

NAML documentation   Watch a video
   Usages of this macro
... in topics_column.naml
1
2
3
4
5
6
7
8
9
10
11
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
54
55
56
57
58
59
<override_macro name="topics_column" parameters="width,title,count">
    <n.table_column
Macro
Parameters: head, body
>
        <head>
            <td class="[n.column_default_border
Macro
/] topics-column nowrap" style="[n.width_style
Macro
Parameters: width
.width/]">
                <table class="avatar-table">
                    <tr>
                        <td style="width:22px;border:none">
                            <n.avatar_control
Macro
Parameters: group
 group="A"/>
                        </td>
                        <td class="nowrap" style="font-weight:bold;border:none">
                            <n.default
Binary
Namespace: BasicNamespace
Parameters: to, text
. to="[t]Topics[/t]"><n.title/></n.default.>
                            <span class="weak-color" style="font-size:80%;margin-right:1.7em">(<n.count/>)</span>
                        </td>
                    </tr>
                </table>
            </td>
        </head>
        <body>
            <n.current_node
Binary
Namespace: NodeList
Parameters: do
.>
                <td class="[n.column_default_border
Macro
/]">
                    <table>
                        <tr>
                            <td valign="top" style="border:none">
                                <n.owner
Binary
Namespace: NodeNamespace
Parameters: do
.avatar
Macro
Requires: user
Parameters: size, border_class, group
 size="small" group="A"/>
                            </td>
                            <td style="padding-left:.3em;border:none">
                                <n.if
Binary
Namespace: BasicNamespace
Parameters: condition, else, then
.is_app
Binary
Namespace: NodeNamespace
>
                                    <then>
                                        <h3><n.node_link
Macro
Requires: node
Parameters: style, text, href, title, class
/></h3>
                                        <span class="weak-color" style="font-size: .85em;">
                                            (<n.remove_spaces_between_tags
Macro
Parameters: text
.>
                                                <n.one_or_many
Macro
Parameters: many_text, one_text, n
.topic_count
Binary
Namespace: NodeNamespace
Parameters: filter
>
                                                    <one_text><t>topic</t></one_text>
                                                    <many_text><t>topics</t></many_text>
                                                </n.one_or_many.topic_count>
                                            </n.remove_spaces_between_tags.>)
                                        </span>
                                    </then>
                                    <else>
                                        <span id="pin-icon" class="weak-color" style="padding:0 .0em;margin-right:.3em;[n.hidden_if
Macro
Parameters: condition
.not
Binary
Namespace: BasicNamespace
Parameters: condition
.current_node
Binary
Namespace: NodeList
Parameters: do
.is_pinned
Binary
Namespace: NodeNamespace
/]">  
    <img src="/images/pin.png" width="18" height="19" style="vertical-align:middle"/> 
</span>   
                                        <span id="lock-icon" class="weak-color" style="padding:0 .0em;margin-right:.3em;[n.hidden_if
Macro
Parameters: condition
.not
Binary
Namespace: BasicNamespace
Parameters: condition
.current_node
Binary
Namespace: NodeList
Parameters: do
.is_locked_topic
Macro
Requires: node
/]">  
    <img src="/images/lock_sm.png" width="10" height="15" style="vertical-align:middle"/> 
</span>   
                                        <n.smart_post_link
Macro
Requires: node
Parameters: text, href, title, class
/>
                                        <span class="weak-color" style="font-size: .85em;">
                                            <t>by <t.author.owner
Binary
Namespace: NodeNamespace
Parameters: do
.name
Binary
Namespace: UserNamespace
Parameters: truncate
 truncate="20"/></t>
                                        </span>
                                    </else>
                                </n.if.is_app>
                            </td>
                        </tr>
                    </table>
                </td>
            </n.current_node.>
        </body>
    </n.table_column>
</override_macro>
Overrides default macro
... in columns.naml
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
<macro name="topics_column" parameters="width,title,count">
    <n.table_column>
        <head>
            <td class="[n.column_default_border/] topics-column nowrap" style="[n.width_style.width/]">
                <table class="avatar-table">
                    <tr>
                        <td class="nowrap" style="font-weight:bold;border:none">
                            <n.default. to="[t]Topics[/t]"><n.title/></n.default.>
                            <span class="weak-color" style="font-size:80%;margin-right:1.7em">(<n.count/>)</span>
                        </td>
                    </tr>
                </table>
            </td>
        </head>
        <body>
            <n.current_node.>
                <td class="[n.column_default_border/]">
                    <table>
                        <tr>
                            <n.topics_column_start/>
                            <td class="adbayes-content" style="width:100%;padding-left:.3em;border:none;word-break:break-word">
                                <n.if.is_app>
                                    <then>
                                        <b><n.node_link/></b>
                                        <span class="weak-color">
                                            (<n.remove_spaces_between_tags.>
                                                <n.one_or_many.topic_count>
                                                    <one_text><t>topic</t></one_text>
                                                    <many_text><t>topics</t></many_text>
                                                </n.one_or_many.topic_count>
                                            </n.remove_spaces_between_tags.>)
                                        </span>
                                    </then>
                                    <else>
                                        <n.smart_post_link/>
                                        <span class="weak-color">
                                            <t>by <t.author.owner.name truncate="20"/></t>
                                        </span>
                                    </else>
                                </n.if.is_app>
                            </td>
                        </tr>
                    </table>
                </td>
            </n.current_node.>
        </body>
    </n.table_column>
</macro>