<commit_before><div class="row">
    <div class="col-lg-12">
        <h1 class="page-header">{-"Userlist"|translate}
            <button class="btn btn-primary pull-right" data-toggle="modal" data-target="#addusermodal"><i
                        class="fa fa-plus"></i>&nbsp;{-"Add User"|translate}</button>
        </h1>
        <ol class="breadcrumb">
            <li><a href="{-"core.siteurl"|setting}admin"><i class="fa fa-home"></i></a></li>
            <li class="active">{-"Userlist"|translate}</li>
        </ol>
    </div>
</div>
<div class="row">
    <div class="col-lg-10">
        <div class="panel panel-default">
            {-*<div class="panel-body">
            <form class="form-inline" role="form">
            <div class="form-group">
            <label for="usertable-searchfield">{-"Search by name"|translate}</label>
            <input type="email" class="form-control" id="usertable-searchfield" placeholder="{-"Search"|translate}">
                        </div>
                        </form>
                        </div>*}
            <table class="table-striped table">
                <thead>
                <tr>
                    <th>#</th>
                    <th>{-"Name"|translate}</th>
                    <th>{-"E-Mail"|translate}</th>
                    <th>{-"Registered"|translate}</th>
                    <th>{-"Last Action"|translate}</th>
                    <th>{-"Status"|translate}</th>
                    <th>{-"Actions"|translate}</th>
                </tr>
                </thead>
                <tbody id="usertable">
                {-foreach $users AS $i => $userItem}
                    <tr class="user-{-$userItem.groupid}">
                        <td>{-$i+1}</td>
                        <td><a href="{-"index.php?m=profile&action="|URL}{-$userItem.username}" target="_blank">{-$userItem.name}</a>
                        </td>
                        <td>{-$userItem.email}</td>
                        <td>{-$userItem.registered}</td>
                        <td>{-$userItem.lastAction}</td>
                        <td>
                            {-if $userItem.groupid eq 1}
                                <span class="label label-success">{-"Active"|translate}</span>
                            {-elseif $userItem.groupid eq 0}
                                <label class="label label-default">{-"Not verified"|translate}</label>
                            {-elseif $userItem.groupid eq 2}
                                <label class="label label-warning">{-"Administrator"|translate}</label>
                            {-elseif $userItem.groupid eq 3}
                                <label class="label label-info">{-"Cunity-Owner"|translate}</label>
                            {-elseif $userItem.groupid eq 4}
                                <label class="label label-danger">{-"Blocked"|translate}</label>
                            {-/if}
                        </td>
                        <td>
                            <div class="btn-group btn-group-sm">
                                <button type="button"
                                        class="btn btn-primary dropdown-toggle" {-if $user.userid eq $userItem.userid || $userItem.groupid eq 3} disabled{-/if}
                                        data-toggle="dropdown">{-"Actions"|translate}&nbsp;<span class="caret"></span>
                                </button>
                                <ul class="dropdown-menu" role="menu">
                                    <li><a href="javascript: changeUserStatus(null, {-$userItem.userid});"><i
                                                    class="fa fa-trash-o"></i>&nbsp;{-"Delete this user"|translate}</a>
                                    </li>
                                    {-if $user.groupid <= 3 and $userItem.groupid != 4}
                                    <li><a href="javascript: changeUserStatus(4, {-$userItem.userid});"><i
                                                    class="fa fa-ban"></i>&nbsp;{-"Block this user"|translate}</a></li>
                                    {-/if}
                                    {-if $user.groupid <= 3 and $userItem.groupid == 4}
                                        <li><a href="javascript: changeUserStatus(1, {-$userItem.userid});"><i
                                                        class="fa fa-check"></i>&nbsp;{-"Activate this user"|translate}
                                            </a></li>
                                    {-/if}
                                    {-if $userItem.groupid <= 2}
                                        <li class="divider"></li>
                                        {-if $userItem.groupid eq 1}
                                            <li><a href="javascript: changeUserStatus(2, {-$userItem.userid});"><i
                                                            class="fa fa-wrench"></i>&nbsp;{-"Make Administrator"|translate}
                                                </a></li>
                                        {-elseif $userItem.groupid eq 2}
                                            <li><a href="javascript: changeUserStatus(1, {-$userItem.userid});"><i
                                                            class="fa fa-ban"></i>&nbsp;{-"Remove Administrator"|translate}
                                                </a></li>
                                        {-/if}
                                    {-/if}
                                </ul>
                            </div>
                        </td>
                    </tr>
                {-/foreach}
                </tbody>
            </table>
        </div>
    </div>
    <div class="col-lg-2">
        <div class="panel panel-default">
            <div class="panel-heading">
                <i class="fa fa-filter"></i>&nbsp;{-"Filter the list"|translate}
            </div>
            <ul class="list-group">
                <li class="list-group-item">
                    <label class="checkbox">
                        <input type="checkbox" class="userlist-filter" value="1">&nbsp;{-"Active Users"|translate}
                    </label>
                </li>
                <li class="list-group-item">
                    <label class="checkbox">
                        <input type="checkbox" class="userlist-filter" value="0">&nbsp;{-"Not verified Users"|translate}
                    </label>
                </li>
                <li class="list-group-item">
                    <label class="checkbox">
                        <input type="checkbox" class="userlist-filter" value="2">&nbsp;{-"Administrators"|translate}
                    </label>
                </li>
            </ul>
            <div class="panel-footer">
                <button class="btn btn-block btn-primary" onclick="applyFilter();">{-"Apply filter"|translate}</button>
            </div>
        </div>
    </div>
</div>
<div class="modal fade" id="addusermodal" tabindex="-1" role="dialog" aria-labelledby="addusermodal" aria-hidden="true">
    <form class="login-form form-horizontal ajaxform" action="{-"index.php?m=admin&action=save"|URL}"
          style="margin:10px;" name="users">
        <input type="hidden" name="action" value="save"><commit_msg>CU-48 Filter for 'Active Users' and 'Administrators' are wrong<commit_after><div class="row">
    <div class="col-lg-12">
        <h1 class="page-header">{-"Userlist"|translate}
            <button class="btn btn-primary pull-right" data-toggle="modal" data-target="#addusermodal"><i
                        class="fa fa-plus"></i>&nbsp;{-"Add User"|translate}</button>
        </h1>
        <ol class="breadcrumb">
            <li><a href="{-"core.siteurl"|setting}admin"><i class="fa fa-home"></i></a></li>
            <li class="active">{-"Userlist"|translate}</li>
        </ol>
    </div>
</div>
<div class="row">
    <div class="col-lg-10">
        <div class="panel panel-default">
            {-*<div class="panel-body">
            <form class="form-inline" role="form">
            <div class="form-group">
            <label for="usertable-searchfield">{-"Search by name"|translate}</label>
            <input type="email" class="form-control" id="usertable-searchfield" placeholder="{-"Search"|translate}">
                        </div>
                        </form>
                        </div>*}
            <table class="table-striped table">
                <thead>
                <tr>
                    <th>#</th>
                    <th>{-"Name"|translate}</th>
                    <th>{-"E-Mail"|translate}</th>
                    <th>{-"Registered"|translate}</th>
                    <th>{-"Last Action"|translate}</th>
                    <th>{-"Status"|translate}</th>
                    <th>{-"Actions"|translate}</th>
                </tr>
                </thead>
                <tbody id="usertable">
                {-foreach $users AS $i => $userItem}
                    <tr class="user-{-$userItem.groupid}">
                        <td>{-$i+1}</td>
                        <td><a href="{-"index.php?m=profile&action="|URL}{-$userItem.username}" target="_blank">{-$userItem.name}</a>
                        </td>
                        <td>{-$userItem.email}</td>
                        <td>{-$userItem.registered}</td>
                        <td>{-$userItem.lastAction}</td>
                        <td>
                            {-if $userItem.groupid eq 1}
                                <span class="label label-success">{-"Active"|translate}</span>
                            {-elseif $userItem.groupid eq 0}
                                <label class="label label-default">{-"Not verified"|translate}</label>
                            {-elseif $userItem.groupid eq 2}
                                <label class="label label-warning">{-"Administrator"|translate}</label>
                            {-elseif $userItem.groupid eq 3}
                                <label class="label label-info">{-"Cunity-Owner"|translate}</label>
                            {-elseif $userItem.groupid eq 4}
                                <label class="label label-danger">{-"Blocked"|translate}</label>
                            {-/if}
                        </td>
                        <td>
                            <div class="btn-group btn-group-sm">
                                <button type="button"
                                        class="btn btn-primary dropdown-toggle" {-if $user.userid eq $userItem.userid || $userItem.groupid eq 3} disabled{-/if}
                                        data-toggle="dropdown">{-"Actions"|translate}&nbsp;<span class="caret"></span>
                                </button>
                                <ul class="dropdown-menu" role="menu">
                                    <li><a href="javascript: changeUserStatus(null, {-$userItem.userid});"><i
                                                    class="fa fa-trash-o"></i>&nbsp;{-"Delete this user"|translate}</a>
                                    </li>
                                    {-if $user.groupid <= 3 and $userItem.groupid != 4}
                                    <li><a href="javascript: changeUserStatus(4, {-$userItem.userid});"><i
                                                    class="fa fa-ban"></i>&nbsp;{-"Block this user"|translate}</a></li>
                                    {-/if}
                                    {-if $user.groupid <= 3 and $userItem.groupid == 4}
                                        <li><a href="javascript: changeUserStatus(1, {-$userItem.userid});"><i
                                                        class="fa fa-check"></i>&nbsp;{-"Activate this user"|translate}
                                            </a></li>
                                    {-/if}
                                    {-if $userItem.groupid <= 2}
                                        <li class="divider"></li>
                                        {-if $userItem.groupid eq 1}
                                            <li><a href="javascript: changeUserStatus(2, {-$userItem.userid});"><i
                                                            class="fa fa-wrench"></i>&nbsp;{-"Make Administrator"|translate}
                                                </a></li>
                                        {-elseif $userItem.groupid eq 2}
                                            <li><a href="javascript: changeUserStatus(1, {-$userItem.userid});"><i
                                                            class="fa fa-ban"></i>&nbsp;{-"Remove Administrator"|translate}
                                                </a></li>
                                        {-/if}
                                    {-/if}
                                </ul>
                            </div>
                        </td>
                    </tr>
                {-/foreach}
                </tbody>
            </table>
        </div>
    </div>
    <div class="col-lg-2">
        <div class="panel panel-default">
            <div class="panel-heading">
                <i class="fa fa-filter"></i>&nbsp;{-"Filter the list"|translate}
            </div>
            <ul class="list-group">
                <li class="list-group-item">
                    <label class="checkbox">
                        <input type="checkbox" class="userlist-filter" value="1">&nbsp;{-"Active Users"|translate}
                    </label>
                </li>
                <li class="list-group-item">
                    <label class="checkbox">
                        <input type="checkbox" class="userlist-filter" value="0">&nbsp;{-"Not verified Users"|translate}
                    </label>
                </li>
                <li class="list-group-item">
                    <label class="checkbox">
                        <input type="checkbox" class="userlist-filter" value="2">&nbsp;{-"Administrators"|translate}
                    </label>
                </li>
                <li class="list-group-item">
                    <label class="checkbox">
                        <input type="checkbox" class="userlist-filter" value="3">&nbsp;{-"Cunity Owner"|translate}
                    </label>
                </li>
                <li class="list-group-item">
                    <label class="checkbox">
                        <input type="checkbox" class="userlist-filter" value="4">&nbsp;{-"Blocked Users"|translate}
                    </label>
                </li>
            </ul>
            <div class="panel-footer">
                <button class="btn btn-block btn-primary" onclick="applyFilter();">{-"Apply filter"|translate}</button>
            </div>
        </div>
    </div>
</div>
<div class="modal fade" id="addusermodal" tabindex="-1" role="dialog" aria-labelledby="addusermodal" aria-hidden="true">
    <form class="login-form form-horizontal ajaxform" action="{-"index.php?m=admin&action=save"|URL}"
          style="margin:10px;" name="users">
        <input type="hidden" name="action" value="save">
{'fraction_non_alphanumeric': 0.15503620803159973, 'fraction_numerical': 0.0043449637919684, 'mean_word_length': 1.1353668822041045, 'pattern_counts': {'":': 0, '<': 333, '<?xml version=': 0, '>': 329, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 84, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6069203', 'n_tokens_mistral': 3888, 'n_tokens_neox': 3592, 'n_words': 643}