1 Star 0 Fork 6

dengkuanchina/blog

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
fragment.html 2.66 KB
一键复制 编辑 原始数据 按行查看 历史
梦海澜心 提交于 2017-07-15 10:12 +08:00 . 5.5.5
<div th:fragment="treeComment(parent,comment,max)">
<div th:id="'comment'+${comment.id}" class="media"
th:data-p="${comment.parent == null ? '' : comment.parent.id}">
<a class="pull-left"
th:attr="target=${comment.website == null ? null : '_blank'},href=${comment.website == null ? null : comment.website},rel=${(comment.admin || comment.website == null) ? null : 'external nofollow'}">
<img class="media-object"
th:src="${comment.gravatar == null ? urls.url+'/static/img/guest.png' : gravatarPrefix+comment.gravatar}"
data-holder-rendered="true" style="width: 64px; height: 64px;">
</a>
<div class="media-body">
<h5 class="media-heading">
<strong><span class="glyphicon glyphicon-user"
style="color: red" title="管理员" th:if="${comment.admin}"></span><span
th:text="${comment.nickname}"></span></strong>&nbsp;&nbsp;&nbsp;<span
th:if="${parent != null}" th:remove="tag"> <span
class="glyphicon glyphicon-share-alt" aria-hidden="true"></span>&nbsp;&nbsp;
<span class="glyphicon glyphicon-user" style="color: red"
title="管理员" th:if="${parent.admin}"></span><span
th:text="${parent.nickname}"></span>
</span>
</h5>
<p style="word-break: break-all" th:utext="${comment.content}"></p>
<h5>
<span
th:text="${times.format(comment.commentDate,'yyyy-MM-dd HH:mm')}" th:data-timestamp="${times.getTime(comment.commentDate)}"></span>&nbsp;&nbsp;&nbsp;
<a href="###" th:if="${user != null}"
th:onclick="'removeComment(\''+${comment.id}+'\')'"
style="margin-right: 8px"><span
class="glyphicon glyphicon-remove" aria-hidden="true"></span></a> <a
href="###"
th:if="${user != null && comment.status.name() == 'CHECK'}"
th:onclick="'checkComment(\''+${comment.id}+'\')'"
style="margin-right: 8px"><span class="glyphicon glyphicon-ok"
aria-hidden="true"></span></a> <a href="###" style="margin-right: 8px"
th:onclick="'toReply(\''+${comment.id}+'\')'"><span
class="glyphicon glyphicon-comment" aria-hidden="true"></span></a> <a
href="###" th:unless="${#lists.isEmpty(comment.parents)}"
th:onclick="'queryConversations(\''+${comment.id}+'\')'">查看对话</a>
</h5>
<iterator
th:if="${comment.parents.size() < (max-1) && comment.children.size() > 0}"
th:remove="tag" th:each="child : ${comment.children}">
<div th:replace="fragment :: treeComment(${comment},${child},${max})"></div>
</iterator>
</div>
<iterator
th:if="${comment.parents.size() >= (max-1) && comment.children.size() > 0}"
th:remove="tag" th:each="child : ${comment.children}">
<div th:replace="fragment :: treeComment(${comment},${child},${max})"></div>
</iterator>
</div>
</div>
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
Java
1
https://gitee.com/dengkuanchina/blog.git
git@gitee.com:dengkuanchina/blog.git
dengkuanchina
blog
blog
5.10

搜索帮助