'latest' link takes you to the latest for the currently selected hub
This commit is contained in:
parent
a27645772a
commit
a087ad2e7b
@ -193,6 +193,11 @@ func (this *ArchiveState) renderTemplateHead(w http.ResponseWriter) {
|
||||
|
||||
showPageURLs := (this.log != nil && len(this.query) == 0)
|
||||
|
||||
latestUrl := `/`
|
||||
if this.log != nil {
|
||||
latestUrl = fmt.Sprintf(`/%s/%d/%d`, url.PathEscape(this.logBestSlug), this.log.LatestDate().Year, this.log.LatestDate().Month)
|
||||
}
|
||||
|
||||
w.Write([]byte(`<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
@ -208,7 +213,7 @@ func (this *ArchiveState) renderTemplateHead(w http.ResponseWriter) {
|
||||
<div id="tr1"></div>
|
||||
<div id="tr2"></div>
|
||||
<div class="ddmenu">
|
||||
<a href="/">Latest</a>
|
||||
<a href="` + html.EscapeString(latestUrl) + `">Latest</a>
|
||||
<a onclick="fontSize(1);">Font increase</a>
|
||||
<a onclick="fontSize(-1);">Font decrease</a>
|
||||
<a href="/download" onclick="return confirm('Are you sure you want to download a backup?');">Download backup</a>
|
||||
|
Loading…
Reference in New Issue
Block a user