示例#1
0
<?php

//STATUS: wip
namespace cd;

$session->requireSuperAdmin();
if (!$this->owner) {
    $this->owner = 'default';
}
switch ($this->owner) {
    case 'default':
        echo '<h1>Unhandled items in Moderation queue</h1>';
        $list = ModerationObject::getUnhandled();
        //d( $list );
        $dt = new YuiDatatable();
        $dt->addColumn('id', 'Id', 'link', 'a/moderation/handle/', 'name');
        $dt->addColumn('owner', 'Owner', 'link', 'a/user/', 'name');
        $dt->addColumn('type', 'Type', 'array', getModerationTypes());
        $dt->addColumn('time_created', 'Created');
        $dt->addColumn('data', 'Data');
        $dt->addColumn('reference', 'Reference');
        $dt->setDataSource($list);
        echo $dt->render();
        echo '<br/>';
        echo '&raquo; ' . ahref('a/moderation/approved', 'Show approved objects') . '<br/>';
        echo '&raquo; ' . ahref('a/moderation/denied', 'Show denied objects') . '<br/>';
        break;
    case 'approved':
        echo '<h1>Approved items in Moderation queue</h1>';
        $list = ModerationObject::getApproved();
        //d( $list );