<div class="control-group">
    <label class="control-label"><?= $this->lang->line('Page name in admin panel') ?>*</label>
    <div class="controls">
        <input type="text" name="page_data[admin_name]" value="<?= $item['admin_name'] ?>" required="required">
    </div>
</div>
<div class="control-group">
    <label class="control-label">
        <?= $this->lang->line('Page alias') ?>*
        <?= $this->load->library('rtgrid/rtgrid_tooltip')->render_tooltip('admin_name', $this->lang->line('Page alias'), $this->lang->line('This field specifies the URL to the page. <br />For example, if you write `my_page` then page will be available at `http://mydomain.com/my_page`')) ?>
    </label>
    <div class="controls">
        <input type="text" name="page_data[alias]" value="<?= $item['alias'] ?>" required="required">
        <?php if (!empty($item['alias'])) : ?>
        <?php $link = $this->load->library('ciext/parser/parser_page_url')->parse($item['alias']); ?>
        <div><a href="<?= $link ?>" target="_blank"><?= $link ?></a></div>
        <?php endif ?>
    </div>
</div>
<div class="control-group">
    <label class="control-label"><?= $this->lang->line('Active') ?></label>
    <div class="controls"><?= (new \Rtgc_active())->column('page_data[active]', $item['active']) ?></div>
</div>
<div class="control-group">
    <label class="control-label"><?= $this->lang->line('Date') ?></label>
    <div class="controls"><?= (new \Rtgc_date(['true' => false]))->column('page_data[updated]', $item['updated']) ?></div>
</div>
<ul class="nav nav-tabs">
    <?php foreach ($langs as $k => $lang) : ?>
        <li <?= $k == 0 ? 'class="active"' : '' ?>>
            <a href="#seo_tab_<?= $lang->id_lan ?>" data-toggle="tab"><?= $this->lang->line('SEO') . ' ' . $lang->name ?></a>
        </li>
    <?php endforeach; ?>
</ul>
<div class="tab-content">
    <?php foreach ($langs as $k => $lang) : ?>
        <div class="tab-pane<?= $k == 0 ? ' active' : '' ?>" id="seo_tab_<?= $lang->id_lan ?>">
            <div class="control-group">
                <label class="control-label"><?= $this->lang->line('Title') ?></label>
                <div class="controls">
                    <input type="text" name="page_data[seo][<?= $lang->id_lan ?>][title]" value="<?= !empty($item['seo'][$lang->id_lan]) ? $item['seo'][$lang->id_lan]['title'] : '' ?>">
                </div>
            </div>
            <div class="control-group">
                <label class="control-label"><?= $this->lang->line('Keywords') ?></label>
                <div class="controls">
                    <textarea name="page_data[seo][<?= $lang->id_lan ?>][keywords]" class="span5" rows="5"><?= !empty($item['seo'][$lang->id_lan]) ? $item['seo'][$lang->id_lan]['keywords'] : '' ?></textarea>
                </div>
            </div>
            <div class="control-group">
                <label class="control-label"><?= $this->lang->line('Description') ?></label>
                <div class="controls">
                    <textarea name="page_data[seo][<?= $lang->id_lan ?>][desc]" class="span5" rows="5"><?= !empty($item['seo'][$lang->id_lan]) ? $item['seo'][$lang->id_lan]['desc'] : '' ?></textarea>
                </div>
            </div>
        </div>
    <?php endforeach; ?>
</div>