<?php
require_once 'modules/admin/models/DashboardPlugin.php';

class PluginPendingItems extends DashboardPlugin
{
    
    var $hasTab = false;
    var $hasPanel = true;
    var $name = "Pending Items";
    var $description = "This allows you to view and take actions on pending items.";
    var $default = true;
    var $jsLibs = array('plugins/dashboard/pendingitems/PluginPendingItems.js',
                       );


    function getTab()
    {
        return '';
    }
    
    function getPanel()
    {
        // Set the plugin template
        $this->tpl->define(array('pendingitems' => '../../plugins/dashboard/pendingitems/PluginPendingItems.tpl'));

        $company = NE_Registry::getCompany();
        if ($company->supports('billing')) {
            $this->tpl->parse('optionsBilling2', 'optionsBilling2');
            $this->tpl->parse('optionsBilling3', 'optionsBilling3');
        }
        if ($company->supports('support')) {
            $this->tpl->parse('optionsSupport', 'optionsSupport');
            $this->tpl->parse('optionsSupport2', 'optionsSupport2');
        }
        if ($company->supports('accounts')) {
            $this->tpl->parse('optionsAccounts', 'optionsAccounts');
            $this->tpl->parse('optionsAccounts2', 'optionsAccounts2');
        }
        
        $selectedValue = 'autoclose';
        $this->tpl->setKey('selectedValue', $selectedValue);
        
        // Parse and output the whole template
        $this->tpl->parse('pendingitems_out', 'pendingitems');
        return $this->tpl->fetch('pendingitems_out');
    }
}

?>
