20 lines
756 B
PHP
20 lines
756 B
PHP
<?php
|
|
use App\Content\View;
|
|
|
|
$e = View::escape(...);
|
|
?>
|
|
<?php if ($articles): ?>
|
|
<ul class="admin-list">
|
|
<?php foreach ($articles as $item): ?>
|
|
<li>
|
|
<div><strong><?= $e($item['title']) ?></strong>
|
|
<small><?= $e(implode('、', $item['categories'])) ?> · <?= $item['status'] === 'published' ? '已发布' : '草稿' ?> · <?= $e(View::date($item['updated_at'])) ?></small>
|
|
</div>
|
|
<a class="button button-outline" href="/admin/articles/<?= $e($item['id']) ?>"><?= View::fragment('studio-icon', ['icon' => 'edit']) ?>编辑文章</a>
|
|
</li>
|
|
<?php endforeach ?>
|
|
</ul>
|
|
<?php else: ?>
|
|
<p class="empty-state">暂无文章。</p>
|
|
<?php endif ?>
|