Skip to content
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

Urb 3197 order vocabulary list #313

Open
wants to merge 2 commits into
base: urban2.7.x
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion src/Products/urban/browser/urbanconfigview.py
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,10 @@ def getVocabularyFolders(self):
for folder in context.objectValues("ATFolder")
if folder not in other_folders
]
return folders
# Sort folders by their title attribute
sorted_folders = sorted(folders, key=lambda folder: folder.Title())

return sorted_folders

def getScheduleConfigs(self):
context = aq_inner(self.context)
Expand Down
2 changes: 2 additions & 0 deletions src/Products/urban/content/licence/GenericLicence.py
Original file line number Diff line number Diff line change
Expand Up @@ -1544,6 +1544,8 @@ def foldermanagersBaseQuery(self):
dict = {}
dict["path"] = {"query": "%s/portal_urban/foldermanagers" % (rootPath)}
dict["id"] = ids
# add sort_on to sort the results of folder managers by the 'sortable_title' field
dict["sort_on"] = "sortable_title"
return dict

security.declarePublic("getParcels")
Expand Down