Beispiel #1
0
 public function init(RM_List_Object $list)
 {
     $this->_list = $list;
     $this->addItem(array('img' => '/img/report_settings.gif', 'alt' => L('menu.main.user_sort', array('menu_name' => L($list->menuCaption()))), 'url' => '#', 'extra' => ' onclick="getSortUser(\'' . $list->id() . '\');" '));
     $this->addSeparator();
     if ($this->_list->excelAvailable() && MC('List')->canLoadToExcel($list->id())) {
         $url = @$_SERVER['SERVER_PORT'] == 443 ? U('report.https_excel') : U('report.excel');
         $url .= '?' . $_SERVER['QUERY_STRING'];
         $this->addItem(array('url' => $url, 'img' => '/img/toexcel.gif', 'alt' => L('report.toexcel')));
         if (!$list->mailingAvailable()) {
             $this->addSeparator();
         }
     }
     if ($list->mailingAvailable()) {
         $q['mailing'] = 1;
         $url = url($q, 'abs');
         $this->addItem(array('url' => $url, 'img' => '/img/plan.gif', 'alt' => L('report.mailing')));
         $this->addSeparator();
     }
     $this->addButtonNoFilter(array('alt' => L('report.reset_filter'), 'extra' => 'onclick="clearForm(\'filterForm\'); return false;"'));
     $this->addButtonFilter(array('alt' => L('report.filter'), 'extra' => 'onclick="startSearch();  return false;"'));
     if ($this->_list->edit_script) {
         if (count($this->_toHtml) > 4) {
             $this->addSeparator();
         }
         $this->addItem(array('img' => '/img/save.gif', 'alt' => L('common.save'), 'extra' => 'class="edit_script"'));
     }
 }
Beispiel #2
0
 public function getRowHighlight(RM_List_Object $list, RM_List_Row $row)
 {
     switch ($list->id()) {
         case 15:
             # TODO: Перенести в декоратор!
             return $row->ssl_only ? 'row_pink' : '';
             break;
         default:
             return $this->decorator($list->id())->getRowHighlight($row);
             break;
     }
 }
Beispiel #3
0
 /**
  *	Remove usergroup from access list of this report
  *
  *	@return bool
  **/
 public function removeGroupAccess(RM_Account_iGroup $obGroup, RM_List_Object $obList)
 {
     return M('Db')->exec("DELETE FROM " . $this->_tables['access'] . " WHERE list_id = ? AND group_id = ?", $obList->id(), $obGroup->id());
 }