<commit_before><?php
    $this->pageEnv([
        'layout'    => [
            'blankPage' => false,
            'needRight' => false
        ],
        'pageId'    => 10,
        'pageTitle' => '',
        'args'      => [
            'BRAND_CATNAME' => $this->brand['catname'],
            'BRAND_NAME'    => $this->brand['name'],
        ]
    ]);
?>

<header class="mb-4">
    <div class="jumbotron brand-hero-unit">
        <?=$this->img($this->brand['logo_id'], [
            'format' => 'logo',
            'alt'    => sprintf($this->translate('catalogue/brand/logo-of-%s'), $this->brand['name']),
            'class'  => 'logo'
        ])?>
        <div class="content">
            <?php /* if ($this->brandLanguage) { ?>
                <h1><?=$this->escapeHtml($this->brandLanguage['name']) ?></h1>
                <p>
                    <?=$this->escapeHtml($this->brand['name']) ?>
                    <?php if ( $this->brand->full_name && ($this->brand->full_name != $this->brand['name']) ) { ?>
                        <small>(<?=$this->escapeHtml($this->brand->full_name)?>)</small>
                    <?php } ?>
                </p>
            <?php } else { */ ?>
                <h1>
                    <?=$this->escapeHtml($this->brand['name']) ?>
                    <?php if ( $this->brand['full_name'] && ($this->brand['full_name'] != $this->brand['name']) ) { ?>
                        <small>(<?=$this->escapeHtml($this->brand['full_name'])?>)</small>
                    <?php } ?>
                </h1>
            <?php /*}*/ ?>
            <?php if ($this->description) { ?>
                <?=$this->markdown($this->description)?>
            <?php } ?>
        </div>
    </div>
    <ul class="nav nav-pills">
        <li class="nav-item">
            <?=$this->htmlA([
                'class' => 'nav-link',
                'href'  => $this->url('catalogue', [
                    'action' => 'cars'
                ], [], true)
            ], '<i class="fa fa-road"></i> ' . $this->escapeHtml($this->translate('catalogue/chronological')), false)?>
        </li>
        <li class="nav-item">
            <?=$this->htmlA([
                'class' => 'nav-link',
                'href'  => $this->url('catalogue', [
                    'action' => 'recent'
                ], [], true)
            ], '<i class="fa fa-th"></i> '. $this->escapeHtml($this->translate('catalogue/brand/new-pictures')), false)?>
        </li>
        <?php if ($this->haveTwins) { ?>
            <li class="nav-item">
                <?=$this->htmlA([
                    'class' => 'nav-link',
                    'href'  => $this->url('twins/brand', [
                        'brand_catname' => $this->brand['catname']
                    ])
                ], '<i class="fa fa-adjust"></i> ' . $this->escapeHtml($this->page(25)->name), false)?>
            </li>
        <?php } ?>
        <?php if ($this->mostsActive) { ?>
            <li class="nav-item">
                <?=$this->htmlA([
                    'class' => 'nav-link',
                    'href'  => $this->url('catalogue', [
                        'action'        => 'brand-mosts',
                        'brand_catname' => $this->brand['catname']
                    ])
                ], '<i class="fa fa-sort-amount-desc"></i> ' . $this->escapeHtml($this->page(21)->name), false)?>
            </li>
        <?php } ?>
        <?php if ($this->inboxPictures) { ?>
            <li class="nav-item">
                <?=$this->htmlA([
                    'class' => 'nav-link',
                    'href'  => '/ng/moder/pictures?' . http_build_query([
                        'status'  => Application\Model\Picture::STATUS_INBOX,
                        'item_id' => $this->brand['id'],
                    ])
                ], '<i class="fa-fw fa fa-th"></i> ' . $this->escapeHtml($this->translate('catalogue/brand/inbox/by-brand')) . ' <span class="badge badge-pill badge-secondary">' . $this->inboxPictures . '</span>', false)?>
            </li>
        <?php } ?>
        <?php if ($this->requireAttention) { ?>
            <li class="nav-item">
                <?=$this->htmlA(
                    [
                        'class' => 'nav-link',
                        'href'  => $this->url('ng', ['path' => 'moder/comments'], [
                            'query' => [
                                'pictures_of_item_id' => $this->brand['id'],
                                'moderator_attention' => '1'
                            ]
                        ])
                    ],
                    '<i class="fa fa-comment"></i> ' .
                        $this->escapeHtml($this->translate('catalogue/vehicle/comments')) .
                        ' <span class="badge badge-pill badge-secondary">'.$this->requireAttention.'</span>',
                    false
                )?>
            </li>
        <?php } ?>
        <?php if ($this->user()->inheritsRole('moder')) { ?>
            <li class="nav-item">
                <?=$this->htmlA(
                    [
                        'class' => 'nav-link',
                        'href'  => '/ng/moder/items/item/' . $this->brand['id']
                    ],
                    '<i class="fa fa-cog"></i> ' . $this->translate('moder/edit-object'),
                    false
                ) ?>
            </li>
        <?php } ?>
    </ul>
</header>

<?php foreach ($this->sections as $section) { ?>
    <?php if (count($section['groups'])) { ?>
        <div class="card mb-4">
            <div class="card-body">
                <?php if ($section['name']) { ?>
                    <h5 class="card-title">
                        <?=$this->escapeHtml($this->translate($section['name']))?>
                    </h5>
                <?php } ?>
                <div class="row">
                    <?php foreach ($section['groups'] as $group) { ?>
                        <?=$this->htmlA(
                            [
                                'href'  => $group['url'],
                                'class' => 'col-4 nav-link'
                            ],
                            $this->escapeHtml($group['name']) . (isset($group['count']) ? ' <span class="badge badge-pill badge-secondary">' . $group['count'] . '</span>' : ''),
                            false
                        ) ?>
                    <?php } ?>
                </div>
                <?php if ($section['name'] && $section['url']) { ?>
                    <?=$this->htmlA($section['url'], $this->translate('carlist/details'))?>
                <?php } ?>
            </div>
        </div>
    <?php } ?>
<?php } ?>

<?php if (count($this->factories)) { ?>
    <section>
        <h2><?=$this->escapeHtml($this->translate('catalogue/brand/factories'))?></h2>
        <div class="row">
            <?php foreach ($this->factories as $factory) { ?><commit_msg>One column models on mobile<commit_after><?php
    $this->pageEnv([
        'layout'    => [
            'blankPage' => false,
            'needRight' => false
        ],
        'pageId'    => 10,
        'pageTitle' => '',
        'args'      => [
            'BRAND_CATNAME' => $this->brand['catname'],
            'BRAND_NAME'    => $this->brand['name'],
        ]
    ]);
?>

<header class="mb-4">
    <div class="jumbotron brand-hero-unit">
        <?=$this->img($this->brand['logo_id'], [
            'format' => 'logo',
            'alt'    => sprintf($this->translate('catalogue/brand/logo-of-%s'), $this->brand['name']),
            'class'  => 'logo'
        ])?>
        <div class="content">
            <?php /* if ($this->brandLanguage) { ?>
                <h1><?=$this->escapeHtml($this->brandLanguage['name']) ?></h1>
                <p>
                    <?=$this->escapeHtml($this->brand['name']) ?>
                    <?php if ( $this->brand->full_name && ($this->brand->full_name != $this->brand['name']) ) { ?>
                        <small>(<?=$this->escapeHtml($this->brand->full_name)?>)</small>
                    <?php } ?>
                </p>
            <?php } else { */ ?>
                <h1>
                    <?=$this->escapeHtml($this->brand['name']) ?>
                    <?php if ( $this->brand['full_name'] && ($this->brand['full_name'] != $this->brand['name']) ) { ?>
                        <small>(<?=$this->escapeHtml($this->brand['full_name'])?>)</small>
                    <?php } ?>
                </h1>
            <?php /*}*/ ?>
            <?php if ($this->description) { ?>
                <?=$this->markdown($this->description)?>
            <?php } ?>
        </div>
    </div>
    <ul class="nav nav-pills">
        <li class="nav-item">
            <?=$this->htmlA([
                'class' => 'nav-link',
                'href'  => $this->url('catalogue', [
                    'action' => 'cars'
                ], [], true)
            ], '<i class="fa fa-road"></i> ' . $this->escapeHtml($this->translate('catalogue/chronological')), false)?>
        </li>
        <li class="nav-item">
            <?=$this->htmlA([
                'class' => 'nav-link',
                'href'  => $this->url('catalogue', [
                    'action' => 'recent'
                ], [], true)
            ], '<i class="fa fa-th"></i> '. $this->escapeHtml($this->translate('catalogue/brand/new-pictures')), false)?>
        </li>
        <?php if ($this->haveTwins) { ?>
            <li class="nav-item">
                <?=$this->htmlA([
                    'class' => 'nav-link',
                    'href'  => $this->url('twins/brand', [
                        'brand_catname' => $this->brand['catname']
                    ])
                ], '<i class="fa fa-adjust"></i> ' . $this->escapeHtml($this->page(25)->name), false)?>
            </li>
        <?php } ?>
        <?php if ($this->mostsActive) { ?>
            <li class="nav-item">
                <?=$this->htmlA([
                    'class' => 'nav-link',
                    'href'  => $this->url('catalogue', [
                        'action'        => 'brand-mosts',
                        'brand_catname' => $this->brand['catname']
                    ])
                ], '<i class="fa fa-sort-amount-desc"></i> ' . $this->escapeHtml($this->page(21)->name), false)?>
            </li>
        <?php } ?>
        <?php if ($this->inboxPictures) { ?>
            <li class="nav-item">
                <?=$this->htmlA([
                    'class' => 'nav-link',
                    'href'  => '/ng/moder/pictures?' . http_build_query([
                        'status'  => Application\Model\Picture::STATUS_INBOX,
                        'item_id' => $this->brand['id'],
                    ])
                ], '<i class="fa-fw fa fa-th"></i> ' . $this->escapeHtml($this->translate('catalogue/brand/inbox/by-brand')) . ' <span class="badge badge-pill badge-secondary">' . $this->inboxPictures . '</span>', false)?>
            </li>
        <?php } ?>
        <?php if ($this->requireAttention) { ?>
            <li class="nav-item">
                <?=$this->htmlA(
                    [
                        'class' => 'nav-link',
                        'href'  => $this->url('ng', ['path' => 'moder/comments'], [
                            'query' => [
                                'pictures_of_item_id' => $this->brand['id'],
                                'moderator_attention' => '1'
                            ]
                        ])
                    ],
                    '<i class="fa fa-comment"></i> ' .
                        $this->escapeHtml($this->translate('catalogue/vehicle/comments')) .
                        ' <span class="badge badge-pill badge-secondary">'.$this->requireAttention.'</span>',
                    false
                )?>
            </li>
        <?php } ?>
        <?php if ($this->user()->inheritsRole('moder')) { ?>
            <li class="nav-item">
                <?=$this->htmlA(
                    [
                        'class' => 'nav-link',
                        'href'  => '/ng/moder/items/item/' . $this->brand['id']
                    ],
                    '<i class="fa fa-cog"></i> ' . $this->translate('moder/edit-object'),
                    false
                ) ?>
            </li>
        <?php } ?>
    </ul>
</header>

<?php foreach ($this->sections as $section) { ?>
    <?php if (count($section['groups'])) { ?>
        <div class="card mb-4">
            <div class="card-body">
                <?php if ($section['name']) { ?>
                    <h5 class="card-title">
                        <?=$this->escapeHtml($this->translate($section['name']))?>
                    </h5>
                <?php } ?>
                <div class="row">
                    <?php foreach ($section['groups'] as $group) { ?>
                        <?=$this->htmlA(
                            [
                                'href'  => $group['url'],
                                'class' => 'col-12 col-md-6 col-lg-4 nav-link'
                            ],
                            $this->escapeHtml($group['name']) . (isset($group['count']) ? ' <span class="badge badge-pill badge-secondary">' . $group['count'] . '</span>' : ''),
                            false
                        ) ?>
                    <?php } ?>
                </div>
                <?php if ($section['name'] && $section['url']) { ?>
                    <?=$this->htmlA($section['url'], $this->translate('carlist/details'))?>
                <?php } ?>
            </div>
        </div>
    <?php } ?>
<?php } ?>

<?php if (count($this->factories)) { ?>
    <section>
        <h2><?=$this->escapeHtml($this->translate('catalogue/brand/factories'))?></h2>
        <div class="row">
            <?php foreach ($this->factories as $factory) { ?>
{'fraction_non_alphanumeric': 0.20849253838944562, 'fraction_numerical': 0.0028116213683223993, 'mean_word_length': 1.2567105905319669, 'pattern_counts': {'":': 0, '<': 231, '<?xml version=': 0, '>': 469, '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': '824868', 'n_tokens_mistral': 4016, 'n_tokens_neox': 3832, 'n_words': 576}