{/if}
{foreach $data as $sgid => $group}
{* additional div, mainly used for additional *}
{* styling with css for the first group *}
{* Only show group header when there are clients *}
{* in the group OR if the format allows us *}
{* to show empty groups *}
{if $format !== 2 || $group["clients"]}
{if $group["iconid"]}
{/if}
{$group["name"]}
{if !$group["clients"]}
{_"ADMIN_STATUS_EMPTY_GROUP"}
{/if}
{/if}
{foreach $group["clients"] as $client}
{include admin-status-template, iconBeforeName => false, client => $client, group => $group}
{/foreach}
{/foreach}
{/if}
{* STATUS_STYLE_LIST *}
{if $format === 3}
{if !$data}
{_"ADMIN_STATUS_EMPTY_STATUS"}
{/if}
{var $lastGroup = null}
{foreach $data as $sgid => $group}
{foreach $group["clients"] as $client}
{* This thing detects when we are looping though a new group *}
{* and before we start printing clients from it, it inserts a *}
{* group separator that creates a little space between different groups *}
{if $lastGroup !== $group}
{* here we check if $lastGroup is not NULL *}
{* this way we dont put a spacer before the first group *}
{if $lastGroup}
{/if}
{var $lastGroup = $group}
{/if}
{include admin-status-template, iconBeforeName => true, client => $client, group => $group}
{/foreach}
{/foreach}