Exemplo n.º 1
0
 protected function Form_Create()
 {
     parent::Form_Create();
     $this->pnlTab = new QTabs($this);
     $pnlDummy = new QPanel($this->pnlTab);
     $pnlDummy = new QPanel($this->pnlTab);
     $pnlDummy = new QPanel($this->pnlTab);
     $arrHeaders = array(NarroLink::ProjectList(t('Projects')), NarroLink::Translate(0, '', NarroTranslatePanel::SHOW_ALL, '', 0, 0, 10, 0, 0, t('Translate')), NarroLink::Translate(0, '', NarroTranslatePanel::SHOW_NOT_APPROVED, '', 0, 0, 10, 0, 0, t('Review')));
     /**
      * Do not show the langauge tab if only two languages are active (source and target
      * Unless the user is an administrator and might want to set another one active
      */
     if (NarroLanguage::CountAllActive() > 2 || QApplication::HasPermission('Administrator')) {
         $this->pnlLanguageList = new QTabs($this->pnlTab);
         new NarroLanguageListPanel($this->pnlLanguageList);
         $arrLangHeaders[] = t('List');
         if (QApplication::HasPermissionForThisLang('Can add language')) {
             $pnlDummy = new QPanel($this->pnlLanguageList);
             $arrLangHeaders[] = NarroLink::LanguageEdit(null, t('Add'));
         }
         $this->pnlLanguageList->Headers = $arrLangHeaders;
         $arrHeaders[] = t('Languages');
         $this->pnlTab->Selected = count($arrHeaders) - 1;
     }
     $pnlDummy = new QPanel($this->pnlTab);
     $arrHeaders[] = NarroLink::UserList('', t('Users'));
     $pnlDummy = new QPanel($this->pnlTab);
     $arrHeaders[] = NarroLink::RoleList(0, '', t('Roles'));
     if (QApplication::HasPermissionForThisLang('Administrator')) {
         $pnlDummy = new QPanel($this->pnlTab);
         $arrHeaders[] = NarroLink::Log('', t('Application Log'));
     }
     $this->pnlTab->Headers = $arrHeaders;
 }