user_nodes_filter_control.naml

<override_macro name="user_nodes_filter_control" requires="user_page">
    <n.put_in_head.>
        <script type="text/javascript">
            $(document).ready(function() {
                function applyFilter() {
                    window.location = $('#filter').val();
                };
                $('#filter').change(applyFilter);
            });
        </script>
    </n.put_in_head.>
    <div class="float-left nowrap" style="margin:.3em .2em">
        <b><t>Show</t></b>
        <n.set_var. name='url'>
            <n.page_user.url filter="[n.user_nodes_filter/]"/>
        </n.set_var.>
        <select id="filter">
            <n.select_option value="[n.page_user.url/]" text="[t]All Posts[/t]"/>
            <n.select_option value="[n.page_user.url filter='topics_only'/]" selectedValue="[n.var name='url'/]" text="[t]Topics[/t]"/>
        </select>
        &nbsp;
        <span class="weak-color" style="font-style: italic">
            <t>Total</t>:
            <n.one_or_many.user_nodes_count>
                <one_text><t>post</t></one_text>
                <many_text><t>posts</t></many_text>
            </n.one_or_many.user_nodes_count>
        </span>
    </div>
</override_macro>