Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
I would like to add an 'Approve Comment' link to a view, so that admins don't need to visit the node if they know they want to approve a comment (the same way that they could Delete it using the Delete link that is made available).
I see that the /comment/cid/approve url has a ?token= query attached to it -- is there any way for Views to access this value, or is this feature just not possible?
Comments
Comment #1
dawehnerSure this would be possible if you use this code snippet for generate the query key of the link
Comment #2
merlinofchaos CreditAttribution: merlinofchaos commentedWell, that wouldn't get the permissions, so we need one that has proper field access testing.
Comment #3
merlinofchaos CreditAttribution: merlinofchaos commentedA good workaround, though, is probably to use VBO and have approve as an action.
Comment #4
dawehnerJust commited this feature to 7.x-3.x
Comment #6
wOOge CreditAttribution: wOOge commentedI see this feature was committed — how does one access the "approve" link in views (as I would an "edit" link)?
Comment #7
dawehnerWell you need the current dev version.
Once you have it, you will have a new "approve link" field available
in views.