<commit_before><div class="organisations index">
<?php
    $texts = array(
            'all' => array(
                    'text' => __('All organisations'),
                    'extra' => __(', both local and remote')
            ),
            'external' => array(
                    'text' => __('Known remote organisations'),
                    'extra' => __(' on other instances')
            ),
            'local' => array(
                    'text' => __('Local organisations'),
                    'extra' => __(' having a presence on this instance')
            ),
    );
    if (!in_array($scope, array_keys($texts))) $scope = 'local';
    $partial = array();
    foreach($named as $key => $value):
        if ($key == 'page' || $key == 'viewall'):
            continue;
        endif;
        $partial[] = h($key) . ':' . h($value);
    endforeach;
    $viewall_button_text = __('Paginate');
    if (!$viewall):
        $viewall_button_text = __('View all');
        $partial[] = 'viewall:1';
    endif;
?>
    <h2><?php echo $texts[$scope]['text'] . $texts[$scope]['extra']; ?></h2>
    <div class="pagination">
        <ul>
            <?php
                $this->Paginator->options(array(
                        'update' => '.span12',
                        'evalScripts' => true,
                        'before' => '$(".progress").show()',
                        'complete' => '$(".progress").hide()',
                ));

                echo $this->Paginator->prev('&laquo; ' . __('previous'), array('tag' => 'li', 'escape' => false), null, array('tag' => 'li', 'class' => 'prev disabled', 'escape' => false, 'disabledTag' => 'span'));
                echo $this->Paginator->numbers(array('modulus' => 20, 'separator' => '', 'tag' => 'li', 'currentClass' => 'active', 'currentTag' => 'span'));
                echo $this->Paginator->next(__('next') . ' &raquo;', array('tag' => 'li', 'escape' => false), null, array('tag' => 'li', 'class' => 'next disabled', 'escape' => false, 'disabledTag' => 'span'));
            ?>
            <li class="all">
                <a href="<?php echo $baseurl . '/organisations/index/' . implode('/', $partial); ?>"><?php echo $viewall_button_text; ?></a>
            </li>
        </ul>
    </div>
    <?php
        $data = array(
            'children' => array(
                array(
                    'children' => array(
                        array(
                            'text' => __('Local organisations'),
                            'active' => $scope === 'local',
                            'url' => $baseurl . '/organisations/index/scope:local'
                        ),
                        array(
                            'text' => __('Known remote organisations'),
                            'active' => $scope === 'external',
                            'url' => $baseurl . '/organisations/index/scope:external'
                        ),
                        array(
                            'text' => __('All organisations'),
                            'active' => $scope === 'all',
                            'url' => $baseurl . '/organisations/index/scope:all'
                        ),
                    )
                ),
                array(
                    'type' => 'search',
                    'button' => __('Filter'),
                    'placeholder' => __('Enter value to search'),
                    'data' => '',
                )
            )
        );
        echo $this->element('/genericElements/ListTopBar/scaffold', array('data' => $data));
    ?>
    <table class="table table-striped table-hover table-condensed">
    <tr>
            <th><?php echo $this->Paginator->sort('id');?></th>
            <th><?php echo __('Logo');?></th>
            <th><?php echo $this->Paginator->sort('name');?></th>
            <?php if ($isSiteAdmin): ?>
                <th><?php echo $this->Paginator->sort('uuid', 'UUID');?></th>
            <?php endif; ?>
            <th><?php echo $this->Paginator->sort('description');?></th>
            <th><?php echo $this->Paginator->sort('nationality');?></th>
            <th><?php echo $this->Paginator->sort('sector');?></th>
            <th><?php echo $this->Paginator->sort('type');?></th>
            <th><?php echo $this->Paginator->sort('contacts');?></th>
            <?php if ($isSiteAdmin): ?>
                <th><?php echo __('Added by');?></th>
            <?php endif; ?>
            <th><?php echo $this->Paginator->sort('local');?></th>
            <th>Users</th>
            <th><?php echo $this->Paginator->sort('restrictions');?></th>
            <th class="actions"><?php echo __('Actions');?></th>
    </tr>
    <?php
foreach ($orgs as $org): ?>
    <tr>
        <td class="short" ondblclick="document.location.href ='<?php echo $baseurl . "/organisations/view/" . $org['Organisation']['id'];?>'"><?php echo h($org['Organisation']['id']); ?></td>
        <td class="short" ondblclick="document.location.href ='<?php echo $baseurl . "/organisations/view/" . $org['Organisation']['id'];?>'">
            <?php
                echo $this->OrgImg->getOrgImg(array('name' => $org['Organisation']['name'], 'id' => $org['Organisation']['id'], 'size' => 24));
            ?>
        </td>
        <td class="short" ondblclick="document.location.href ='<?php echo $baseurl . "/organisations/view/" . $org['Organisation']['id'];?>'"><?php echo h($org['Organisation']['name']); ?></td>
        <?php if ($isSiteAdmin): ?>
            <td class="short" ondblclick="document.location.href ='<?php echo $baseurl . "/organisations/view/" . $org['Organisation']['id'];?>'"><?php echo h($org['Organisation']['uuid']); ?></td>
        <?php endif; ?>
        <td ondblclick="document.location.href ='<?php echo $baseurl . "/organisations/view/" . $org['Organisation']['id'];?>'"><?php echo h($org['Organisation']['description']); ?></td>
        <td class="short" ondblclick="document.location.href ='<?php echo $baseurl . "/organisations/view/" . $org['Organisation']['id'];?>'"><?php echo h($org['Organisation']['nationality']); ?></td>
        <td class="short" ondblclick="document.location.href ='<?php echo $baseurl . "/organisations/view/" . $org['Organisation']['id'];?>'"><?php echo h($org['Organisation']['sector']); ?></td>
        <td class="short" ondblclick="document.location.href ='<?php echo $baseurl . "/organisations/view/" . $org['Organisation']['id'];?>'"><?php echo h($org['Organisation']['type']); ?></td>
        <td><?php echo h($org['Organisation']['contacts']); ?></td>
        <?php if ($isSiteAdmin): ?>
            <td class="short" ondblclick="document.location.href ='<?php echo $baseurl . "/organisations/view/" . $org['Organisation']['id'];?>'">
                <?php echo (isset($org['Organisation']['created_by_email'])) ? h($org['Organisation']['created_by_email']) : '&nbsp;'; ?><commit_msg>chg: [UI] Allow quickSelect organisation UUID<commit_after><div class="organisations index">
<?php
    $texts = array(
            'all' => array(
                    'text' => __('All organisations'),
                    'extra' => __(', both local and remote')
            ),
            'external' => array(
                    'text' => __('Known remote organisations'),
                    'extra' => __(' on other instances')
            ),
            'local' => array(
                    'text' => __('Local organisations'),
                    'extra' => __(' having a presence on this instance')
            ),
    );
    if (!in_array($scope, array_keys($texts))) $scope = 'local';
    $partial = array();
    foreach($named as $key => $value):
        if ($key == 'page' || $key == 'viewall'):
            continue;
        endif;
        $partial[] = h($key) . ':' . h($value);
    endforeach;
    $viewall_button_text = __('Paginate');
    if (!$viewall):
        $viewall_button_text = __('View all');
        $partial[] = 'viewall:1';
    endif;
?>
    <h2><?php echo $texts[$scope]['text'] . $texts[$scope]['extra']; ?></h2>
    <div class="pagination">
        <ul>
            <?php
                $this->Paginator->options(array(
                        'update' => '.span12',
                        'evalScripts' => true,
                        'before' => '$(".progress").show()',
                        'complete' => '$(".progress").hide()',
                ));

                echo $this->Paginator->prev('&laquo; ' . __('previous'), array('tag' => 'li', 'escape' => false), null, array('tag' => 'li', 'class' => 'prev disabled', 'escape' => false, 'disabledTag' => 'span'));
                echo $this->Paginator->numbers(array('modulus' => 20, 'separator' => '', 'tag' => 'li', 'currentClass' => 'active', 'currentTag' => 'span'));
                echo $this->Paginator->next(__('next') . ' &raquo;', array('tag' => 'li', 'escape' => false), null, array('tag' => 'li', 'class' => 'next disabled', 'escape' => false, 'disabledTag' => 'span'));
            ?>
            <li class="all">
                <a href="<?php echo $baseurl . '/organisations/index/' . implode('/', $partial); ?>"><?php echo $viewall_button_text; ?></a>
            </li>
        </ul>
    </div>
    <?php
        $data = array(
            'children' => array(
                array(
                    'children' => array(
                        array(
                            'text' => __('Local organisations'),
                            'active' => $scope === 'local',
                            'url' => $baseurl . '/organisations/index/scope:local'
                        ),
                        array(
                            'text' => __('Known remote organisations'),
                            'active' => $scope === 'external',
                            'url' => $baseurl . '/organisations/index/scope:external'
                        ),
                        array(
                            'text' => __('All organisations'),
                            'active' => $scope === 'all',
                            'url' => $baseurl . '/organisations/index/scope:all'
                        ),
                    )
                ),
                array(
                    'type' => 'search',
                    'button' => __('Filter'),
                    'placeholder' => __('Enter value to search'),
                    'data' => '',
                )
            )
        );
        echo $this->element('/genericElements/ListTopBar/scaffold', array('data' => $data));
    ?>
    <table class="table table-striped table-hover table-condensed">
    <tr>
            <th><?php echo $this->Paginator->sort('id');?></th>
            <th><?php echo __('Logo');?></th>
            <th><?php echo $this->Paginator->sort('name');?></th>
            <?php if ($isSiteAdmin): ?>
                <th><?php echo $this->Paginator->sort('uuid', 'UUID');?></th>
            <?php endif; ?>
            <th><?php echo $this->Paginator->sort('description');?></th>
            <th><?php echo $this->Paginator->sort('nationality');?></th>
            <th><?php echo $this->Paginator->sort('sector');?></th>
            <th><?php echo $this->Paginator->sort('type');?></th>
            <th><?php echo $this->Paginator->sort('contacts');?></th>
            <?php if ($isSiteAdmin): ?>
                <th><?php echo __('Added by');?></th>
            <?php endif; ?>
            <th><?php echo $this->Paginator->sort('local');?></th>
            <th>Users</th>
            <th><?php echo $this->Paginator->sort('restrictions');?></th>
            <th class="actions"><?php echo __('Actions');?></th>
    </tr>
    <?php
foreach ($orgs as $org): ?>
    <tr>
        <td class="short" ondblclick="document.location.href ='<?php echo $baseurl . "/organisations/view/" . $org['Organisation']['id'];?>'"><?php echo h($org['Organisation']['id']); ?></td>
        <td class="short" ondblclick="document.location.href ='<?php echo $baseurl . "/organisations/view/" . $org['Organisation']['id'];?>'">
            <?php
                echo $this->OrgImg->getOrgImg(array('name' => $org['Organisation']['name'], 'id' => $org['Organisation']['id'], 'size' => 24));
            ?>
        </td>
        <td class="short" ondblclick="document.location.href ='<?php echo $baseurl . "/organisations/view/" . $org['Organisation']['id'];?>'"><?php echo h($org['Organisation']['name']); ?></td>
        <?php if ($isSiteAdmin): ?>
        <td class="short" ondblclick="document.location.href ='<?php echo $baseurl . "/organisations/view/" . $org['Organisation']['id'];?>'">
            <span class="quickSelect"><?php echo h($org['Organisation']['uuid']); ?></span>
        </td>
        <?php endif; ?>
        <td ondblclick="document.location.href ='<?php echo $baseurl . "/organisations/view/" . $org['Organisation']['id'];?>'"><?php echo h($org['Organisation']['description']); ?></td>
        <td class="short" ondblclick="document.location.href ='<?php echo $baseurl . "/organisations/view/" . $org['Organisation']['id'];?>'"><?php echo h($org['Organisation']['nationality']); ?></td>
        <td class="short" ondblclick="document.location.href ='<?php echo $baseurl . "/organisations/view/" . $org['Organisation']['id'];?>'"><?php echo h($org['Organisation']['sector']); ?></td>
        <td class="short" ondblclick="document.location.href ='<?php echo $baseurl . "/organisations/view/" . $org['Organisation']['id'];?>'"><?php echo h($org['Organisation']['type']); ?></td>
        <td><?php echo h($org['Organisation']['contacts']); ?></td>
        <?php if ($isSiteAdmin): ?>
            <td class="short" ondblclick="document.location.href ='<?php echo $baseurl . "/organisations/view/" . $org['Organisation']['id'];?>'">
                <?php echo (isset($org['Organisation']['created_by_email'])) ? h($org['Organisation']['created_by_email']) : '&nbsp;'; ?>
{'fraction_non_alphanumeric': 0.2209344179684688, 'fraction_numerical': 0.0012958030379382334, 'mean_word_length': 2.035839160839161, 'pattern_counts': {'":': 0, '<': 221, '<?xml version=': 0, '>': 383, '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': '3807967', 'n_tokens_mistral': 4011, 'n_tokens_neox': 3971, 'n_words': 780}