diff options
author | Steve Manuel <nilslice@gmail.com> | 2016-12-05 11:41:12 -0800 |
---|---|---|
committer | Steve Manuel <nilslice@gmail.com> | 2016-12-05 11:41:12 -0800 |
commit | 579cc9259a7761610a9997f2e0f390716b98e454 (patch) | |
tree | 35c6312728a36b03fe1482550ab0652dfebc9a6d /system/admin/handlers.go | |
parent | 0113eb3f35c7a5e9edf12815736d1e1233b4388b (diff) |
updating offset math to include +1 as it is comparing the next set, html updates
Diffstat (limited to 'system/admin/handlers.go')
-rw-r--r-- | system/admin/handlers.go | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/system/admin/handlers.go b/system/admin/handlers.go index 81b8723..25de560 100644 --- a/system/admin/handlers.go +++ b/system/admin/handlers.go @@ -965,7 +965,7 @@ func postsHandler(res http.ResponseWriter, req *http.Request) { prevStatus = statusDisabled } // nothing after current list - if offset*count >= total { + if (offset+1)*count >= total { nextStatus = statusDisabled } @@ -978,9 +978,9 @@ func postsHandler(res http.ResponseWriter, req *http.Request) { pagination := fmt.Sprintf(` <ul class="pagination row"> - <li class="waves-effect col s4 %s"><a href="%s"><i class="material-icons">chevron_left</i></a></li> - <li class="col s4">%d to %d of %d</li> - <li class="waves-effect col s4 %s"><a href="%s"><i class="material-icons">chevron_right</i></a></li> + <li class="waves-effect %s"><a href="%s"><i class="col s2 material-icons">chevron_left</i></a></li> + <li class="col s8">%d to %d of %d</li> + <li class="waves-effect %s"><a href="%s"><i class="col s2 material-icons">chevron_right</i></a></li> </ul> `, prevStatus, prevURL, start, end, total, nextStatus, nextURL) |