How can i use (ONLY) Add link for a field_collection field within a view?
I have no success either to display with fieled collection data list (or view).

Files: 
CommentFileSizeAuthor
#11 1257274.11-field_collection-views-edit-delete-link.patch6.35 KBjucallme
#6 1257274.Views_field_handlers.patch6.07 KBjerdavis
PASSED: [[SimpleTest]]: [MySQL] 78 pass(es).
[ View ]
#5 1257274.5-field_collection-views-edit-delete-link.patch4.09 KBmrfelton
PASSED: [[SimpleTest]]: [MySQL] 78 pass(es).
[ View ]
#4 1257274.4-field_collection-views-edit-delete-link.patch4.09 KBmrfelton
PASSED: [[SimpleTest]]: [MySQL] 78 pass(es).
[ View ]

Comments

Status:Active» Postponed

Status:Postponed» Active

it seems that related issue it's already fixed but didn't fixed the present one.

Title:Add link for the field collection within a viewAdd, Edit and View link for the field collection within a view
Category:support» feature

Also need views field handlers for Add, Edit, and Delete fields - that should only show based on user permissions.

Title:Add, Edit and View link for the field collection within a viewViews field handlers for field collection 'action' links
Status:Active» Needs review
StatusFileSize
new4.09 KB
PASSED: [[SimpleTest]]: [MySQL] 78 pass(es).
[ View ]

Attached patch adds new views handlers that provide Edit and Delete links for field collection items.

StatusFileSize
new4.09 KB
PASSED: [[SimpleTest]]: [MySQL] 78 pass(es).
[ View ]

Fix whitespace issues.

StatusFileSize
new6.07 KB
PASSED: [[SimpleTest]]: [MySQL] 78 pass(es).
[ View ]

Here is a different approach which more closely follows what Views itself is doing for similar action links for Nodes.

Status:Needs review» Reviewed & tested by the community

Thank you!

Another note is that you should not create a label in views for the links as the label will be shown to unprivileged users while the link is properly hidden.

If you are only displaying a single node's field collection items, another tip is to exclude the add item link from display. Then add a footer with the following global unfiltered text with "use replacement patterns" checked.

<ul class="action-links">
<li>[add_item]</li>
</ul>

If you don't exclude add item from display, it will be displayed in every field collection item.

Status:Reviewed & tested by the community» Needs work

Those handlers should leverage the views' views_handler_field_enttiy (or how it is called), such as the node links do in View. Check them for example.

I do no think we should directly extend the node-link handlers. Semantically it doesn't make sense and I don't think it would bring us much.

@Fago #6 doesn't extend the node link handlers, did you take a look at it?

Reroll against latest dev.