예제 #1
0
 public function createMailQueue()
 {
     $ds = new Am_Query($this->getDi()->mailQueueTable);
     $ds->setOrder('added', true);
     $g = new Am_Grid_Editable('_mail', ___("E-Mail Queue"), $ds, $this->getRequest(), $this->view);
     $g->setPermissionId(Am_Auth_Admin::PERM_LOGS_MAIL);
     $g->addField(new Am_Grid_Field('recipients', ___('Recipients'), true, '', null, '20%'));
     $g->addField(new Am_Grid_Field_Date('added', ___('Added'), true));
     $g->addField(new Am_Grid_Field_Date('sent', ___('Sent'), true));
     $g->addField(new Am_Grid_Field('subject', ___('Subject'), true, '', null, '30%'))->setRenderFunction(array($this, 'renderSubject'));
     $body = new Am_Grid_Field_Expandable('body', ___('Mail'), true, '', null, '20%');
     $body->setEscape(true);
     $body->setGetFunction(array($this, 'renderMail'));
     $g->addField($body);
     $g->setFilter(new Am_Grid_Filter_Text(___("Filter by subject or recepient"), array('subject' => 'LIKE', 'recipients' => 'LIKE')));
     $g->actionsClear();
     $g->actionAdd(new Am_Grid_Action_MailRetry('retry'));
     if ($this->getDi()->authAdmin->getUser()->isSuper()) {
         $g->actionAdd(new Am_Grid_Action_Delete());
         $g->actionAdd(new Am_Grid_Action_Group_Delete());
     }
     return $g;
 }
 public function createMailQueue()
 {
     $ds = new Am_Query($this->getDi()->mailQueueTable);
     $ds->setOrder('added', true);
     $g = new Am_Grid_ReadOnly('_mail', ___("E-Mail Queue"), $ds, $this->getRequest(), $this->view);
     $g->addGridField(new Am_Grid_Field('recipients', ___('Recipients'), true, '', null, '20%'));
     $g->addGridField(new Am_Grid_Field('added', ___('Added'), true, '', array($this, 'renderTimestamp'), '15%'));
     $g->addGridField(new Am_Grid_Field('sent', ___('Sent'), true, '', array($this, 'renderTimestamp'), '15%'));
     $g->addGridField(new Am_Grid_Field('subject', ___('Subject'), true, '', null, '30%'))->setRenderFunction(array($this, 'renderSubject'));
     $body = new Am_Grid_Field_Expandable('body', ___('Mail'), true, '', null, '20%');
     $body->setEscape(true);
     $body->setGetFunction(array($this, 'renderMail'));
     $g->addGridField($body);
     $g->setFilter(new Am_Grid_Filter_Text(___("Filter by subject or recepient"), array('subject' => 'LIKE', 'recipients' => 'LIKE')));
     return $g;
 }