Would be nice if the "Pending revisions" block was a View, so that it could be customised. For example, I'd like to group the pending revisions by date, or change the title eg.

5 contributions
12 Apr 2014 (3 days ago)

  • New story node 10
  • New story node 20
  • New story node 30

13 Apr 2014 (2 days ago)

  • New story node 40
  • New story node 50

Comments

rdeboer’s picture

Status: Active » Closed (won't fix)

Hi iantresman,
You can easily create you own View based on either "Content" or "Content revisions".
Rik

iantresman’s picture

If anyone else finds this thread, I solved this using:

  • Filter:
    • Node: State = Pending
  • Fields:
    • Node: Updated date
    • Node revision: Title
  • Sort:
    • Node: Updated date asc

To add the number of revisions, I added the following PHP snippet (credit: seutje) to the header (Paging must be enabled):

<?php
// intentionally using a silly var name to avoid scoping issues
$my_view = views_get_current_view();
// again, avoiding scoping issues
$my_total = $my_view->total_rows;
// too lazy to do proper t('') with placeholder
print '<div align=center><b>' . $my_total . ' revisions pending</b></div>';
?>

To add the date grouping, I selected style HTML List, grouped with the field: Node: Updated date

rdeboer’s picture

Nice work!
For your code snippet you can also use the Revisioning API functions to return the number of pending revisions.