1
0
Fork 0
mirror of https://github.com/codex-team/codex.docs.git synced 2025-07-28 17:49:40 +02:00

Fix sorting in dropdown (#187)

* fix: fix order of page categories with raw type

* refactor: change method location and others

* refactor: fix method names and variables also split methods to be clear their role

* fix: fix variable name

* fix: change the method to group of pages

* refactor: replace filter metethod to querying database

* refactor: fix typo, rename variable, add comments, improve code quality

* fix: add exit infinite loop

* fix: replace exiting loop to throwing exception
This commit is contained in:
YeoKyung Yoon 2022-06-22 07:09:08 -07:00 committed by GitHub
parent 30d96909d3
commit b3d8a1bfd4
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 191 additions and 5 deletions

View file

@ -22,7 +22,7 @@
{% endif %}
<select name="parent">
<option value="0">Root</option>
{% for _page in pagesAvailable %}
{% for _page in pagesAvailableGrouped %}
{% if _page._id != currentPageId %}
<option value="{{ _page._id }}" {{ page is not empty and page._parent == _page._id ? 'selected' : ''}}>
{% if _page._parent != "0" %}