当前位置: 首页>>代码示例>>PHP>>正文


PHP QPanel::GetControlHtml方法代码示例

本文整理汇总了PHP中QPanel::GetControlHtml方法的典型用法代码示例。如果您正苦于以下问题:PHP QPanel::GetControlHtml方法的具体用法?PHP QPanel::GetControlHtml怎么用?PHP QPanel::GetControlHtml使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在QPanel的用法示例。


在下文中一共展示了QPanel::GetControlHtml方法的12个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: GetControlHtml

 public function GetControlHtml()
 {
     $strLogContents = '';
     foreach (NarroLog::QueryArray(QQ::AndCondition(QQ::Equal(QQN::NarroLog()->ProjectId, $this->intProjectId), QQ::Equal(QQN::NarroLog()->LanguageId, $this->intLanguageId), QQ::GreaterThan(QQN::NarroLog()->Date, $this->dttStart))) as $objLogEntry) {
         switch ($objLogEntry->Priority) {
             case NarroLog::PRIORITY_INFO:
                 $strLogContents .= '<div class="info"';
                 break;
             case NarroLog::PRIORITY_WARN:
                 $strLogContents .= '<div class="warning"';
                 break;
             case NarroLog::PRIORITY_ERROR:
                 $strLogContents .= '<div class="error"';
                 break;
             default:
                 $strLogContents .= '<div';
         }
         $strLogContents .= sprintf('title="%s">%s</div>', $objLogEntry->Date, nl2br(NarroString::HtmlEntities($objLogEntry->Message)));
     }
     $this->strText = sprintf('<div class="ui-accordion ui-widget ui-helper-reset ui-accordion-icons">
             <h3 class="ui-accordion-header ui-helper-reset ui-state-default ui-state-active ui-corner-top">
             <span class="ui-icon ui-icon-triangle-1-s"></span>
             <a>%s</a>
             </h3>
             <div class="ui-accordion-content ui-helper-reset ui-widget-content ui-corner-bottom ui-accordion-content-active" style="max-height:300px;overflow:auto">
             %s
             </div>
             </div>', t('Operation log'), $strLogContents);
     return parent::GetControlHtml();
 }
开发者ID:Jobava,项目名称:narro,代码行数:30,代码来源:NarroLogViewerPanel.class.php

示例2: GetControlHtml

 protected function GetControlHtml()
 {
     if ($this->intTotal == 0) {
         $this->strText = t('Nothing to translate');
         return parent::GetControlHtml();
     }
     $intPercentTranslated = 0;
     $intPercentFuzzy = 0;
     $strText = sprintf(sprintf('<div class="graph" title="%s">', t('%d with suggestions, %d approved, %d untranslated, %d in total')), $this->intFuzzy, $this->intTranslated, $this->intTotal - $this->intFuzzy - $this->intTranslated, $this->intTotal);
     if ($this->intTranslated <= $this->intTotal) {
         if ($this->intTranslated > 0) {
             $intPercentTranslated = floor($this->intTranslated * 100 / $this->intTotal);
         } else {
             $intPercentTranslated = 0;
         }
         $strText .= sprintf('<img src="%s" width="%d" height="100%%" border="0" />', 'assets/images/green-bar.png', $intPercentTranslated);
         if ($this->intFuzzy > 0) {
             $intPercentFuzzy = ceil($this->intFuzzy * 100 / $this->intTotal);
         } else {
             $intPercentFuzzy = 0;
         }
         $strText .= sprintf('<img src="%s" width="%d" height="100%%" border="0" />', 'assets/images/orange-bar.png', $intPercentFuzzy);
     }
     if ($this->intTotal > $this->intFuzzy + $this->intTranslated) {
         $intPercentUntranslated = 100 - $intPercentFuzzy - $intPercentTranslated;
     } else {
         $intPercentUntranslated = 0;
     }
     $strText .= sprintf('<img src="%s" width="%d" height="100%%" border="0" />', 'assets/images/red-bar.png', $intPercentUntranslated);
     $strText .= sprintf(' %d%%</div>', $intPercentTranslated);
     $this->strText = $strText;
     return parent::GetControlHtml();
 }
开发者ID:Jobava,项目名称:narro,代码行数:33,代码来源:NarroTranslationProgressBar.class.php

示例3: GetControlHtml

 public function GetControlHtml()
 {
     $arrData = array();
     $arrToolTip = array();
     $intIndex = 1;
     if ($this->intTotal > 0) {
         $arrData[t('Others')] = 0;
         foreach ($this->arrData as $strLabel => $intCount) {
             if ($intCount > $this->intMinimumDataValue) {
                 if ($intIndex > $this->intMaxValues) {
                     $arrData[t('Others')] += round($intCount * 100 / $this->intTotal, 2);
                     $arrToolTip[t('Others')] = sprintf('%s (%d), ', t('Others'), $arrData[t('Others')]);
                 } else {
                     $arrData[$strLabel] = round($intCount * 100 / $this->intTotal, 2);
                     $arrToolTip[$strLabel] = sprintf('%s (%d)', $strLabel, $intCount);
                 }
                 $intIndex++;
             }
         }
     }
     if (isset($arrData[t('Others')]) && $arrData[t('Others')] == 0) {
         unset($arrData[t('Others')]);
         unset($arrToolTip[t('Others')]);
     }
     if (count($arrData)) {
         $strData = join(',', array_values($arrData));
         $strLabels = join('|', array_keys($arrData));
         $strTooltip = join(',', array_values($arrToolTip));
         $this->strText = sprintf('<img src="http://chart.apis.google.com/chart?cht=p&chd=t:%s&chs=%dx%d&chl=%s&chf=bg,s,65432100" alt="%s" title="%s" />', $strData, $this->strWidth, $this->strHeight, $strLabels, $strTooltip, $strTooltip);
     } else {
         $this->blnDisplay = false;
     }
     return parent::GetControlHtml();
 }
开发者ID:Jobava,项目名称:narro,代码行数:34,代码来源:QPieChart.class.php

示例4: GetControlHtml

 public function GetControlHtml()
 {
     $this->strText = '';
     if ($this->fileToUpload->Display) {
         $this->strText .= $this->fileToUpload->Render(false);
     }
     if ($this->btnImport->Display) {
         $this->strText .= $this->btnImport->Render(false);
     }
     return parent::GetControlHtml();
 }
开发者ID:Jobava,项目名称:narro,代码行数:11,代码来源:NarroFileImportPanel.class.php

示例5: GetControlHtml

 public function GetControlHtml()
 {
     /*			if ($this->objFileAsset) {
     				$this->strCssClass = 'FileAssetPanelItem';
     				$this->SetCustomStyle('background', 'url(' . $this->objFileAsset->ThumbnailUrl() . ') no-repeat');
     			} else {
     				$this->strCssClass = 'FileAssetPanelItemNone';
     				$this->SetCustomStyle('background', null);
     			}*/
     return parent::GetControlHtml();
 }
开发者ID:eliud254,项目名称:q-auction,代码行数:11,代码来源:QFileAssetBase.class.php

示例6: GetControlHtml

 public function GetControlHtml()
 {
     $this->strText = $this->pnlMainTab->Render(false);
     return parent::GetControlHtml();
 }
开发者ID:Jobava,项目名称:narro,代码行数:5,代码来源:NarroProjectTranslationTargetPanel.class.php

示例7: GetControlHtml

 public function GetControlHtml()
 {
     $this->strText = $this->btnExport->Render(false);
     return parent::GetControlHtml();
 }
开发者ID:Jobava,项目名称:narro,代码行数:5,代码来源:NarroFileExportPanel.class.php

示例8: GetControlHtml

 protected function GetControlHtml()
 {
     $strToReturn = parent::GetControlHtml();
     return $strToReturn;
 }
开发者ID:klucznik,项目名称:qcodo,代码行数:5,代码来源:QDialogBox.class.php

示例9: GetControlHtml

 public function GetControlHtml()
 {
     $this->strText = $this->pnlTranslationSource->Render(false);
     return parent::GetControlHtml();
 }
开发者ID:Jobava,项目名称:narro,代码行数:5,代码来源:NarroProjectTranslationSourcePanel.class.php

示例10: GetControlHtml

 public function GetControlHtml()
 {
     $strOutput = '<ul class="tabs-nav">';
     foreach ($this->arrTab as $intTabIndex => $objTabSection) {
         if ($this->strFloat == 'right') {
             $strLiCssClass = 'floatright ';
         } else {
             $strLiCssClass = '';
         }
         if (isset($this->arrTabUrl[$intTabIndex])) {
             $strOutput .= sprintf('<li class="%s"><a href="%s"><span>%s</span></a></li>', $strLiCssClass, $this->arrTabUrl[$intTabIndex], $this->arrTabTitle[$intTabIndex]);
         } else {
             $objLink = new QLinkButton($this);
             $objLink->Text = sprintf('<span>%s</span>', $this->arrTabTitle[$intTabIndex]);
             $objLink->HtmlEntities = false;
             $objLink->ActionParameter = $intTabIndex;
             if ($this->blnUseAjax) {
                 $objLink->AddAction(new QClickEvent(), new QAjaxControlAction($this, 'changeTab'));
             } else {
                 $objLink->AddAction(new QClickEvent(), new QServerControlAction($this, 'changeTab'));
             }
             if ($intTabIndex == $this->intSelectedTab) {
                 $strLiCssClass .= 'tabs-selected';
             }
             $strOutput .= sprintf('<li class="%s">%s</li>', $strLiCssClass, $objLink->Render(false));
         }
     }
     $strOutput .= '</ul>';
     foreach ($this->arrTab as $intTabIndex => $objTabSection) {
         if (!$objTabSection->CssClass) {
             $objTabSection->CssClass = 'tabs-container';
         }
         $objTabSection->Display = $this->intSelectedTab == $intTabIndex;
         try {
             $strOutput .= $objTabSection->Render(false);
         } catch (Exception $objEx) {
             throw $objEx;
         }
     }
     $this->strText = $strOutput;
     return parent::GetControlHtml();
 }
开发者ID:Jobava,项目名称:narro,代码行数:42,代码来源:QTabPanel.class.php

示例11: GetControlHtml

 protected function GetControlHtml()
 {
     $strOutput = $this->lblMessage->Render(false) . '<br /><table style="border: 1px solid #DDDDDD" cellpadding="4" cellspacing="0" width="100%">';
     foreach (NarroProject::$AvailablePreferences as $strName => $arrPref) {
         if ($arrPref['project_type'] && $arrPref['project_type'] != $this->objProject->ProjectType) {
             continue;
         }
         $this->lblMessage->Text = t('Here you can set your project preferences.');
         switch ($arrPref['type']) {
             case 'number':
                 $txtNumber = new QIntegerTextBox($this);
                 $txtNumber->Name = $strName;
                 $txtNumber->Minimum = 5;
                 $txtNumber->Maximum = 100;
                 $txtNumber->MaxLength = 3;
                 $txtNumber->Width = 50;
                 if ($arrPref['global']) {
                     $txtNumber->Enabled = QApplication::HasPermission('Can edit project', $this->objProject->ProjectId);
                 }
                 $txtNumber->Text = $this->objProject->GetPreferenceValueByName($strName);
                 $strOutput .= sprintf('<tr class="datagrid_row datagrid_even" style="height:40px"><td>%s:</td><td>%s</td><td style="font-size:-1">%s</td></tr>', t($strName), $txtNumber->RenderWithError(false), $arrPref['description'] ? t($arrPref['description']) : '');
                 $this->arrControls[$strName] = $txtNumber;
                 break;
             case 'text':
                 $txtTextPref = new QTextBox($this);
                 $txtTextPref->Name = $strName;
                 if ($arrPref['global']) {
                     $txtTextPref->Enabled = QApplication::HasPermission('Can edit project', $this->objProject->ProjectId);
                 }
                 $txtTextPref->Text = $this->objProject->GetPreferenceValueByName($strName);
                 $txtTextPref->Columns = strlen($txtTextPref->Text);
                 $strOutput .= sprintf('<tr class="datagrid_row datagrid_even" style="height:40px"><td>%s:</td><td>%s</td><td style="font-size:-1">%s</td></tr>', t($strName), $txtTextPref->RenderWithError(false), $arrPref['description'] ? t($arrPref['description']) : '');
                 $this->arrControls[$strName] = $txtTextPref;
                 break;
             case 'option':
                 $lstOption = new QListBox($this);
                 $lstOption->Name = $strName;
                 if ($arrPref['global']) {
                     $lstOption->Enabled = QApplication::HasPermission('Can edit project', $this->objProject->ProjectId);
                 }
                 foreach ($arrPref['values'] as $strValue) {
                     $lstOption->AddItem(t($strValue), $strValue, $strValue == $this->objProject->GetPreferenceValueByName($strName));
                 }
                 $strOutput .= sprintf('<tr class="datagrid_row datagrid_even" style="height:40px"><td>%s:</td><td>%s</td><td style="font-size:-1">%s</td></tr>', t($strName), $lstOption->RenderWithError(false), $arrPref['description'] ? t($arrPref['description']) : '');
                 $this->arrControls[$strName] = $lstOption;
                 break;
         }
     }
     $strOutput .= '</table><br />';
     $this->strText = $strOutput;
     return parent::GetControlHtml();
 }
开发者ID:Jobava,项目名称:narro,代码行数:52,代码来源:NarroProjectPreferencesPanel.class.php

示例12: GetControlHtml

 protected function GetControlHtml()
 {
     $strOutput = $this->lblMessage->Render(false) . '<br /><table style="border: 1px solid #DDDDDD" cellpadding="4" cellspacing="0" width="100%">';
     foreach (NarroUser::$AvailablePreferences as $strName => $arrPref) {
         switch ($arrPref['type']) {
             case 'number':
                 $txtNumber = new QIntegerTextBox($this);
                 $txtNumber->Name = $strName;
                 $txtNumber->Minimum = 5;
                 $txtNumber->Maximum = 100;
                 $txtNumber->MaxLength = 3;
                 $txtNumber->Width = 50;
                 $txtNumber->Text = $this->objUser->GetPreferenceValueByName($strName);
                 $strOutput .= sprintf('<tr class="datagrid_row datagrid_even" style="height:40px"><td>%s:</td><td>%s</td><td style="font-size:-1">%s</td></tr>', t($strName), $txtNumber->RenderWithError(false), t($arrPref['description']));
                 $this->arrControls[$strName] = $txtNumber;
                 break;
             case 'text':
                 $txtTextPref = new QTextBox($this);
                 $txtTextPref->Name = $strName;
                 $txtTextPref->Text = $this->objUser->GetPreferenceValueByName($strName);
                 if ($strName == 'Special characters') {
                     $strSelect = sprintf('<select onchange="document.getElementById(\'%s\').value+=this.options[this.selectedIndex].value;">', $txtTextPref->ControlId);
                     foreach (NarroDiacriticsPanel::$arrEntities as $strEntityName => $strEntityChar) {
                         $strSelect .= sprintf('<option value=" %s">%s (%s)', $strEntityName, $strEntityChar, $strEntityName);
                     }
                     $strSelect .= '</select>';
                     $arrPref['description'] = t($arrPref['description']) . $strSelect;
                     $txtTextPref->Width = 400;
                 } elseif ($strName == 'Other languages') {
                     $strSelect = sprintf('<select onchange="document.getElementById(\'%s\').value+= \' \' + this.options[this.selectedIndex].value;">', $txtTextPref->ControlId);
                     foreach (NarroLanguage::QueryArray(QQ::All(), QQ::Clause(QQ::OrderBy(QQN::NarroLanguage()->LanguageName))) as $objLanguage) {
                         $strSelect .= sprintf('<option value="%s">%s (%s)', $objLanguage->LanguageCode, t($objLanguage->LanguageName), $objLanguage->LanguageCode);
                     }
                     $strSelect .= '</select>';
                     $arrPref['description'] = t($arrPref['description']) . $strSelect;
                     $txtTextPref->Width = 400;
                 }
                 $strOutput .= sprintf('<tr class="datagrid_row datagrid_even" style="height:40px"><td>%s:</td><td>%s</td><td style="font-size:-1">%s</td></tr>', t($strName), $txtTextPref->RenderWithError(false), $arrPref['description']);
                 $this->arrControls[$strName] = $txtTextPref;
                 break;
             case 'option':
                 $lstOption = new QListBox($this);
                 $lstOption->Name = $strName;
                 if ($strName == 'Language') {
                     $arrLanguages = NarroLanguage::LoadAllActive(QQ::Clause(QQ::OrderBy(QQN::NarroLanguage()->LanguageName)));
                     foreach ($arrLanguages as $objLanguage) {
                         $lstOption->AddItem(t($objLanguage->LanguageName), $objLanguage->LanguageCode, $objLanguage->LanguageCode == $this->objUser->GetPreferenceValueByName($strName));
                     }
                 } elseif ($strName == 'Application language') {
                     $arrLanguages = NarroLanguage::QueryArray(QQ::All(), QQ::Clause(QQ::OrderBy(QQN::NarroLanguage()->LanguageName)));
                     foreach ($arrLanguages as $objLanguage) {
                         $lstOption->AddItem(t($objLanguage->LanguageName), $objLanguage->LanguageCode, $objLanguage->LanguageCode == $this->objUser->GetPreferenceValueByName($strName));
                     }
                 } else {
                     foreach ($arrPref['values'] as $strValue) {
                         $lstOption->AddItem(t($strValue), $strValue, $strValue == $this->objUser->GetPreferenceValueByName($strName));
                     }
                 }
                 $strOutput .= sprintf('<tr class="datagrid_row datagrid_even" style="height:40px"><td>%s:</td><td>%s</td><td style="font-size:-1">%s</td></tr>', t($strName), $lstOption->RenderWithError(false), t($arrPref['description']));
                 $this->arrControls[$strName] = $lstOption;
                 break;
         }
     }
     $strOutput .= '</table><br />';
     $strOutput .= $this->btnCancel->Render(false) . ' ' . $this->btnSave->Render(false);
     if ($this->txtPreviousUrl) {
         $strOutput .= ' ' . sprintf(t('Click <a href="%s">here</a> to return to the page you were.'), $this->txtPreviousUrl);
     }
     $this->strText = $strOutput;
     return parent::GetControlHtml();
 }
开发者ID:Jobava,项目名称:narro,代码行数:71,代码来源:preferences.php


注:本文中的QPanel::GetControlHtml方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。