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"'));
     }
 }