1fd0342fc154799fabba28bc65b173842756af53

Author: AD7six

Date: 2009-04-04 13:29:27 +0200

adding direct approve/direct links to the public revision view This allows faster approvals by going directly from the pending revisions rss into the review process

diff --git a/views/revisions/view.ctp b/views/revisions/view.ctp index c2c2d56..c65203a 100644 --- a/views/revisions/view.ctp +++ b/views/revisions/view.ctp @@ -9,7 +9,43 @@ foreach ($data as $key => $row) { } if (count($compare) > 1) { echo '<h2>' . __('Differences', true) . '</h2>'; - echo $diff->compare(h($compare[0]), h($compare[1])); + echo $diff->compare(h($compare[1]), h($compare[0])); } -?> +?><cake:nocache><?php +if ($session->read('Auth.User.Level') == ADMIN) { + $menu->add(array( + 'section' => 'This Revision', + 'title' => 'Admin view', + 'url' => am(array('admin' => true, 'action' => 'view'), $this->passedArgs) + )); + if ($row['Revision']['node_id']) { + $menu->add(array( + 'section' => 'This Revision', + 'title' => 'See History', + 'url' => am(array('admin' => true, 'action' => 'history'), $this->passedArgs) + )); + } + $menu->add(array( + 'section' => 'This Revision', + 'title' => 'Edit', + 'url' => am(array('admin' => true, 'action' => 'edit'), $this->passedArgs) + )); + if ($row['Revision']['status'] == 'pending') { + $menu->add(array( + 'title' => 'Approve', + 'url' => am(array('admin' => true, 'action' => 'approve'), $this->passedArgs), + 'class' => 'dialogs' + )); + $menu->add(array( + 'title' => 'Reject', + 'url' => am(array('admin' => true, 'action' => 'reject'), $this->passedArgs), + 'class' => 'dialogs' + )); + $menu->add(array( + 'title' => 'Ignore', + 'url' => am(array('admin' => true, 'action' => 'ignore'), $this->passedArgs) + )); + } +} +?></cake:nocache> </div> \ No newline at end of file