Skip to content

Commit

Permalink
pageCount
Browse files Browse the repository at this point in the history
  • Loading branch information
zmsdev committed Oct 10, 2023
1 parent 661a7ae commit 5e17e0d
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions Products/zms/zpt/ZMSRecordSet/main_grid.zpt
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,9 @@
size python:options.get('size',len(filtered_records));
total python:options.get('total',len(records));
pageSize python:request.get('qsize',20);
pageIndex python:request.get('pageIndex',int(request.get('qindex',0))//pageSize);
pageIndex python:pageIndex if pageIndex >= 0 else 0;
pageCount python:size//pageSize;
pageIndex python:request.get('pageIndex',int(request.get('qindex',-1))//pageSize);
pageIndex python:pageIndex if pageIndex >= 0 and pageIndex < pageSize else 0;
pageStart python:pageIndex*pageSize;
pageEnd python:min(pageStart+pageSize,size);
offset python:options.get('offset',pageStart);">
Expand Down

0 comments on commit 5e17e0d

Please sign in to comment.