<commit_before>[% INCLUDE 'admin/header.html' title=loc('Search Users') %]
[% PROCESS 'admin/report_blocks.html' %]

<div class="fms-admin-info">
    [% loc("User search finds matches in users' names and email addresses.") %]
</div>
<form method="get" action="[% c.uri_for('users') %]" enctype="application/x-www-form-urlencoded" accept-charset="utf-8">
    <p><label for="search">[% loc('Search:') %]</label>
        <input class="form-control" type="text" name="search"  size="30" id="search" value="[% searched | html %]">
</form>

[% IF users.size %]

<table cellspacing="0" cellpadding="2" border="1">
    <tr>
        <th>[% loc('Name') %]</th>
        <th>[% loc('Email') %]</th>
        <th>[% loc('Body') %]</th>
      [% IF c.cobrand.moniker != 'zurich' %]
        <th>[% loc('Flagged') %]</th>
      [% END %]
        <th>*</th>
    </tr>
[%- FOREACH user IN users %]
    <tr>
        <td>[% PROCESS value_or_nbsp value=user.name %]</td> 
        <td><a href="[% c.uri_for( 'reports', search => user.email ) %]">[% PROCESS value_or_nbsp value=user.email %]</a></td> 
        <td>[% PROCESS value_or_nbsp value=user.from_body.name %]
            [% IF NOT user.is_superuser AND user.has_body_permission_to('moderate') %] * [% END %]
        </td>
      [% IF c.cobrand.moniker != 'zurich' %]
        <td>[% user.flagged == 2 ? loc('(Email in abuse table)') : user.flagged ? loc('Yes') : '&nbsp;' %]</td>
      [% END %]
        <td>[% IF user.id %]<a href="[% c.uri_for( 'user_edit', user.id ) %]">[% loc('Edit') %]</a>[% END %]</td>
    </tr>
[%- END -%]
</table>

[% ELSIF searched %]

<div class="fms-admin-warning">
    [% loc("Searching found no users.") %]
</div>

[% END %]

[% IF NOT searched %]
<h2>[% loc('Add user') %]</h2>
[% INCLUDE 'admin/user-form.html', user = '' %]
[% END %]

[% INCLUDE 'admin/footer.html' %]
<commit_msg>Use ‘*’ on admin page to signify superuser.<commit_after>[% INCLUDE 'admin/header.html' title=loc('Search Users') %]
[% PROCESS 'admin/report_blocks.html' %]

<div class="fms-admin-info">
    [% loc("User search finds matches in users' names and email addresses.") %]
</div>
<form method="get" action="[% c.uri_for('users') %]" enctype="application/x-www-form-urlencoded" accept-charset="utf-8">
    <p><label for="search">[% loc('Search:') %]</label>
        <input class="form-control" type="text" name="search"  size="30" id="search" value="[% searched | html %]">
</form>

[% IF users.size %]

<table cellspacing="0" cellpadding="2" border="1">
    <tr>
        <th>[% loc('Name') %]</th>
        <th>[% loc('Email') %]</th>
        <th>[% loc('Body') %]</th>
      [% IF c.cobrand.moniker != 'zurich' %]
        <th>[% loc('Flagged') %]</th>
      [% END %]
        <th>*</th>
    </tr>
[%- FOREACH user IN users %]
    <tr>
        <td>[% PROCESS value_or_nbsp value=user.name %]</td> 
        <td><a href="[% c.uri_for( 'reports', search => user.email ) %]">[% PROCESS value_or_nbsp value=user.email %]</a></td> 
        <td>[% PROCESS value_or_nbsp value=user.from_body.name %]
            [% IF user.is_superuser %] * [% END %]
        </td>
      [% IF c.cobrand.moniker != 'zurich' %]
        <td>[% user.flagged == 2 ? loc('(Email in abuse table)') : user.flagged ? loc('Yes') : '&nbsp;' %]</td>
      [% END %]
        <td>[% IF user.id %]<a href="[% c.uri_for( 'user_edit', user.id ) %]">[% loc('Edit') %]</a>[% END %]</td>
    </tr>
[%- END -%]
</table>

[% ELSIF searched %]

<div class="fms-admin-warning">
    [% loc("Searching found no users.") %]
</div>

[% END %]

[% IF NOT searched %]
<h2>[% loc('Add user') %]</h2>
[% INCLUDE 'admin/user-form.html', user = '' %]
[% END %]

[% INCLUDE 'admin/footer.html' %]

{'fraction_non_alphanumeric': 0.24850624660510592, 'fraction_numerical': 0.004888647474198805, 'mean_word_length': 3.161581920903955, 'pattern_counts': {'":': 0, '<': 87, '<?xml version=': 0, '>': 89, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, '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': '6628467', 'n_tokens_mistral': 1504, 'n_tokens_neox': 1451, 'n_words': 301}