|
@@ -214,8 +214,8 @@ func (c *DocumentController) Read() {
|
|
}
|
|
}
|
|
var PrevName, PrevPath, NextName, NextPath string
|
|
var PrevName, PrevPath, NextName, NextPath string
|
|
if index == 0 {
|
|
if index == 0 {
|
|
- c.Data["PrevName"] = "没有了"
|
|
|
|
- PrevName = "没有了"
|
|
|
|
|
|
+ c.Data["PrevName"] = ""
|
|
|
|
+ PrevName = ""
|
|
} else {
|
|
} else {
|
|
c.Data["PrevPath"] = identify + "/" + flat[index-1].Identify
|
|
c.Data["PrevPath"] = identify + "/" + flat[index-1].Identify
|
|
c.Data["PrevName"] = flat[index-1].DocumentName
|
|
c.Data["PrevName"] = flat[index-1].DocumentName
|
|
@@ -223,8 +223,8 @@ func (c *DocumentController) Read() {
|
|
PrevName = flat[index-1].DocumentName
|
|
PrevName = flat[index-1].DocumentName
|
|
}
|
|
}
|
|
if index == len(flat)-1 {
|
|
if index == len(flat)-1 {
|
|
- c.Data["NextName"] = "没有了"
|
|
|
|
- NextName = "没有了"
|
|
|
|
|
|
+ c.Data["NextName"] = ""
|
|
|
|
+ NextName = ""
|
|
} else {
|
|
} else {
|
|
c.Data["NextPath"] = identify + "/" + flat[index+1].Identify
|
|
c.Data["NextPath"] = identify + "/" + flat[index+1].Identify
|
|
c.Data["NextName"] = flat[index+1].DocumentName
|
|
c.Data["NextName"] = flat[index+1].DocumentName
|
|
@@ -251,7 +251,7 @@ func (c *DocumentController) Read() {
|
|
data.DocId = doc.DocumentId
|
|
data.DocId = doc.DocumentId
|
|
data.DocIdentify = doc.Identify
|
|
data.DocIdentify = doc.Identify
|
|
data.DocTitle = doc.DocumentName
|
|
data.DocTitle = doc.DocumentName
|
|
- data.Body = doc.Release + "<div class='wiki-bottom-left'>上一篇: <a href='/docs/" + PrevPath + "' rel='prev'>" + PrevName + "</a><br />下一篇: <a href='/docs/" + NextPath + "' rel='next'>" + NextName + "</a><br /></div>"
|
|
|
|
|
|
+ data.Body = doc.Release + "<div class='wiki-bottom-left'>"+ i18n.Tr(c.Lang, "doc.prev") + ": <a href='/docs/" + PrevPath + "' rel='prev'>" + PrevName + "</a><br />" + i18n.Tr(c.Lang, "doc.next") + ": <a href='/docs/" + NextPath + "' rel='next'>" + NextName + "</a><br /></div>"
|
|
data.Title = doc.DocumentName + " - Powered by MinDoc"
|
|
data.Title = doc.DocumentName + " - Powered by MinDoc"
|
|
data.Version = doc.Version
|
|
data.Version = doc.Version
|
|
data.ViewCount = doc.ViewCount
|
|
data.ViewCount = doc.ViewCount
|
|
@@ -283,7 +283,7 @@ func (c *DocumentController) Read() {
|
|
c.Data["Model"] = bookResult
|
|
c.Data["Model"] = bookResult
|
|
c.Data["Result"] = template.HTML(tree)
|
|
c.Data["Result"] = template.HTML(tree)
|
|
c.Data["Title"] = doc.DocumentName
|
|
c.Data["Title"] = doc.DocumentName
|
|
- c.Data["Content"] = template.HTML(doc.Release + "<div class='wiki-bottom-left'>上一篇: <a href='/docs/" + PrevPath + "' rel='prev'>" + PrevName + "</a><br />下一篇: <a href='/docs/" + NextPath + "' rel='next'>" + NextName + "</a><br /></div>")
|
|
|
|
|
|
+ c.Data["Content"] = template.HTML(doc.Release + "<div class='wiki-bottom-left'>"+ i18n.Tr(c.Lang, "doc.prev") + ": <a href='/docs/" + PrevPath + "' rel='prev'>" + PrevName + "</a><br />" + i18n.Tr(c.Lang, "doc.next") + ": <a href='/docs/" + NextPath + "' rel='next'>" + NextName + "</a><br /></div>")
|
|
c.Data["ViewCount"] = doc.ViewCount
|
|
c.Data["ViewCount"] = doc.ViewCount
|
|
c.Data["FoldSetting"] = "closed"
|
|
c.Data["FoldSetting"] = "closed"
|
|
if bookResult.Editor == EditorCherryMarkdown {
|
|
if bookResult.Editor == EditorCherryMarkdown {
|