Field Collection Modals is a module that will create CTools modals for Field Collections, presenting the add / edit / delete forms in a modal for site users.
This is a Drupal 7 module, dependent on:
This module was developed using Field Collection version 7.x-1.0-beta4.
The original idea for this module was born from a blog post by domidc. Code has been refactored for increased usability, and future enhancements are planned for revision support and an administrative interface to limit modals to selected field collections.
The module can be downloaded via git as follows:
git clone --recursive --branch 7.x-1.0-dev lhridley@git.drupal.org:sandbox/lhridley/1719154.git field_collection_modals
Comments
Comment #1
serjas commentedmanual review
# change working branch from master to 7.x (check 3,4,7 in http://drupal.org/node/1127732)
# remove version from .info
# add dependencies[] since it depend on Chaos Tools and Field Collection
# package under Fields (as it related to Fields)
installed the module and other required module, but not sure how this module works, can you please explain?
Comment #2
lisa.rae commentedsergas -- thank you for your review of this module. I have addressed all four list items on your manual review. Thank you for the link on changing the working branch -- looked for that but overlooked it specifically when I was setting up the project.
On explaining how this works, I thought the best case would be to set up a test site for you to peruse that has a working example (in doing this I found several use cases that I neglected to cover in my initial module, so I've spent the day setting up various field collection fields in various configurations, testing for all of the use cases I could think of and refactoring my code to cover them all). You can find that www.southernfamilyroots.com/node/3 (username: demo / password: demouser). The demo user has permissions to create, edit and delete any content of this type, so feel free to add, delete and edit collections on the existing example called "Test Article", or create your own content of type "Article FC". I'll blow this example site away when this module has been vetted and approved.
I don't know how familiar you are with the Field collection module, but basically Field collections allows you to attach a defined entity to another content type (in the form of a collection of fields) as a "field" on that content type. The big difference from the user perspective between a Field collection and a custom field type is that a Field collection can be edited independently of the content type instance, yet remains part of that entity in the form of a "field collection" field. This allows you, among other things, to pull information about the field collection contents when you load the entity / node without having to go through extra steps to retrieve the data.
This module will present the add / edit / delete form for a field collection in a CTools modal on the node view page, without any additional configuration other than having the module and its dependencies installed. Once the module is active, any field collection will launch its add / edit / delete forms in a CTools modal.
The example I've set up at the previously mentioned URL includes a Test Article with lorem ipsum text, and four field collections attached:
I hope this was an adequate enough explanation, and that you find the module worthy of approval. I of course welcome any feedback or suggestions you might have on improving the user experience or the code.
Thank you for your time!
Comment #3
lisa.rae commentedComment #4
serjas commentedtested working in my localhost. working fine :)
manual review
# make sure your following branch naming pattern 7.x-1.x (not 7.x-1.0-dev, it is dev by default) read more here http://drupal.org/node/1015226
automatic review found coding standard error .. please fix http://ventral.org/pareview/httpgitdrupalorgsandboxlhridley1719154git
Comment #5
lisa.rae commentedWow. I think I got them all. Comments are pretty picky :)
Got the master branch deleted as well.
http://ventral.org/pareview/httpgitdrupalorgsandboxlhridley1719154git
Comment #6
serjas commentedHi , delete 7.x-1.0-dev branch also (this explain everything )
Comment #7
lisa.rae commentedDone! Sorry, I had deleted it locally and totally forgot to delete it remotely.
Comment #8
klausiWe are currently quite busy with all the project applications and I can only review projects with a review bonus. Please help me reviewing and I'll take a look at your project right away :-)
Comment #9
klausiComment #10
klausimanual review:
field_collection_modals_item_add(): do not use exit, always use drupal_exit() instead. Also elsewhere.
field_collection_modals_operator_callback(): the acess checking should take place in an access callback from hook_menu().
field_collection_modals_operator_callback(): I think you should use drupal_json_output here to set the correct HTTP headers.
But otherwise looks good to me as well.
Thanks for your contribution, lhridley!
I updated your account to let you promote this to a full project and also create new projects as either a sandbox or a "full" project.
Here are some recommended readings to help with excellent maintainership:
You can find lots more contributors chatting on IRC in #drupal-contribute. So, come hang out and get involved!
Thanks, also, for your patience with the review process. Anyone is welcome to participate in the review process. Please consider reviewing other projects that are pending review. I encourage you to learn more about that process and join the group of reviewers.
Thanks to the dedicated reviewer(s) as well.
Comment #12
lazzyvn commentedI just want report this module works only with Add new field collection , Modify and Delete doesn't work anymore
May be it isn't compatible with drupal 7.41 and field collection beta 10.
I will try to develop new module field colletion bootstrap modal , any suggestion is welcome