Admin Template xf:if explanation

silence

Well-known member
In the ban edit admin template, there is this snippit:
HTML:
        <xen:snippet>
            {xen:if {$bannedUser.user_reason}, '{xen:phrase reason}: <span class="muted">{$bannedUser.user_reason}</span>'}
            {xen:phrase ban_ends}: <span class="muted">{xen:if $bannedUser.end_date, {xen:datetime $bannedUser.end_date}, '{xen:phrase never}'}</span>
        </xen:snippet>
In the line here:
HTML:
{xen:if $bannedUser.end_date, {xen:datetime $bannedUser.end_date}, '{xen:phrase never}'}
I'm extremely confused as to how that exactly works. Is it checking if $bannedUser.end_date is true?
Could someone be generous enough to explain that, I feel dumb :(
 
If there is an end date, show the formatted date, else display the phrase never.
 
Top Bottom