<div class="modal-dialog">
    <div class="modal-content">
        <div class="modal-header">
            <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
            <h4 class="modal-title"><?php echo $this->_tpl_vars['Captions']->GetMessageString('View'); ?>
</h4>
        </div>
        <div class="modal-body">

            <div class="form-horizontal">
                <?php unset($this->_sections['RowGrid']);
$this->_sections['RowGrid']['name'] = 'RowGrid';
$this->_sections['RowGrid']['loop'] = is_array($_loop=$this->_tpl_vars['ColumnCount']) ? count($_loop) : max(0, (int)$_loop); unset($_loop);
$this->_sections['RowGrid']['show'] = true;
$this->_sections['RowGrid']['max'] = $this->_sections['RowGrid']['loop'];
$this->_sections['RowGrid']['step'] = 1;
$this->_sections['RowGrid']['start'] = $this->_sections['RowGrid']['step'] > 0 ? 0 : $this->_sections['RowGrid']['loop']-1;
if ($this->_sections['RowGrid']['show']) {
    $this->_sections['RowGrid']['total'] = $this->_sections['RowGrid']['loop'];
    if ($this->_sections['RowGrid']['total'] == 0)
        $this->_sections['RowGrid']['show'] = false;
} else
    $this->_sections['RowGrid']['total'] = 0;
if ($this->_sections['RowGrid']['show']):

            for ($this->_sections['RowGrid']['index'] = $this->_sections['RowGrid']['start'], $this->_sections['RowGrid']['iteration'] = 1;
                 $this->_sections['RowGrid']['iteration'] <= $this->_sections['RowGrid']['total'];
                 $this->_sections['RowGrid']['index'] += $this->_sections['RowGrid']['step'], $this->_sections['RowGrid']['iteration']++):
$this->_sections['RowGrid']['rownum'] = $this->_sections['RowGrid']['iteration'];
$this->_sections['RowGrid']['index_prev'] = $this->_sections['RowGrid']['index'] - $this->_sections['RowGrid']['step'];
$this->_sections['RowGrid']['index_next'] = $this->_sections['RowGrid']['index'] + $this->_sections['RowGrid']['step'];
$this->_sections['RowGrid']['first']      = ($this->_sections['RowGrid']['iteration'] == 1);
$this->_sections['RowGrid']['last']       = ($this->_sections['RowGrid']['iteration'] == $this->_sections['RowGrid']['total']);
?>
                    <div class="form-group" <?php if ($this->_tpl_vars['RowCssStyles'][($this->_foreach['RowsGrid']['iteration']-1)] != ''): ?> style="<?php echo $this->_tpl_vars['RowCssStyles'][($this->_foreach['RowsGrid']['iteration']-1)]; ?>
"<?php endif; ?>>
                        <label class="col-sm-3 control-label">
                            <?php echo $this->_tpl_vars['Columns'][$this->_sections['RowGrid']['index']]->GetCaption(); ?>

                        </label>
                        <div class="col-sm-9">
                            <div class="form-control-static">
                                <?php echo $this->_tpl_vars['Row'][$this->_sections['RowGrid']['index']]; ?>

                            </div>
                        </div>
                    </div>
                <?php endfor; endif; ?>
            </div>

        </div>
        <div class="modal-footer">
            <button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
        </div>
    </div>
</div>