list_subscribers.naml

<override_macro name="list_subscribers" requires="node">  
    <n.if.is_submitted_form>  
        <then.process_unsubscription/>  
    </n.if.is_submitted_form>  
      
    <n.put_in_head.>  
        <style type="text/css">  
            table.subscriptions {  
            border-collapse:collapse;  
            margin-top:1em;  
            clear:both;  
            width:100%  
            }  
            table.subscriptions th {  
            padding: .3em .6em;  
            text-align:left;  
            border-bottom-style:solid;  
            border-bottom-width:2px;  
            }  
            table.subscriptions td {  
            padding: .5em;  
            }  
        </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/>  
      
        
    <div class="weak-color" style="float:left;margin:.5em 0">  
        <n.one_or_many.page_node.subscription_count>  
            <one_text><t>subscriber</t></one_text>  
            <many_text><t>subscribers</t></many_text>  
        </n.one_or_many.page_node.subscription_count>  
    </div>  
      
    <n.comment.>Added Subscription Type and Frequency</n.comment.> 
    <n.subscriptions. start="[n.subscriber_page_index_record/]" length="[n.page_node.subscription_count/]"> 
        <n.if.has_more_elements>  
            <then>  
                <table class="subscriptions">  
                    <tr class="shaded-bg-color">  
                        <th class="medium-border-color"></th>  
                        <th class="medium-border-color"><t>Name</t></th>  
                        <th class="medium-border-color"><t>Email</t></th>  
                        <th class="medium-border-color"><t>Subscription Type</t></th>  
                        <th class="medium-border-color"><t>Frequency</t></th>  
                        <th class="medium-border-color"></th>  
                    </tr>               
                      
                    <n.if.is_submitted_form>          
                        <then>  
                            <n.if.has_parameter name="name">
                                <then>
                                    <n.loop.>  
                                        <n.if.contains_substring string="[n.to_lower_case.subscription.user.name/]+[n.to_lower_case.subscription.user.user_email/]" substring="[n.to_lower_case.searchName/]">  
                                            <then>  
                                                <n.subscription_user_row/>  
                                            </then>  
                                        </n.if.contains_substring>  
                                    </n.loop.>  
                                </then>
                            </n.if.has_parameter>
                        </then>  
                        <else>  
                            <n.loop.>  
                                <n.subscription_user_row/>  
                            </n.loop.>  
                        </else>  
                    </n.if.is_submitted_form>                      
                      
                </table>  
            </then>  
        </n.if.has_more_elements>  
    </n.subscriptions.>     
 </override_macro>