-
Notifications
You must be signed in to change notification settings - Fork 354
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Pagination and more macros #1101
Conversation
Codecov Report
@@ Coverage Diff @@
## master #1101 +/- ##
=========================================
- Coverage 62.02% 62% -0.02%
=========================================
Files 230 230
Lines 16587 16587
=========================================
- Hits 10288 10285 -3
- Misses 6299 6302 +3
Continue to review full report at Codecov.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Didn't test it, but the code looks alright.
Reviewed 3 of 3 files at r1, 1 of 1 files at r2, 8 of 8 files at r3, 2 of 2 files at r4, 5 of 5 files at r5.
Reviewable status: all files reviewed, 3 unresolved discussions (waiting on @stefano-maggiolo)
cms/server/admin/templates/macro/pages.html, line 21 at r1 (raw file):
{% endfor %} {% endif %} </div>
The outer if
and the div
are nested incorrectly.
cms/server/admin/templates/macro/pages.html, line 25 at r2 (raw file):
{% endif %} {% endif %} </div>
Same nesting issue.
cms/server/admin/templates/macro/pages.html, line 33 at r2 (raw file):
Show a page range selector from start (included) to end (excluded). #} {% for i in range([0, start]|max, [pages, end]|min) %}
Dunno if it's the same in Jinja, but this syntax works in plain Python: range(pages)[start:end]
(and it returns a properly capped range object)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewable status: all files reviewed, 3 unresolved discussions (waiting on @lerks)
cms/server/admin/templates/macro/pages.html, line 21 at r1 (raw file):
Previously, lerks (Luca Wehrstedt) wrote…
The outer
if
and thediv
are nested incorrectly.
Good catch
cms/server/admin/templates/macro/pages.html, line 25 at r2 (raw file):
Previously, lerks (Luca Wehrstedt) wrote…
Same nesting issue.
Good catch
cms/server/admin/templates/macro/pages.html, line 33 at r2 (raw file):
Good catch
not if start is negative, no?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks! Fixing in place and submitting.
Reviewable status: all files reviewed, 3 unresolved discussions (waiting on @lerks)
1def3bb
to
58856f5
Compare
I'm getting an error on the Submissions and User tests pages with CMS installed in the system:
|
If you think you'll have more than a few comments let me know and I'll split into more PRs.
Partially fixes #1097.
This change is