Search tab at people page

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

Search tab at people page

Pedro <Nabble>
<override_macro name="people_tabbed_pane">
    <div style="margin:.5em 0">
        <n.horizontal_tab_control.>
            <n.add_horizontal_tab
            url="[n.page_node.people_path/]"
            text="[t]Users & Groups[/t]"
            selected="[n.is_people_default/]"
            details="[n.visible_users_table.people_columns/]"
            />
            <n.add_horizontal_tab
            url="[n.page_node.people_path filter='online-users'/]"
            text="[t]Online Users[/t]"
            selected="[n.is_online_users/]"
            details="[n.online_users_table.people_columns/]"
            />
            <n.add_horizontal_tab
            url="[n.page_node.people_path filter='list'/]"
            text="[t]Search[/t]"
            selected="[n.is_people_filter value='list'/]"
            details="[n.page_node.people_search_list.people_columns/]"
            />
        </n.horizontal_tab_control.>
    </div>
</override_macro>


<macro name='is_people_search'>
    <n.is_people_filter value='list' />
</macro>

<macro name='is_people_default'>
    <n.both condition1="[n.not.is_online_users/]" condition2="[n.not.is_people_search/]"/>
</macro>

<macro name="people_search_list" requires="node" dot_parameter="columns">  
    <n.put_in_head.>
        <style type="text/css">           
        </style>
    </n.put_in_head.>
    
    <n.zebra_table_javascript table_selector="table.subscriptions"/>
    
    <form method="post" action=""  class=''>        
        <div>
            <b>Name:</b> <input type='text' maxlength='30'  name="name" /><input class="sub_but"  type="submit" value="Search" />
        </div>       
    </form>
    <br/>
    <n.if.is_submitted_form>        
        <then>
            <n.searched_users_list.>
                <n.people_table.>
                    <n.columns/>
                </n.people_table.>
            </n.searched_users_list.>
        </then>
    </n.if.is_submitted_form>    
</macro>

<macro name="searched_users_list" dot_parameter="do" requires="node_page">   
    <n.site_users. start="0" length="999">
        <n.filter_by.contains_substring string="[n.to_lower_case.current_user.name/]+[n.to_lower_case.current_user.user_email/]" substring="[n.to_lower_case.searchName/]"/>
        <n.do/>
    </n.site_users.>
</macro>

<macro name='searchName'>    
    <n.get_parameter name='name' />
</macro>
My test forum.