<?php
use wap\assets\AppAsset;
use yii\helpers\Url;
use yii\helpers\StringHelper;

$this->title = StringHelper::truncate($model['name'], 10);

/* @var $this \yii\web\View */

$asset = $this->getAssetManager()->getBundle(AppAsset::className());
$this->registerJsFile($asset->baseUrl.'/js/scroll.load.js', ['depends' => [AppAsset::className()]]);
?>

<?= $this->render('_task-overview', ['task' => $model]) ?>

<div class="mainbody" style="word-wrap : break-word; word-break:break-all">
    <ul class="switchtab">
        <li <?= $category == 'user' ? 'class="active"' : '' ?> ><a href="<?= Url::to(['detail', 'id' => $model['task_id'], 'category' => 'user']) ?>"><i class="icon-user"></i>人员</a></li>
        <li <?= $category == 'time' ? 'class="active"' : '' ?> ><a href="<?= Url::to(['detail', 'id' => $model['task_id'], 'category' => 'time']) ?>"><i class="icon-time"></i>时间</a></li>
    </ul>

    <div class="common-list detail-list">
        <ul id="scroll-ul" data-scroll-pagination="enabled" data-page-url="<?= Url::to(['blog', 'category' => $category, 'link_id' => $model['task_no'], 'link_type' => 'task']) ?>">
        </ul>
        <div id="loading" class="load"> 
            <p><img src="<?= Yii::getAlias('@web') ?>/static/images/scroll-loading.gif" alt="加载中"></p>
        </div>
        <div id="load-end">
            <p><a href="javascript:;">点击显示更多</a></p>
        </div>
        <div id="load-top"></div>

    </div>

</div>



<!--底部固定导航-->
<div class="bottomarea"></div>
<div class="bottomnav">
    <ul>
        <li style="width:34%"> <a href="<?= Url::to(['/reimbursement/create', 'link_type' => 'task', 'link_id' => $model['task_no']]) ?>"><i class="icon-yen"></i>报销</a> </li>
        <li style="width:33%"> <a href="<?= Url::to(['/blog/create', 'link_type' => 'task', 'link_id' => $model['task_no'], 'link_title' => $model['name']]) ?>"><i class="icon-copy"></i></i>日志</a> </li>
    <li style="width:33%"> <a href="#"><i class="icon-comments-alt"></i>消息</a> </li>
</ul>
</div>
<!--底部固定导航-->

