{$layout}
{$template "../menu"}

<p class="comment" v-if="logs.length == 0">暂时还没有发送记录。</p>

<div v-if="logs.length > 0">
    <div class="margin"></div>
    <table class="ui table selectable definition" v-for="log in logs" :class="{red: !log.isOk, green: log.isOk}">
        <tr>
            <td class="title">简介</td>
            <td>接收人：{{log.task.user}} <span class="disabled">&nbsp; | &nbsp;</span> 媒介：{{log.task.instance.name}}<link-icon :href="'/admins/recipients/instances/instance?instanceId=' + log.task.instance.id"></link-icon>
                <span class="disabled">&nbsp; | &nbsp;</span> 时间：{{log.createdTime}} &nbsp;|&nbsp; <span class="ui green basic label tiny" v-if="log.isOk">成功</span><span class="ui red basic label tiny" v-if="!log.isOk">失败</span>
            </td>
        </tr>
        <tr v-if="log.task.subject.length > 0">
            <td>标题</td>
            <td>{{log.task.subject}}</td>
        </tr>
        <tr v-if="log.task.body.length > 0">
            <td>内容</td>
            <td>{{log.task.body}}</td>
        </tr>
        <tr v-if="log.error.length > 0" class="error">
            <td>错误信息</td>
            <td>{{log.error}}</td>
        </tr>
        <tr v-if="log.response.length > 0">
            <td>响应信息</td>
            <td>{{log.response}}</td>
        </tr>
    </table>
</div>

<div class="page" v-html="page"></div>