Your IP : 216.73.216.79


Current Path : /var/www/html/brspace/backend/modules/documentAutomation/views/documents/
Upload File :
Current File : /var/www/html/brspace/backend/modules/documentAutomation/views/documents/selecttemplate.php

<?php

use yii\helpers\Html;
use backend\modules\documentAutomation\models\Template;

$this->title = 'Select template';
$this->params['breadcrumbs'][] = ['label' => 'Documents', 'url' => ['index']];
$this->params['breadcrumbs'][] = $this->title;
?>
<style>
    .template-wrapper{
        border:1px solid #ccc;
        text-align : center;
        margin-bottom : 1em;
    }

    .template-wrapper h4{
        height : 35px;
    }

    .template-img{
        background-color : whitesmoke;
        padding : 1em;
        margin-bottom:1em;
    }
</style>
<div class="wrapper wrapper-content animated fadeInRight" style="padding: 20px 10px 20px;">
    <?= Html::a(Yii::t('app', 'Back'), ['index'], ['class' => 'btn btn-primary']) ?><br><br>
    <div class="ibox float-e-margins">
        <div class="ibox-content">
            <div class="row">
                <?php
                $model = Template::find()->orderby(['title' => SORT_ASC])->all();
                if (!empty($model)) {
                    foreach ($model as $row) {

                        if (!empty($row->thumbnail))
                            $thumbnail = "../../../" . $row->thumbnail;
                        else
                            $thumbnail = "../../images/noimage.jpg";

                        echo '<div class="col-sm-3">
                            <a href="create?template_id=' . $row->id . '">
                                <div class="template-wrapper">
                                    <div class="template-img"><img src="' . $thumbnail . '" style="height:350px;max-width:100%;"></div>
                                    <h4>' . $row->title . '</h4>
                                </div>
                            </a>
                        </div>';
                    }
                }
                ?>
            </div>
        </div>
    </div>
</div>