openidec

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs | README | LICENSE

commit b1dd2eef34df3af9d45817d93cc96dd4c2fa5ee6
parent 71c52f5005fedafc7887c1b737d44e5e65966aad
Author: Peter Kosyh <p.kosyh@gmail.com>
Date:   Thu, 10 Sep 2020 12:57:27 +0300

last message on index now ref to last page size messages

Diffstat:
Mii-node/tpl/index.tpl | 2+-
Mii-node/web.go | 5+++--
2 files changed, 4 insertions(+), 3 deletions(-)

diff --git a/ii-node/tpl/index.tpl b/ii-node/tpl/index.tpl @@ -17,7 +17,7 @@ </td> <td class="topics extra">{{.Topics}}</td> <td class="count extra">{{.Count}}</td> -<td class="info">{{with .Msg}}<span class="subj">{{.Subj}}</span><br><a href="/{{.MsgId}}#{{.MsgId}}">{{.Date | fdate}}</a> by {{.From}}{{end}}</td> +<td class="info">{{with .Msg}}<span class="subj">{{.Subj}}</span><br><a href="/echo/{{.Echo}}">{{.Date | fdate}}</a> by {{.From}}{{end}}</td> </tr> {{ end }} </table> diff --git a/ii-node/web.go b/ii-node/web.go @@ -341,7 +341,7 @@ func www_query(ctx *WebContext, w http.ResponseWriter, r *http.Request, q ii.Que req := ctx.BasePath if rss { - q.Start = -100 + q.Start = -PAGE_SIZE } mis := db.LookupIDS(Select(ctx, q)) ii.Trace.Printf("www query") @@ -967,8 +967,9 @@ func _handleWWW(ctx *WebContext, w http.ResponseWriter, r *http.Request) error { q := ii.Query{Echo: args[1]} if args[1] == "all" { q.Echo = "" - q.Start = -100 } + ctx.Echo = q.Echo + q.Start = -PAGE_SIZE ctx.BasePath = "echo/" + args[1] return www_query(ctx, w, r, q, page, rss) } else if ii.IsEcho(args[0]) {