0
|
1 <subroutine name="view_gallery" requires="basic,nabble,servlet">
|
|
2 <n.apply_app_namespace.view_gallery_page />
|
|
3 </subroutine>
|
|
4
|
|
5 <macro name="view_gallery_page">
|
|
6 <n.set_app_rows_per_page rows_per_page="[n.gallery_topics_per_page/]"/>
|
|
7 <n.app_html>
|
|
8 <head>
|
|
9 <n.app_title/>
|
|
10 <n.gallery_table_stylesheet/>
|
|
11 </head>
|
|
12 <body>
|
|
13 <n.column_layout.>
|
|
14 <n.column. width="70%">
|
|
15 <n.widget.>
|
|
16 <n.gallery_table/>
|
|
17 <n.app_topic_pagination margin=".5em .3em"/>
|
|
18 </n.widget.>
|
|
19 </n.column.>
|
|
20 <n.column. width="30%">
|
|
21 <n.sidebar_widget/>
|
|
22 </n.column.>
|
|
23 </n.column_layout.>
|
|
24 </body>
|
|
25 </n.app_html>
|
|
26 </macro>
|
|
27
|
|
28 <macro name="gallery_topics_per_page">
|
|
29 16
|
|
30 </macro>
|
|
31
|
|
32 <macro name="gallery_table_stylesheet">
|
|
33 <style type="text/css">
|
|
34 table.gallery {
|
|
35 margin-top:1em;
|
|
36 width:100%;
|
|
37 }
|
|
38 table.gallery tr {
|
|
39 vertical-align:top;
|
|
40 }
|
|
41 table.gallery td {
|
|
42 padding: .5em;
|
|
43 text-align:center;
|
|
44 }
|
|
45 </style>
|
|
46 </macro>
|
|
47
|
|
48 <macro name="gallery_table">
|
|
49 <table class="gallery">
|
|
50 <n.page_node.topics_list. sort="pinned-and-root-node-date" start="[n.app_index_record/]" length="[n.app_rows_per_page/]" filter="[n.app_topic_filter/]" >
|
|
51 <n.handle_empty_gallery/>
|
|
52 <n.loop.>
|
|
53 <n.gallery_table_row/>
|
|
54 </n.loop.>
|
|
55 </n.page_node.topics_list.>
|
|
56 </table>
|
|
57 </macro>
|
|
58
|
|
59 <macro name="gallery_table_row" requires="app_namespace">
|
|
60 <tr>
|
|
61 <td style="width:33%">
|
|
62 <n.current_node.gallery_cell/>
|
|
63 </td>
|
|
64 <td style="width:33%">
|
|
65 <n.if.next_node>
|
|
66 <then.current_node.gallery_cell/>
|
|
67 </n.if.next_node>
|
|
68 </td>
|
|
69 <td style="width:33%">
|
|
70 <n.if.next_node>
|
|
71 <then.current_node.gallery_cell/>
|
|
72 </n.if.next_node>
|
|
73 </td>
|
|
74 </tr>
|
|
75 </macro>
|
|
76
|
|
77 <macro name="gallery_table_row" requires="narrow_app_namespace">
|
|
78 <tr>
|
|
79 <td style="width:50%">
|
|
80 <n.current_node.gallery_cell/>
|
|
81 </td>
|
|
82 <td style="width:50%">
|
|
83 <n.if.next_node>
|
|
84 <then.current_node.gallery_cell/>
|
|
85 </n.if.next_node>
|
|
86 </td>
|
|
87 </tr>
|
|
88 </macro>
|
|
89
|
|
90
|
|
91 <macro name="handle_empty_gallery" requires="node_list,node_page,servlet">
|
|
92 <n.if.not.has_more_elements>
|
|
93 <then.empty_gallery_row/>
|
|
94 </n.if.not.has_more_elements>
|
|
95 </macro>
|
|
96
|
|
97 <macro name="empty_gallery_row" requires="app_namespace">
|
|
98 <tr>
|
|
99 <td style="width:33%"><n.page_node.empty_gallery_cell/></td>
|
|
100 <td style="width:33%"></td>
|
|
101 <td style="width:33%"></td>
|
|
102 </tr>
|
|
103 </macro>
|
|
104
|
|
105 <macro name="empty_gallery_row" requires="narrow_app_namespace">
|
|
106 <tr>
|
|
107 <td style="width:50%"><n.page_node.empty_gallery_cell/></td>
|
|
108 <td style="width:50%"></td>
|
|
109 </tr>
|
|
110 </macro>
|
|
111
|
|
112 <macro name="gallery_cell">
|
|
113 <n.cell_thumbnail/>
|
|
114 <n.cell_link_and_star/>
|
|
115 <n.cell_details/>
|
|
116 </macro>
|
|
117
|
|
118 <macro name="cell_thumbnail">
|
|
119 <n.if.is_pinned_in_loop>
|
|
120 <then>
|
|
121 <div class="pinned-box"></div>
|
|
122 </then>
|
|
123 </n.if.is_pinned_in_loop>
|
|
124 <n.if.has_thumbnail>
|
|
125 <then.thumbnail_box/>
|
|
126 <else>
|
|
127 <span class="weak-color box-text adbayes-content">
|
|
128 <n.message.truncated size="100"/>
|
|
129 </span>
|
|
130 </else>
|
|
131 </n.if.has_thumbnail>
|
|
132 </macro>
|
|
133
|
|
134 <macro name="cell_link_and_star">
|
|
135 <div class="adbayes-content"><n.node_link/></div>
|
|
136 </macro>
|
|
137
|
|
138 <macro name="cell_details">
|
|
139 <div class="weak-color" style="font-variant: small-caps;">
|
|
140 <t>by <t.author.owner.name truncate="20"/></t>
|
|
141 </div>
|
|
142
|
|
143 <div class="weak-color" style="width:100%;font-size:80%;margin:.3em 0;font-variant: small-caps;">
|
|
144 <n.if.not.is_locked_topic>
|
|
145 <then>
|
|
146 <n.if.has_replies>
|
|
147 <then.comments_link/>
|
|
148 <else>
|
|
149 0 <t>comments</t>
|
|
150 </else>
|
|
151 </n.if.has_replies>
|
|
152 </then>
|
|
153 </n.if.not.is_locked_topic>
|
|
154 –
|
|
155 <n.views show_text="true"/>
|
|
156 <n.if.is_in_subapp>
|
|
157 <then>
|
|
158 - <t>in <t.location.italic.subapp_link_on_hover/></t>
|
|
159 </then>
|
|
160 </n.if.is_in_subapp>
|
|
161 </div>
|
|
162 </macro>
|
|
163
|
|
164 <macro name="thumbnail_box">
|
|
165 <span class="box">
|
|
166 <a href="[n.url/]"><img src="[n.thumbnail_url/]" style="border:none"/></a>
|
|
167 </span>
|
|
168 </macro>
|
|
169
|
|
170 <macro name="empty_gallery_cell" requires="node">
|
|
171 <span class="weak-color box-text">
|
|
172 <div style="position:relative;top:30%">
|
|
173 <n.new_topic_link text="[t]Click here to make your first post[/t]"/>
|
|
174 </div>
|
|
175 </span>
|
|
176 </macro> |