diff --git a/rRecentChanges.go b/rRecentChanges.go index 13d218b..ad67dc4 100644 --- a/rRecentChanges.go +++ b/rRecentChanges.go @@ -37,26 +37,41 @@ func (this *WikiServer) routeRecentChanges(w http.ResponseWriter, r *http.Reques pto.CurrentPageName = "Recent Changes" content := `

Recent Changes


` + - `Showing up to ` + fmt.Sprintf("%d", this.opts.RecentChanges) + ` changes.
` + - `` + `Showing up to ` + fmt.Sprintf("%d", this.opts.RecentChanges) + ` changes.

` + + `
` + + `
` + + `` for _, rev := range recents { + + diffHtml := "" + diffRev, err := this.db.GetNextOldestRevision(int(rev.ID)) + if err != nil { + diffHtml = `[new]` + } else { + diffHtml = `diff` + } + content += `` + - `` + + `` + `` + `` + `` + `` } - content += `
PageActionsTimeAuthor
` + template.HTMLEscapeString(rev.Title) + `` + - ` [a]` + + `` + template.HTMLEscapeString(rev.Title) + `` + + `rev   ` + + diffHtml + + `` + string(this.formatTimestamp(rev.Modified)) + `` + template.HTMLEscapeString(rev.Author) + `
` + content += `
` + if pageNum > 1 { - content += `« Newer` + content += `« Newer` } - content += `` + if pageNum < maxPage { - content += `Older »` + content += `Older »` } - content += `` + content += `` pto.Content = template.HTML(content) this.servePageResponse(w, r, pto)