Beispiel #1
0
 /**
  *  Show the list of campaigns.
  */
 function listCampaigns()
 {
     if (isset($this->viewList[$this->view])) {
         return call_user_func_array($this->viewList[$this->view], array(&$this));
     }
     $pageNum = (int) edkURI::getArg('page');
     switch ($this->view) {
         case '':
             $activelist = new ContractList();
             $activelist->setActive('yes');
             $this->page->setTitle('Active campaigns');
             $table = new ContractListTable($activelist);
             $table->paginate(10, $pageNum);
             return $table->generate();
             break;
         case 'past':
             $pastlist = new ContractList();
             $pastlist->setActive('no');
             $this->page->setTitle('Past campaigns');
             $table = new ContractListTable($pastlist);
             $table->paginate(10, $pageNum);
             return $table->generate();
             break;
     }
     return $html;
 }
 function campaigns()
 {
     // Display campaigns, if any.
     if (Killboard::hasCampaigns(true)) {
         $html = '';
         $html .= "<div class=\"kb-campaigns-header\">Active campaigns</div>";
         $list = new ContractList();
         $list->setActive("yes");
         $list->setCampaigns(true);
         $table = new ContractListTable($list);
         $html .= $table->generate();
         return $html;
     }
 }
Beispiel #3
0
 /**
  * Returns HTML string for campaigns, if any.
  * @return string HTML string for campaigns, if any
  */
 function campaigns()
 {
     // Display campaigns, if any.
     if (Killboard::hasCampaigns(true) && $this->isCurrentPeriod()) {
         $html = "<div class='kb-campaigns-header'>Active campaigns</div>";
         $list = new ContractList();
         $list->setActive("yes");
         $table = new ContractListTable($list);
         $html .= $table->generate();
         return $html;
     }
 }