<commit_before><?php
/**
* Tatoeba Project, free collaborative creation of multilingual corpuses project
* Copyright (C) 2009  <NAME> <<EMAIL>>
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with this program.  If not, see <http://www.gnu.org/licenses/>.
*
* PHP version 5
*
* @category PHP
* @package  Tatoeba
* @author   <NAME> <<EMAIL>>
* @license  Affero General Public License
* @link     http://tatoeba.org
*/

/**
* Page that lists all the members who know a certain language.
*
* @category Users
* @package  Views
* @author   <NAME> <<EMAIL>>
* @license  Affero General Public License
* @link     http://tatoeba.org
*/
?>

<div id="annexe_content">
    <div class="module">
        <h2><?php __('Languages'); ?></h2>

        <p>
        <?php
        echo $html->link(
            __('Back to global stats', true),
            array(
                'controller' => 'stats',
                'action' => 'users_languages'
            )
        );
        ?>
        </p>

        <table class="usersLanguagesStats">
        <?php
        foreach($usersLanguages as $language) {
            $langCode = $language['UsersLanguages']['language_code'];
            $langName = $html->link(
                $languages->codeToNameAlone($langCode),
                array(
                    'controller' => 'users',
                    'action' => 'for_language',
                    $langCode
                )
            );
            $total = $language[0]['total'];
            $numberOfMembers = format(
                __n('{total} member', '{total} members', $total, true),
                array('total' => $total)
            );
            $selected = '';
            if ($lang == $langCode) {
                $selected = 'selected';
            }

            echo '<tr class="'.$selected.'">';
            echo $html->tag('td', $languages->icon($langCode, array()));
            echo $html->tag('td', $langName);
            echo $html->tag('td', $numberOfMembers);
            echo '</tr>';
        }
        ?>
        </table>
    </div>
</div>


<div id="main_content">
    <div class="module">
        <?php
        $total = $paginator->counter("%count%");
        $title = format(
            __n('{lang} ({total} member)', '{lang} ({total} members)', $total, true),
            array('lang' => $languages->codeToNameAlone($lang), 'total' => $total)
        );
        ?>
        <h2><?php echo $title; ?></h2>
        <div class="usersLanguages">
        <?php
        $pagination->display();

        foreach($users as $user) {
            $username = $user['User']['username'];
            $userImage = $user['User']['image'];
            $languageLevel = $user['UsersLanguages']['level'];

            echo '<div class="user">';
            echo '<div class="profilePicture">';
                $members->image($username, $userImage);
            echo '</div>';
            echo '<div class="usernameAndLevel">';
                echo $html->link(
                    $username,
                    array(
                        'controller' => 'user',
                        'action' => 'profile',
                        $username
                    )
                );
                echo $members->displayLanguageLevel($languageLevel);
            echo '</div>';
            echo '</div>';
        }

        $pagination->display();
        ?>
        </div>
    </div>
</div><commit_msg>#645 Missing param in pagination->display().<commit_after><?php
/**
* Tatoeba Project, free collaborative creation of multilingual corpuses project
* Copyright (C) 2009  <NAME> <<EMAIL>>
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with this program.  If not, see <http://www.gnu.org/licenses/>.
*
* PHP version 5
*
* @category PHP
* @package  Tatoeba
* @author   <NAME> <<EMAIL>>
* @license  Affero General Public License
* @link     http://tatoeba.org
*/

/**
* Page that lists all the members who know a certain language.
*
* @category Users
* @package  Views
* @author   <NAME> <<EMAIL>>
* @license  Affero General Public License
* @link     http://tatoeba.org
*/
?>

<div id="annexe_content">
    <div class="module">
        <h2><?php __('Languages'); ?></h2>

        <p>
        <?php
        echo $html->link(
            __('Back to global stats', true),
            array(
                'controller' => 'stats',
                'action' => 'users_languages'
            )
        );
        ?>
        </p>

        <table class="usersLanguagesStats">
        <?php
        foreach($usersLanguages as $language) {
            $langCode = $language['UsersLanguages']['language_code'];
            $langName = $html->link(
                $languages->codeToNameAlone($langCode),
                array(
                    'controller' => 'users',
                    'action' => 'for_language',
                    $langCode
                )
            );
            $total = $language[0]['total'];
            $numberOfMembers = format(
                __n('{total} member', '{total} members', $total, true),
                array('total' => $total)
            );
            $selected = '';
            if ($lang == $langCode) {
                $selected = 'selected';
            }

            echo '<tr class="'.$selected.'">';
            echo $html->tag('td', $languages->icon($langCode, array()));
            echo $html->tag('td', $langName);
            echo $html->tag('td', $numberOfMembers);
            echo '</tr>';
        }
        ?>
        </table>
    </div>
</div>


<div id="main_content">
    <div class="module">
        <?php
        $total = $paginator->counter("%count%");
        $title = format(
            __n('{lang} ({total} member)', '{lang} ({total} members)', $total, true),
            array('lang' => $languages->codeToNameAlone($lang), 'total' => $total)
        );
        ?>
        <h2><?php echo $title; ?></h2>
        <div class="usersLanguages">
        <?php
        $pagination->display(array($lang));

        foreach($users as $user) {
            $username = $user['User']['username'];
            $userImage = $user['User']['image'];
            $languageLevel = $user['UsersLanguages']['level'];

            echo '<div class="user">';
            echo '<div class="profilePicture">';
                $members->image($username, $userImage);
            echo '</div>';
            echo '<div class="usernameAndLevel">';
                echo $html->link(
                    $username,
                    array(
                        'controller' => 'user',
                        'action' => 'profile',
                        $username
                    )
                );
                echo $members->displayLanguageLevel($languageLevel);
            echo '</div>';
            echo '</div>';
        }

        $pagination->display(array($lang));
        ?>
        </div>
    </div>
</div>
{'fraction_non_alphanumeric': 0.1488162344983089, 'fraction_numerical': 0.0031316547663785546, 'mean_word_length': 1.8221986567691764, 'pattern_counts': {'":': 0, '<': 89, '<?xml version=': 0, '>': 136, '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': '4205812', 'n_tokens_mistral': 2188, 'n_tokens_neox': 2108, 'n_words': 611}