增加文档编辑时间显示

This commit is contained in:
Minho
2018-03-19 15:21:59 +08:00
parent 08e86e0f41
commit 57d47896c7
3 changed files with 58 additions and 7 deletions

View File

@@ -226,8 +226,12 @@ func (c *DocumentController) Read() {
if doc.ModifyTime != doc.CreateTime {
docInfo += ";更新于 "
docInfo += doc.ModifyTime.Format("2006-01-02 15:04")
if strings.TrimSpace(doc.Release) != "" {
doc.Release += "<div class=\"wiki-bottom\">文档更新时间: " + doc.ModifyTime.Format("2006-01-02 15:04") + "</div>";
}
}
if c.IsAjax() {
var data struct {
DocTitle string `json:"doc_title"`