Mercurial Hosting > nabble
view src/nabble/view/naml/view_mixed.naml @ 0:7ecd1a4ef557
add content
author | Franklin Schmidt <fschmidt@gmail.com> |
---|---|
date | Thu, 21 Mar 2019 19:15:52 -0600 |
parents | |
children |
line wrap: on
line source
<macro name="call_view_mixed"> <n.view_mixed /> </macro> <subroutine name="view_mixed" requires="basic,nabble,servlet"> <n.apply_app_namespace.view_mixed_page /> </subroutine> <macro name="view_mixed_page"> <n.if.not.get_node_from_parameter.has_pinned_subapps> <then> <n.call_view_standard/> <n.exit/> </then> </n.if.not.get_node_from_parameter.has_pinned_subapps> <n.view_mixed_html/> </macro> <macro name="view_mixed_html"> <n.app_html> <head> <n.app_title/> <n.mixed_table_stylesheet/> </head> <body> <n.new_topic_action_link/> <n.topics_action_link/> <n.people_action_link/> <n.options_action_menu/> <n.mixed_table.mixed_table_columns /> <n.forum_footer/> </body> </n.app_html> </macro> <macro name="mixed_table_columns" requires="app_namespace"> <n.pin_column/> <n.mixed_topics_column/> <n.replies_column/> <n.last_post_column white_space="nowrap"/> <n.views_column/> </macro> <macro name="mixed_table_columns" requires="narrow_app_namespace"> <n.pin_column/> <n.mixed_topics_column/> <n.replies_column/> <n.last_post_column white_space="nowrap"/> </macro> <macro name="mixed_table_stylesheet"> <style type="text/css"> table.main { border-spacing:0; width:100%; border-width:1px; border-style:solid; } table.main td { padding:.1em; height:2.2em; } tr.header-row td { font-weight:bold; padding: .2em .2em .1em; border-bottom-width: 1px; border-bottom-style: solid; } tr.category-row td { border-width: 1px; border-style: solid; border-left: none; border-right: none; } tr.main-row td { border-width: 1px; border-style: dotted; border-left: none; border-right: none; border-top:none; } tr.main-row td td { border-color: transparent; } a.category-link { text-decoration:none; font-size:110%; } td.topics-column { width:70%; } </style> </macro> <macro name="mixed_table" dot_parameter="columns"> <div style="clear:both"></div> <n.global_set_var name="mixed_table_column_count" value="[n.calc_table_column_count.columns/]" /> <table class="main medium-border-color"> <n.string_list. values="[n.mixed_topics_per_page/]" > <n.no_output.next_string/> <n.child_topics_section. length="[n.current_string/]"> <n.columns/> </n.child_topics_section.> <n.page_node.subapps_list. filter="[n.pinned_filter/]"> <n.while.has_more_strings n="2"> <loop> <n.no_output.next_string/> <n.next_section. length="[n.current_string/]"><n.columns/></n.next_section.> </loop> </n.while.has_more_strings> <n.if.has_more_strings> <then.no_output.next_string/> </n.if.has_more_strings> <n.while.next_node> <loop> <n.sub_section. length="[n.current_string/]"><n.columns/></n.sub_section.> </loop> </n.while.next_node> </n.page_node.subapps_list.> </n.string_list.> </table> <div style="clear:both"></div> </macro> <macro name="mixed_topics_per_page"> 6 </macro> <macro name="mixed_table_column_count" dot_parameter="do"> <n.int> <i.global_var name="mixed_table_column_count" /> <do.do /> </n.int> </macro> <macro name="next_section" dot_parameter="columns" parameters="length"> <n.if.next_node> <then.sub_section. length="[n.length/]"> <n.columns/> </then.sub_section.> </n.if.next_node> </macro> <macro name="sub_section" dot_parameter="columns" parameters="length"> <n.if.current_node.can_be_viewed_by_visitor> <then> <n.if.current_node.type equals="gallery"> <then.current_node.gallery_section length="[n.length/]"/> <else> <n.current_node.subapp_section. length="[n.length/]"> <n.columns/> </n.current_node.subapp_section.> </else> </n.if.current_node.type> </then> </n.if.current_node.can_be_viewed_by_visitor> </macro> <macro name="child_topics_section" dot_parameter="columns" parameters="length"> <n.if.page_node.has_child_topics> <then> <n.top_topics.> <n.table_header.> <tr class="header-row shaded-bg-color"> <n.columns/> </tr> </n.table_header.> <n.page_node.children_list. length="[n.length/]" filter="[n.no_pinned_subapps_filter/]"> <n.loop.> <tr class="main-row"> <n.columns/> </tr> </n.loop.> <n.if.there_is_more> <then> <tr class="main-row"> <td> </td> <td class="medium-border-color" colspan="[n.mixed_table_column_count.minus i='1'/]" style="padding:.6em .8em"> <n.page_node.node_link href="[n.url template='view_standard'/]" title="[t]View all messages under this sub-forum[/t]" text="[t]View more[/t]" /> » </td> </tr> </then> </n.if.there_is_more> </n.page_node.children_list.> </n.top_topics.> </then> </n.if.page_node.has_child_topics> </macro> <macro name="gallery_section" requires="node" parameters="length"> <tr class="header-row category-row shaded-bg-color"> <n.table_header.> <td class="medium-border-color"></td> <n.topics_column title="[n.node_link class='second-font category-link'/]" count="[n.topic_count/]"/> <td class="medium-border-color" colspan="[n.mixed_table_column_count.minus i='1'/]"></td> </n.table_header.> </tr> <tr class="main-row"> <td colspan="[n.mixed_table_column_count/]" class="medium-border-color" style="width:auto;overflow:hidden"> <n.slider.> <n.topics_list. sort="pinned-and-last-node-date" length="[n.length/]" filter="[n.app_topic_filter/]"> <n.loop.> <td align="center" style="padding:0 .5em"> <n.current_node.gallery_cell/> </td> </n.loop.> <n.set_var. name="last_loop_has_more"><n.there_is_more/></n.set_var.> </n.topics_list.> </n.slider.> </td> </tr> <n.subapp_section_extra_row has_more="[n.var name='has_more_rows'/]"/> </macro> <macro name="subapp_section" requires="node" dot_parameter="columns" parameters="length"> <tr class="header-row category-row shaded-bg-color"> <n.table_header.> <n.columns/> </n.table_header.> </tr> <n.if.has_children> <then> <n.children_list. length="[n.length/]"> <n.loop.> <tr class="main-row"> <n.columns/> </tr> </n.loop.> <n.set_var. name="has_more_rows"><n.there_is_more/></n.set_var.> </n.children_list.> <n.subapp_section_extra_row has_more="[n.var name='has_more_rows'/]"/> </then> <else.subapp_section_extra_row has_more="[n.false/]"/> </n.if.has_children> </macro> <macro name="subapp_section_extra_row" parameters="has_more"> <tr> <td> </td> <td colspan="[n.mixed_table_column_count.minus i='1'/]" style="padding:.6em .8em"> <n.separate> <text1> <n.new_topic_link text="[t]New Topic[/t]" title="[t]Post new message in [t.location.subject/][/t]" /> </text1> <separator> <span class="weak-color" style="padding: 0 .5em">•</span> </separator> <text2> <n.if.equal value1="[n.has_more/]" value2="[n.true/]"> <then> <n.node_link title="[t]View all messages under this sub forum[/t]" text="[t]View more[/t]" /> » </then> </n.if.equal> </text2> </n.separate> </td> </tr> </macro>