I had an idea how this can be done and had to try it out..
Imho, that patch is filled with pure awesomeness :)
It contains/changes:
- It moves the header and field theming from privatemsg_list() to theme_privatemsg_list(), because...
-- memory improvement, we don't need to carry that around, pass it to hooks, save it into {cache_form} and so on.
-- it allows other modules to alter $form['#data'] and it will then call (or not call) additional theme function to collect headers and field data.
-- It's a cleaner separation between theming and logic
- privatemsg_filter adds 0-3 tags per thread to the list..
-- can be enabled/disabled, of course :)
-- All tags are fetched in a single query, that should be quite fast
-- It implements it in a way that we should be able to use for participants too.. that would allow us to remove db-specific code, countless user_load() calls from that page and make the list query simpler (separate patch, of course)
-- it is well documented, I think ;)
Comment | File | Size | Author |
---|---|---|---|
#8 | privatemsg_tag_list_d7.patch | 19.12 KB | Berdir |
#6 | privatemsg_tags_list5.patch | 9.96 KB | Berdir |
#5 | privatemsg_tags_list4.patch | 9.97 KB | Berdir |
#4 | privatemsg_tags_list3.patch | 9.42 KB | Berdir |
#4 | taglist.png | 45.82 KB | Berdir |
Comments
Comment #1
NaheemSays CreditAttribution: NaheemSays commentedtagging.
Comment #2
litwol CreditAttribution: litwol commentedTry a screenshot with longer subjects and more realistic tag names. also subject column should have most width. I realize those are rather minor details but they add much to the 'UX' aspect.
Comment #3
BerdirRe-roll with a few simple fixes..
- when the first thread did not contain tags, no tags were displayed at all. Fixed.
- made the subject column atleast 35% wide. This is just a test and will not work on older browsers like IE6 (who cares? :) )
- Long tags are now shortened
Comment #4
BerdirDid a re-roll for this. Looking for reviews :)
I think this is now even nicer, together with the actions. See attached screenshot.
Comment #5
BerdirFixed a but that removed the last_updated column from the output.
Looking for reviews, this should be quite ready...
Comment #6
BerdirAbove patch missed a small change, all table columns are now displayed even if there are no new messages.
I'll go forward and commit this and wait a few days to fix bugs if they are reported.
Comment #7
BerdirCommited to 6.x-1.x-dev, needs to be ported to 7.x-1.x-dev.
Comment #8
BerdirOh well, that port grow a bit ;)
The patch uses now tablesect for the checkboxes, which eliminates all our code to generate these checkboxes. It also removes theme_privatemsg_list() and instead converts _privatemsg_list_thread() to a #pre_render function, automatically executed before the table is rendered.
Comment #9
BerdirCommited to 7.x-1.x-dev