Skip to content

Commit

Permalink
Merge pull request #281 from plone/rm-skins-scrip-usage
Browse files Browse the repository at this point in the history
Remove usage of skins script
  • Loading branch information
davisagli authored May 17, 2024
2 parents cc77865 + 0b08a9b commit 190e7f6
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 2 deletions.
1 change: 1 addition & 0 deletions news/281.bugfix
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Remove usage of CMFPlone skins script [@jensens]
6 changes: 5 additions & 1 deletion plone/app/content/browser/selection.py
Original file line number Diff line number Diff line change
Expand Up @@ -100,9 +100,13 @@ def get_selectable_items(self):
view_types = registry.get("plone.types_use_view_action_in_listings", [])
default_page_types = registry.get("plone.default_page_types", [])
portal_types = getToolByName(self.context, "portal_types")
portal_catalog = getToolByName(self.context, "portal_catalog")

results = []
for brain in context.getFolderContents():
for brain in portal_catalog(
path={"query": context.absolute_url_path(), "depth": 1},
sort_on="getObjPositionInParent",
):
portal_type = brain.portal_type
if portal_type in view_types:
# Skip files and images
Expand Down
2 changes: 1 addition & 1 deletion plone/app/content/tests/test_actions.py
Original file line number Diff line number Diff line change
Expand Up @@ -234,7 +234,7 @@ def test_default_page_updated_on_rename(self):
self.browser.getControl(name="form.widgets.new_id").value = " ?renamed"
self.browser.getControl(name="form.widgets.new_title").value = "Doc"
self.browser.getControl(name="form.buttons.Rename").click()
self.assertEqual(folder.getFolderContents()[0].id, "renamed")
self.assertEqual(folder.contentIds()[0], "renamed")
self.assertEqual(folder.getDefaultPage(), "renamed")

def test_rename_form_cancel(self):
Expand Down

0 comments on commit 190e7f6

Please sign in to comment.