|
|
@@ -8,6 +8,7 @@ import (
|
|
|
|
|
|
"miniflux.app/v2/internal/http/request"
|
|
|
"miniflux.app/v2/internal/http/response/html"
|
|
|
+ "miniflux.app/v2/internal/http/route"
|
|
|
"miniflux.app/v2/internal/ui/session"
|
|
|
"miniflux.app/v2/internal/ui/view"
|
|
|
)
|
|
|
@@ -19,9 +20,12 @@ func (h *handler) sharedEntries(w http.ResponseWriter, r *http.Request) {
|
|
|
return
|
|
|
}
|
|
|
|
|
|
+ offset := request.QueryIntParam(r, "offset", 0)
|
|
|
builder := h.store.NewEntryQueryBuilder(user.ID)
|
|
|
builder.WithShareCodeNotEmpty()
|
|
|
builder.WithSorting(user.EntryOrder, user.EntryDirection)
|
|
|
+ builder.WithOffset(offset)
|
|
|
+ builder.WithLimit(user.EntriesPerPage)
|
|
|
|
|
|
entries, err := builder.GetEntries()
|
|
|
if err != nil {
|
|
|
@@ -39,6 +43,7 @@ func (h *handler) sharedEntries(w http.ResponseWriter, r *http.Request) {
|
|
|
view := view.New(h.tpl, r, sess)
|
|
|
view.Set("entries", entries)
|
|
|
view.Set("total", count)
|
|
|
+ view.Set("pagination", getPagination(route.Path(h.router, "sharedEntries"), count, offset, user.EntriesPerPage))
|
|
|
view.Set("menu", "history")
|
|
|
view.Set("user", user)
|
|
|
view.Set("countUnread", h.store.CountUnreadEntries(user.ID))
|