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

Make contentlisting work with plone.app.contenttypes collections #25

Closed
wants to merge 3 commits into from

Conversation

kiorky
Copy link
Member

@kiorky kiorky commented Jan 27, 2015

@kiorky
Copy link
Member Author

kiorky commented Jan 27, 2015

This is to make folder_contents works both on plone.app.contenttypes & folders on plone4

@thet
Copy link
Member

thet commented Jan 27, 2015

nice! for plone.app.contenttypes, I'm working on something similar : plone/plone.app.contenttypes#202

@kiorky
Copy link
Member Author

kiorky commented Jan 27, 2015

yep but that's for plone5, my little commit makes the listing beginning to work with the branch for plone4 :)

@kiorky
Copy link
Member Author

kiorky commented Jan 27, 2015

i think your approach in the long term is better, it is just way too invasive rather than mine in the idea that i dont had the time to do the nice refactor you are going on, so i did that proxy trick to make things assemble on plone4.3

@thet
Copy link
Member

thet commented Jan 27, 2015

oh, sorry, i have mistaken folder_contents as folder_listing. but they are completly different views.

but what is the usecase behind looking at folder_contents for collections? are you going to show the collection results in the folder_contents view for collections?

recently i was wondering, if we could get rid of plone.app.content in Plone 5 at all and merge all of plone.app.content's stuff into CMFPlone... but that's another topic and does not affect Plone 4.

datetime.datetime,
datetime.time,
float, list, set, tuple)):
ret = ret()
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is this clause the same like doing it like so?

from Products.CMFPlone.utils import safe_callable
if safe_callable(ret):
    ret = ret()

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

maybe yes, i should read the code of safe_callable :)

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

addressed

@thet
Copy link
Member

thet commented Jan 27, 2015

merge @ebrehault ? you have more insight...

@kiorky
Copy link
Member Author

kiorky commented Jan 27, 2015

For the use case, we use folder_contents to post to a custom view via portal_actions (the user select boxes on folder_contents) and that is posted to a custom view via a custom action in folder_buttons.

The view is here; https://github.com/RBINS/rbins_masschange/blob/master/src/rbins_masschange/browser/masschange.py

I know that there is a view on plone5 which may have all if not better features of this view, but this view is older and works on plone4 :p

@thet
Copy link
Member

thet commented Jan 28, 2015

what i still don't understand is: is your collection type folderish? in plone.app.content/plone/app/content/browser/foldercontents.zcml the folder_contents view is only bound to for="Products.CMFCore.interfaces._content.IFolderish, which collections from plone.app.contenttypes aren't, IIRC.

@kiorky
Copy link
Member Author

kiorky commented Jan 28, 2015

@thet you didnt see plone/plone.app.layout/pull/40 didnt you

@thet
Copy link
Member

thet commented Jan 28, 2015

@jensens @pbauer @ebrehault do someone of you have some time to look at this? i'm currently too busy to handle this.

@thet
Copy link
Member

thet commented Feb 2, 2015

see discussion at: plone/plone.app.layout#40

@jensens
Copy link
Sponsor Member

jensens commented Dec 4, 2015

I close this one, if you think this is wrong please reopen and comment.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants