Posted by abhinavlal on July 12, 2008 at 6:46pm
| Project: | Frequently Asked Questions |
| Version: | 6.x-1.12 |
| Component: | User interface |
| Category: | feature request |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | closed (won't fix) |
Issue Summary
i wanted to know how can you add a edit link next to answer when a user with access is logged in. i'm using clicking on question opens/hides answer under question option.
Comments
#1
I've added this feature, so a "Edit answer" link is now added beneath the answer, alongside the "back to top" link, etc. Please try out the attached patch or the latest dev release (available later today).
Cheers,
Stella
#2
Thanks its working perfectly.
#3
Automatically closed -- issue fixed for two weeks with no activity.
#4
Released in 5.x-2.12 and 6.x-1.8.
#5
Hi,
I'm going to reopen this issue.
I'm using the latest 6x-1.12 version of FAQ and I can't see any "edit" or "delete" links. This makes the management of FAQ very hard and complicated!
I'm using "Clicking on question opens/hides answer under question" option with accordion effect.
#6
Sorry, for reopening the issue in #5.
It turns out that with i18n settings I have to go and check "Show node links" in FAQ setting for all different languages.
It would still be very useful to also display the "Delete" link for those who have the permission to delete that FAQ node. Is it possible to do through any of the tpl files? If yes, which one? Or is it better to leave to you to do it from within the module, so as not to fork it?
#7
based on the code on line 1188 of the faq.module I added these lines.
// Add "Delete answer" link if they have the correct permissions.if (node_access('update', $node)) {
$node->links['faq_delete_link'] = array(
'title' => t('Delete'),
'href' => "node/$node->nid/delete",
'query' => drupal_get_destination(),
'attributes' => array('title' => t('Delete answer')),
);
}
I don't know if this will work. Please review and test.
#8
Hmmm I don't think I want to add an additional option for that at this stage. Deleting faqs isn't as common a task as editing them, so those with the appropriate permissions can just click on the edit link and use the delete button there.