I want to disable/theme printed current revision of node below Diff comparison table. Currently it's hardcoded in the end of diff_diffs_show():

$output .= node_view($new_node, FALSE, FALSE, FALSE);
return $output;

While it would be probably possible to break in via hook_nodeapi() it seems to me wrong, like correcting one bad behavior using another bad behavior. How about inserting checkbox to enable/disable output, or even better, output whole diff page using theme function so it's overridable ?

I can explain use case for this: currently I am making Panels integration for Revisioning module, and it will be possible to output revision using Panel Page. Next step would be to display node below Diff table using Panels too, or atleast to hide it completely, cause I need to have consistent theming both in "view revision" page and Diff page. I don't want to make template just for that Diff page.

Also, next step would be possible if Diff was fixed: It would be possible to implement "Compare two revisions" CTools content type that would take 2 arguments (2 "contexts") and output diff compare table in Panel Pane. But currently output of diff_diffs_show() is too big and not convenient for using in Panel Pane.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

crea’s picture

Title: Make diff comparison page modular / themable / configurable » Make diff comparison page themable

Making it themable would be enough..

blakehall’s picture

Attached is a patch with makes the entire page themeable, allowing you to override the particular call to node_view and alter the table / add help text.

Taxoman’s picture

Version: 6.x-2.x-dev » 7.x-1.x-dev
realityloop’s picture

Version: 7.x-1.x-dev » 7.x-2.x-dev
Status: Active » Postponed (maintainer needs more info)

blakehall what version was your patch for?

Alan D.’s picture

Status: Postponed (maintainer needs more info) » Needs work

There is really far too much business logic in the theme callback, so can you split this out into a preprocess please and re-roll against 7.x-2.x.

Alan D.’s picture

I'm using theme suggestions for all tables and the first two should be using indexed arrays for all rows if you need to pull out this data:

table__diff__preview << On View changes
table__diff__standard << standard comparison page. There is an admin setting to disable preview, so this has everything that is accessable
table__diff__revisions << the form

I can not patch against 7.x-2.x with the work that I am doing, so I either really need git access to push out a 7.x-3.x branch or you can find this in the sandbox project (Diff developmental version 7.x-2.x branch).

Alan D.’s picture

Status: Needs work » Fixed

This should be resolved with the new branch, 7.x-3.0-alpha1 or 7.x-3.0-dev.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.