<?php
use yii\helpers\Url;
use yii\helpers\StringHelper;

?>
<div class="newslist">
    <ul>
        <?php if (empty($announcements)) : ?>
        <li style="text-align:center;">暂无数据...</li>
        <?php else : ?>
        <?php foreach ($announcements as $anno) : ?>
            <li>
                <span><?= date("Y-m-d", $anno['create_time']) ?></span>
                <a class="open-only-see-dialog"  data-url="<?= Url::to(['/announcement/detail', 'id' => $anno['announcement_id']]) ?>"  data-height="100" data-reload="false" data-width="500" data-title="查看系统通知" title="<?= $anno['title'] ?>" href="javascript:;"><?= StringHelper::truncate($anno['title'], 18) ?></a>
            </li>
            <?php endforeach; ?>
        <?php endif; ?>
    </ul>
</div>
