I would like to suggest that the view mode of one field_collection entity accessed via url
?q=field-collection/field-fc-a/xxx
where xxx is entity item_id, should not be formatted as a table.
| Comment | File | Size | Author |
|---|---|---|---|
| #15 | field_collection_table-1252262-15.patch | 7.67 KB | tim.plunkett |
| #14 | patch.patch | 3.19 KB | mishac |
| #7 | field_collection_table-1252262-7.patch | 5.7 KB | tim.plunkett |
Comments
Comment #1
tim.plunkettI think it should be optional (I definitely need it for the case I have in mind). I have to decide how to best expose this setting. Any ideas?
Comment #2
chalee commentedMaking it optional is even better. You could add a checkbox on the module settings page, next to the one for enabling/disabling table formatter for forms. In the future you could even make the two settings applicable per entity bundle instead of globally as it is now.
Comment #3
tim.plunkettI was definitely thinking per bundle. Maybe tacking it onto where the Edit/Delete stuff is?
The global thing was a shortcut because someone provided a patch and talked me into it. I don't consider it a long term solution.
Comment #4
chalee commentedI agree if you mean on the bundle 'Manage display' page on the right side of the format field where you click on an icon on the far right to further refine the settings of the selected format.
On that settings section you can have three check boxes as below. Just a suggestion.
[ ] disable table formatter on form (edit mode)
[ ] disable table formatter on view mode of collection
[ ] disable table formatter on view mode of single (stand-alone) collection item
When user selects 'Table field-collection items' by default the 3 boxes will be un-checked meaning the table format will be applied in all three scenarios. The user can then optionally tick what they want to disabled.
Comment #5
tim.plunkettThat's what I had in mind. Now to find the time to code it :)
Comment #6
tim.plunkettI want this to go in before a beta release. I guess I should work on it...
Comment #7
tim.plunkettComment #8
chalee commentedThe patch works fine. Thanks.
Comment #9
BenK commentedSubscribing
Comment #10
gazwal commentedSubscribing
layout is broken cause of the Table when editing de f_collection form
screen here http://d.pr/lVXu
same feature resquest : http://drupal.org/node/1282090
Comment #11
czigor commentedSorry to drop in a bit late, but is this not a question of displays and widgets? The view of a node is determined by its display. The edit form by widgets. So I think the most drupalish way would be to keep the current 'Table field collection items' display as it is and add a 'Fc Table' widget to the Embedded and Hidden ones.
Comment #12
tim.plunkettWell now. #11 is a brilliant proposal. In fact, painfully obvious in hindsight. I'll work on that soon.
Comment #13
tim.plunkettComment #14
mishac commentedI needed this for a site of mine, so I took a crack at creating a widget. I also changed the field_collection_table_form_alter function to only use the field_collection_table for editing if the proper widget is chosen.
Comment #15
tim.plunkettHere's a more complete patch, which does away with the global admin settings form, making the "hide empty columns" a per instance setting.
Comment #16
tim.plunkettCommitted this: http://drupalcode.org/project/field_collection_table.git/commit/4e2516e
Comment #17
chalee commented@tim.plunkett: Can you please explain how the new commit in #16 is used to achieve same functionality as was handled by patch in #7.
Comment #18
tim.plunkettSure thing. Hopefully I'll have time this week.
Comment #19
mudjunky commentedThanks for providing the table widget! A little issue I'm having: it works when setting "Number of values" > 1. When set to 1, however, it looks more like the Embedded widget without labels.
Using field_collection_table 7.x-1.x-dev (12/21/11 1324426996) and field_collection 7.x-1.x-dev (1/7/12 1325938085).
Comment #20
dqdmudjunky, this is another problem.
It is discussed
here
#1450482: Edition forms does not present as a table, if a field collection (table) is inside a content type set to "Number of values = 1"
and here
#1276446: Doesn't format as table with single (1) field_collections.
btw: Tim I think chalee found already out last year. ;)