I'm working on a view that displays the body and links for the current and latest (pending) revision.
Content:Body will display the current revision body.
Using Views PHP, I was able to output the link for the pending revision.
Does anyone have any ideas on how I can display the body for the pending revision?
I'd like to have a side by side comparison on one page.
Thanks,
$nid = $row->nid;
$latest_vid = revisioning_get_latest_revision_id($nid);
$current_vid = revisioning_get_current_node_revision_id($nid);
if ($current_vid == $latest_vid) {
echo "<a href='node/$nid/edit'>Edit current</a>";
} else {
echo "<a href='node/$nid/revisions/$latest_vid/compare'>Compare</a>";
}
| Comment | File | Size | Author |
|---|---|---|---|
| #5 | views diff.jpg | 148.9 KB | kingdee40 |
Comments
Comment #1
rdeboerHi kingdee,
Why not use the Diff module integration that comes with Revisioning?
Rik
Comment #2
kingdee40 commentedDiff does a side by side comparison of one revision, I need a side by side comparison of all revisions on one page.
Comment #3
rdeboerThis is rather crude, but should do the trick:
Rik
Comment #4
rdeboerComment #5
kingdee40 commentedCool, thanks for the help. I kinda wrote my own diff for views display. It's for admin use only so performance isn't my concern. If anyone is interested I'll post the code. It doesn't work as well as the real diff module but I needed a quick visual of all revisions on one page.
This is for views php module:
Comment #6
rdeboerThat's pretty impressive kingdee!
Comment #7
rdeboerAdded reference to this issue to the project page. Thanks again kingdee!