Closed (won't fix)
Project:
Privatemsg
Version:
6.x-2.x-dev
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
10 Apr 2009 at 21:38 UTC
Updated:
27 May 2013 at 03:03 UTC
Jump to comment: Most recent file
Comments
Comment #1
syakely commentedWith the invite of "@todo: Provide a more flexible solution for such an undo action, operation defined string for example" in the code, I'm submitting patches to theme the messages on the bulk like operation privatemsg_operation_execute.
This module is very useful, Thanks!
SY.
Comment #2
erik.ahlswede commentedThese look great. They are exactly what I've been looking for.
Thanks,
Erik
Comment #3
syakely commentedThis has already been taken care of in the 6x-1.2-dev.
Edit: Confused myself this is not fixed in 6x-1.2-dev version.
Comment #4
naheemsays commentedI think this is the wrong way - it is not fixing the underlying issue were you can have a different undo/reversal text per operation. It is still restricted to a single text, but allows it to be replaced in the theme layer. This can already be done through translations.
Comment #5
naheemsays commentedcross posted.
Comment #6
syakely commentedI am not finding the cross post.
nbz, I am passing the operation to the theme function so a different message is sent (and can be changed) for the different operations. I may be missing your point. Please help me understand.
My last patch was made from the Recommended release.
I have attached patches for 6.x-2-dev
Thanks,
SY
Comment #7
naheemsays commentedhm.. I can see how it can be extended in the theme function there. But that is still limited by knowing all the possible variations of the text to display beforehand, so its not really extensible. If there are new operations added, the theme function would need to be extended.
A more extensible way would be to get the operation to provide the required text and then the translation layer can be used to replace it if needed.
Comment #8
berdir- Please provide a single patch, not multiple ones for each file. That does't work with automated testing
- If you provide a patch, set the status to needs review, then the patch is picked up and tested (there aren't tests for everything, but quite a lot now)
- I agree with nbz here. There is already a possibility to add a 'success message' to the $operation, we should add a 'undo message' key, and either output that or the existing default value.
- Additionally, instead of a theme function (The string is just outputted as a dsm() so there isn't much you can actually *theme*), we could add a drupal_alter('privatemsg_operation, $operation, ) to _privatemsg_execute_operation() that would allow to change anything from that operation, not only the undo message.
Comment #9
ptmkenny commentedFeel free to re-open if you update the patch as per #8.