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
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
<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>
                        <!-- avatar foi removido pela Nabble em março/2014. Esta linha de código dá problema
                        <td style="width:22px;border:none">
                            <n.avatar_control group="A"/>
                        </td>
                        -->
                        <td class="nowrap" style="font-weight:bold;border:none">
                            <n.default
Binary
Namespace: BasicNamespace
Parameters: to, text
. to="[t
Macro
]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>
                            <!-- as linhas abaixo permitem mostrar o avatar na frente da mensagem, mas não nas respostas quando não há opção de add-ons mostrar avatar - pra mim é uma melhor apresentação. A condição if para pinados vita mostrar o avatar em tópicos e sub-foruns pinados-->
                            <td valign="top" style="border:none">
                            <n.if
Binary
Namespace: BasicNamespace
Parameters: condition, else, then
.is_pinned
Binary
Namespace: NodeNamespace
>
                      <then></then> 
                     <else> 
                                  <n.owner
Binary
Namespace: NodeNamespace
Parameters: do
.avatar
Macro
Requires: user
Parameters: size, border_class, group
 size="small" group="A"/>
                               </else>
                  </n.if.is_pinned>
                            </td>
                            <!-- Esta nova linha de código acaba por duplicar a presença de avatares se feita a opção de add-ons mostrar avatar, que aparecerão tanto na frente das mensagens e nas frente das respostas como era anteriormente
                            <n.topics_column_start/>
                            -->
                               <td class="adbayes-content" style="width:100%;padding-left:.3em;border:none;word-break:break-word">
                                <n.if
Binary
Namespace: BasicNamespace
Parameters: condition, else, then
.is_app
Binary
Namespace: NodeNamespace
>
                                    <then>
                                        <n.set_var
Binary
Namespace: BasicNamespace
Parameters: name, value
. name="txt_nodelink"><b><n.node_link
Macro
Requires: node
Parameters: text, href, title, class, target
/></b></n.set_var.>
                                        <n.if
Binary
Namespace: BasicNamespace
Parameters: condition, else, then
.contains_substring
Binary
Namespace: BasicNamespace
Parameters: string, substring
 string="[n.node_link
Macro
Requires: node
Parameters: text, href, title, class, target
/]" substring="Classificados">
                                              <then>
                                                    <n.set_var
Binary
Namespace: BasicNamespace
Parameters: name, value
. name="txt_nodelink"><span style="font-size:1.3em;font-family: 'Faster One'"><n.node_link
Macro
Requires: node
Parameters: text, href, title, class, target
/></span></n.set_var.>
                                              </then>
                                        </n.if.contains_substring>
                                        <n.if
Binary
Namespace: BasicNamespace
Parameters: condition, else, then
.contains_substring
Binary
Namespace: BasicNamespace
Parameters: string, substring
 string="[n.node_link
Macro
Requires: node
Parameters: text, href, title, class, target
/]" substring="Seção de Albuns">
                                              <then>
                                                  <n.set_var
Binary
Namespace: BasicNamespace
Parameters: name, value
. name="txt_nodelink"><span style="letter-spacing:0.2em;font-size:1.1em;font-family: 'Fugaz One"><n.node_link
Macro
Requires: node
Parameters: text, href, title, class, target
/></span></n.set_var.>
                                              </then>
                                        </n.if.contains_substring>
                                        <n.var
Binary
Namespace: BasicNamespace
Parameters: name
 name='txt_nodelink'/>
                                        
                                        <!--<b><n.node_link/></b> -->
                                        <span class="weak-color">
                                            (<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
Macro
>topic</t></one_text>
                                                    <many_text><t
Macro
>topics</t></many_text>
                                                </n.one_or_many.topic_count>
                                            </n.remove_spaces_between_tags.>)
                                        </span>
                                    </then>
                                    <else>
                                        <n.smart_post_link
Macro
Requires: node
Parameters: text, href, title, class
/>
                                        <span class="weak-color">
                                            <t
Macro
Parameters: author
>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>