When the revisioning block is enabled, it's title shows the current number of pending revisions. But by clicking this title I am taken to the 'Published' tab instead of the 'Pending' which would be logical to me since I clicked on somthing like '7 revisions pending'.

In revisioning_theme.inc (line 257+) this can be altered by extending the given path:

Change:

  $block = array();
  $block['subject'] = l(t('!num_revisions pending', 
    array('!num_revisions' => format_plural(count($nodes), '1 revision', '@count revisions'))), 
    'accessible-content/i-can-edit');

To:

  $block = array();
  $block['subject'] = l(t('!num_revisions pending', 
    array('!num_revisions' => format_plural(count($nodes), '1 revision', '@count revisions'))), 
    'accessible-content/i-can-edit/pending');

If this might conflict with permissions not properly set (as I read from handbook, for module_grant 'published tab' and 'I last modified tab' have to be enabled to get the accessible content page to work, 'pending tab' comes from revisioning module and is optional), one might include a permission check:

  if ( user_access('access Pending tab') ) {
    $block_subject_link = 'accessible-content/i-can-edit/pending';
  }
  else {
    $block_subject_link = 'accessible-content/i-can-edit';
  }
  $block = array();
  $block['subject'] = l(t('!num_revisions pending', 
    array('!num_revisions' => format_plural(count($nodes), '1 revision', '@count revisions'))), 
    $block_subject_link);

Best regards,
sin

BTW: Rik, you rock! I'm serious, revisioning is one of the major features I was missing from a decent content management system.

Comments

rdeboer’s picture

Thanks so much for your support and for your patch sin!
I think you're right on the money with your code snippet -- hope to include it soon.

BTW, in the latest repository version of Module Grants (development snapshot dated 11 Nov 09), I managed to get rid of the restriction that the user must have at least the 'access Published tab' and 'access I Last Modified tab' permissions. I did this by taking advantage of the Smart tabs module.
See the Latest features comments on the Module Grants project page.
Rik

rdeboer’s picture

Assigned: Unassigned » rdeboer
Status: Active » Fixed

Fixed.
Download the latest versions of both Module Grants (includes Module Grants Monitor), Revisioning (1-Jan-2010 or later) and Smart menus,Smart tabs.

The "pending revisions" block title now points to:
o accessible-content, if the Module Grants Monitor is enabled and the user has permissions to view the accessible-content tabs; the system remembers (via Smart tabs) the tab that was last selected; for a moderator this is most likely the In draft/Pending publication tab.
o admin/content/node otherwise

However....
The above can be overridden with any URL you like via the Block configuration page.

Status: Fixed » Closed (fixed)

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