kokjan/backend/modules/administrator/views/theme-editor/index.php

50 lines
2.3 KiB
PHP

<?php
use yii\helpers\Html;
use yii\helpers\Url;
$this->title = 'จัดการไฟล์ธีมหน้าบ้าน';
$this->params['breadcrumbs'][] = ['label' => 'Administrator', 'url' => ['/administrator/default/index']];
$this->params['breadcrumbs'][] = $this->title;
?>
<div class="theme-editor-index">
<div class="card">
<div class="card-header bg-primary text-white">
<h4 class="card-title"><i class="fa fa-paint-brush"></i> <?= Html::encode($this->title) ?></h4>
</div>
<div class="card-body">
<div class="alert alert-info">
<i class="fa fa-info-circle"></i> คุณสามารถแก้ไขไฟล์โครงสร้างหลักของธีม Mali ได้ที่นี่ ระบบจะทำการสำรองไฟล์เดิมเป็นนามสกุล <code>.bak</code> ทุกครั้งที่บันทึก
</div>
<div class="table-responsive">
<table class="table table-hover table-bordered">
<thead class="bg-light">
<tr>
<th style="width: 50px;">#</th>
<th>ชื่อไฟล์</th>
<th style="width: 150px;" class="text-center">เครื่องมือ</th>
</tr>
</thead>
<tbody>
<?php foreach ($files as $index => $file): ?>
<tr>
<td><?= $index + 1 ?></td>
<td>
<strong class="text-primary"><?= $file ?></strong>
<br>
<small class="text-muted">Path: @frontend/themes/mali/views/layouts/<?= $file ?></small>
</td>
<td class="text-center">
<?= Html::a('<i class="fa fa-edit"></i> แก้ไข', ['edit', 'file' => $file], ['class' => 'btn btn-sm btn-outline-warning']) ?>
</td>
</tr>
<?php endforeach; ?>
</tbody>
</table>
</div>
</div>
</div>
</div>