{* $Id$ *}
{if !empty($userGroups)}

{tr}Groups you are in{/tr}

{foreach from=$userGroups key=gr item=type} {/foreach}
{if !empty($allGroups.$gr.groupHome)}{/if} {if $type eq 'included'}{$gr|escape} {tr}(This is an included group){/tr} {elseif $type eq 'leader'}{$gr|escape} {tr}(You are a leader){/tr} {else}{$gr|escape}{/if} {if !empty($allGroups.$gr.groupHome)}{/if} {if $showdefault eq 'y' and $default_group eq $gr}{icon name='group' class='tips' title=":{tr}Your default group{/tr}"}{/if} {if $showgroupdescription eq 'y'}
{$allGroups.$gr.groupDesc|escape}
{/if}
{if $type ne 'included' and $type ne 'leader' and ($alwaysallowleave eq 'y' or $allGroups.$gr.userChoice eq 'y')} {tr}Leave Group{/tr} {/if} {if $type eq 'leader'} {tr}Manage Group{/tr} {/if} {if $showdefault eq 'y' and ($default_group ne $gr or !empty($defaulturl))} {icon name='group'} {/if}
{/if} {if $showsubscribe ne 'n' && !empty($possibleGroups) && $subscribestyle eq 'dropdown'}
{elseif $showsubscribe ne 'n' && !empty($possibleGroups) && $subscribestyle eq 'table'} {tr}Groups you can join{/tr}
{foreach from=$possibleGroups item=gr} {/foreach}
{if !in_array($gr, $privategroups)}{else}{/if}{if isset($basegroupnames.$gr)}{$basegroupnames.$gr|escape} {tr}This group requires approval to join{/tr}{else}{$gr|escape}{/if}{if !in_array($gr, $privategroups)}{else}{/if} {if $showgroupdescription eq 'y'}
{$allGroups.$gr.groupDesc|escape}
{/if}
{/if}