<commit_before>{if="$role == 'owner' && $info"}
    <ul class="list active">
        <li onclick="CommunityConfig_ajaxGetAvatar('{$info->server|echapJS}', '{$info->node|echapJS}')">
            <span class="primary icon gray">
                <i class="material-icons">image</i>
            </span>
            <div>
                <p class="normal">{$c->__('page.avatar')}</p>
            </div>
        </li>
        <li onclick="CommunityConfig_ajaxGetConfig('{$info->server|echapJS}', '{$info->node|echapJS}')">
            <span class="primary icon gray">
                <i class="material-icons">settings</i>
            </span>
            <div>
                <p class="normal">{$c->__('communityaffiliation.configuration')}</p>
            </div>
        </li>
        <li onclick="CommunityAffiliations_ajaxGetSubscriptions('{$info->server|echapJS}', '{$info->node|echapJS}', true)">
            <span class="primary icon gray">
                <i class="material-icons">contacts</i>
            </span>
            <div>
                <p class="normal">{$c->__('communityaffiliation.subscriptions')}</p>
            </div>
        </li>
        <li onclick="CommunityAffiliations_ajaxAffiliations('{$info->server|echapJS}', '{$info->node|echapJS}')">
            <span class="primary icon gray">
                <i class="material-icons">supervisor_account</i>
            </span>
            <div>
                <p class="normal">{$c->__('communityaffiliation.roles')}</p>
            </div>
        </li>
        <li onclick="CommunityAffiliations_ajaxDelete('{$info->server|echapJS}', '{$info->node|echapJS}')">
            <span class="primary icon gray">
                <i class="material-icons">delete</i>
            </span>
            <div>
                <p class="normal">{$c->__('button.delete')}</p>
            </div>
        </li>
    </ul>
{/if}

{if="array_key_exists('owner', $affiliations)"}
    <ul class="list card active">
        <li class="subheader">
            <div>
                <p>{$c->__('communityaffiliation.owners')}</p>
            </div>
        </li>
        {loop="$affiliations['owner']"}
            {$contact = $c->getContact($value['jid'])}
            <li title="{$contact->jid}"
                onclick="MovimUtils.reload('{$c->route('contact', $contact->jid)}')">
                {$url = $contact->getPhoto('m')}
                {if="$url"}
                    <span class="primary icon bubble"
                        style="background-image: url({$url});">
                    </span>
                {else}
                    <span class="primary icon bubble color {$contact->jid|stringToColor}">
                        {$contact->truename|firstLetterCapitalize}
                    </span>
                {/if}
                <div>
                    <p>{$contact->truename}</p>
                    <p>{$contact->jid}</p>
                </div>
            </li>
        {/loop}
    </ul>
{/if}

{if="array_key_exists('publisher', $affiliations)"}
<ul class="list card active">
    <li class="subheader">
        <div>
            <p>{$c->__('communityaffiliation.publishers')}</p>
        </div>
    </li>
    {loop="$affiliations['publisher']"}
        {$contact = $c->getContact($value['jid'])}
        <li title="{$contact->jid}"
            onclick="MovimUtils.reload('{$c->route('contact', $contact->jid)}')">
            {$url = $contact->getPhoto('m')}
            {if="$url"}
                <span class="primary icon bubble"
                    style="background-image: url({$url});">
                </span>
            {else}
                <span class="primary icon bubble color {$contact->jid|stringToColor}">
                    {$contact->truename|firstLetterCapitalize}
                </span>
            {/if}
            <div>
                <p>{$contact->truename}</p>
                <p>{$contact->jid}</p>
            </div>
        </li>
    {/loop}
</ul>
{/if}

{if="$rostersubscriptions->isNotEmpty()"}
    {autoescape="off"}
        {$c->preparePublicSubscriptionsList($rostersubscriptions)}
    {/autoescape}
{else}
    <ul class="list card active thin">
        <li class="subheader">
            <div>
                <p>{$c->__('communityaffiliation.public_subscriptions')}</p>
            </div>
        </li>
    </ul>
{/if}

{if="$allsubscriptionscount > 0"}
    <ul class="list active">
        <li onclick="CommunityAffiliations_ajaxShowFullPublicSubscriptionsList('{$server}', '{$node}')">
            <span class="primary icon gray">
                <i class="material-icons">unfold_more</i><commit_msg>Show the title id there is no public subscriptions at all<commit_after>{if="$role == 'owner' && $info"}
    <ul class="list active">
        <li onclick="CommunityConfig_ajaxGetAvatar('{$info->server|echapJS}', '{$info->node|echapJS}')">
            <span class="primary icon gray">
                <i class="material-icons">image</i>
            </span>
            <div>
                <p class="normal">{$c->__('page.avatar')}</p>
            </div>
        </li>
        <li onclick="CommunityConfig_ajaxGetConfig('{$info->server|echapJS}', '{$info->node|echapJS}')">
            <span class="primary icon gray">
                <i class="material-icons">settings</i>
            </span>
            <div>
                <p class="normal">{$c->__('communityaffiliation.configuration')}</p>
            </div>
        </li>
        <li onclick="CommunityAffiliations_ajaxGetSubscriptions('{$info->server|echapJS}', '{$info->node|echapJS}', true)">
            <span class="primary icon gray">
                <i class="material-icons">contacts</i>
            </span>
            <div>
                <p class="normal">{$c->__('communityaffiliation.subscriptions')}</p>
            </div>
        </li>
        <li onclick="CommunityAffiliations_ajaxAffiliations('{$info->server|echapJS}', '{$info->node|echapJS}')">
            <span class="primary icon gray">
                <i class="material-icons">supervisor_account</i>
            </span>
            <div>
                <p class="normal">{$c->__('communityaffiliation.roles')}</p>
            </div>
        </li>
        <li onclick="CommunityAffiliations_ajaxDelete('{$info->server|echapJS}', '{$info->node|echapJS}')">
            <span class="primary icon gray">
                <i class="material-icons">delete</i>
            </span>
            <div>
                <p class="normal">{$c->__('button.delete')}</p>
            </div>
        </li>
    </ul>
{/if}

{if="array_key_exists('owner', $affiliations)"}
    <ul class="list card active">
        <li class="subheader">
            <div>
                <p>{$c->__('communityaffiliation.owners')}</p>
            </div>
        </li>
        {loop="$affiliations['owner']"}
            {$contact = $c->getContact($value['jid'])}
            <li title="{$contact->jid}"
                onclick="MovimUtils.reload('{$c->route('contact', $contact->jid)}')">
                {$url = $contact->getPhoto('m')}
                {if="$url"}
                    <span class="primary icon bubble"
                        style="background-image: url({$url});">
                    </span>
                {else}
                    <span class="primary icon bubble color {$contact->jid|stringToColor}">
                        {$contact->truename|firstLetterCapitalize}
                    </span>
                {/if}
                <div>
                    <p>{$contact->truename}</p>
                    <p>{$contact->jid}</p>
                </div>
            </li>
        {/loop}
    </ul>
{/if}

{if="array_key_exists('publisher', $affiliations)"}
<ul class="list card active">
    <li class="subheader">
        <div>
            <p>{$c->__('communityaffiliation.publishers')}</p>
        </div>
    </li>
    {loop="$affiliations['publisher']"}
        {$contact = $c->getContact($value['jid'])}
        <li title="{$contact->jid}"
            onclick="MovimUtils.reload('{$c->route('contact', $contact->jid)}')">
            {$url = $contact->getPhoto('m')}
            {if="$url"}
                <span class="primary icon bubble"
                    style="background-image: url({$url});">
                </span>
            {else}
                <span class="primary icon bubble color {$contact->jid|stringToColor}">
                    {$contact->truename|firstLetterCapitalize}
                </span>
            {/if}
            <div>
                <p>{$contact->truename}</p>
                <p>{$contact->jid}</p>
            </div>
        </li>
    {/loop}
</ul>
{/if}

{if="$rostersubscriptions->isNotEmpty()"}
    {autoescape="off"}
        {$c->preparePublicSubscriptionsList($rostersubscriptions)}
    {/autoescape}
{elseif="$allsubscriptionscount > 0"}
    <ul class="list card active thin">
        <li class="subheader">
            <div>
                <p>{$c->__('communityaffiliation.public_subscriptions')}</p>
            </div>
        </li>
    </ul>
{/if}

{if="$allsubscriptionscount > 0"}
    <ul class="list active">
        <li onclick="CommunityAffiliations_ajaxShowFullPublicSubscriptionsList('{$server}', '{$node}')">
            <span class="primary icon gray">
                <i class="material-icons">unfold_more</i>
{'fraction_non_alphanumeric': 0.18694298292709116, 'fraction_numerical': 0.0003221303554171588, 'mean_word_length': 1.8491893545426736, 'pattern_counts': {'":': 0, '<': 213, '<?xml version=': 0, '>': 292, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3137856', 'n_tokens_mistral': 2805, 'n_tokens_neox': 2738, 'n_words': 430}