commit 168d0a85fc3627b901d507fdc4b49707f717c639
parent 1d717451bebb68df0a3decb8dd7983e58544d4c9
Author: Peter Kosyh <p.kosyh@gmail.com>
Date: Tue, 8 Sep 2020 11:40:05 +0300
New posts
Diffstat:
2 files changed, 5 insertions(+), 4 deletions(-)
diff --git a/ii-node/tpl/header.tpl b/ii-node/tpl/header.tpl
@@ -15,7 +15,7 @@
<td class="title">
<span class="logo"><a href="/">{{.Sysname}}</a></span>
{{ if eq .BasePath "" }}
- <span class="info">II/IDEC networks :: <a href="/echo/all">All posts</a>
+ <span class="info">II/IDEC networks :: <a href="/echo/all">New posts</a>
{{ else if gt (len .Topics) 0}}
<span class="info">II/IDEC networks {{ with .Echo }} :: <a href="/echo/{{.}}">{{.}}</a> <span class="info">{{index $.Echolist.Info .}}</span>{{end}}
{{ else }}
diff --git a/ii-node/web.go b/ii-node/web.go
@@ -936,12 +936,13 @@ func _handleWWW(ctx *WebContext, w http.ResponseWriter, r *http.Request) error {
fmt.Sscanf(args[2], "%d", &page)
}
}
- e := args[1]
+ q := ii.Query { Echo: args[1] }
if args[1] == "all" {
- e = ""
+ q.Echo = ""
+ q.Start = -100
}
ctx.BasePath = "echo/" + args[1]
- return www_query(ctx, w, r, ii.Query { Echo: e }, page, rss)
+ return www_query(ctx, w, r, q, page, rss)
} else if ii.IsEcho(args[0]) {
page := 1
if len(args) > 1 {