• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

PHP Sugar_Smarty类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了PHP中Sugar_Smarty的典型用法代码示例。如果您正苦于以下问题:PHP Sugar_Smarty类的具体用法?PHP Sugar_Smarty怎么用?PHP Sugar_Smarty使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



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

示例1: display

 /**
  * @see SugarView::display()
  */
 public function display()
 {
     $ss = new Sugar_Smarty();
     $ss->assign("MOD", $GLOBALS['mod_strings']);
     $ss->assign("MESSAGE", $GLOBALS['message']);
     echo $ss->fetch("modules/xeBaySellerLists/tpls/importfinal.tpl");
 }
开发者ID:sunmo,项目名称:snowlotus,代码行数:10,代码来源:view.importfinal.php


示例2: getImageHtml

function getImageHtml($focus, $name, $value, $view)
{
    if ('EditView' != $view && 'DetailView' != $view) {
        return "";
        // skip the rest of the method if another view calls this method
    }
    global $app_list_strings;
    $languageStrings = $app_list_strings["oqc"]["Services"];
    require_once 'include/Sugar_Smarty.php';
    //1.7.6 Workaround for image display without modifying htaccess file
    require_once 'include/oqc/common/Configuration.php';
    if (isset($focus->image_unique_filename)) {
        global $sugar_config;
        $conf = Configuration::getInstance();
        $oqc_uploadDir = $conf->get('fileUploadDir');
        $uploadDir = $oqc_uploadDir ? $oqc_uploadDir : $sugar_config['upload_dir'];
        if (file_exists($uploadDir . "th" . $focus->image_unique_filename)) {
            $imageurl = "oqc/GetImage.php?module=oqc_Product&id=th" . $focus->image_unique_filename;
        } else {
            $imageurl = "oqc/GetImage.php?module=oqc_Product&id=" . $focus->image_unique_filename;
        }
    } else {
        $imageurl = '';
    }
    $smarty = new Sugar_Smarty();
    $smarty->assign('image_url', $imageurl);
    $smarty->assign('languageStrings', $languageStrings);
    return $smarty->fetch('include/oqc/Products/Image.' . $view . '.html');
}
开发者ID:santara12,项目名称:OpenQuotesAndContracts,代码行数:29,代码来源:Image.php


示例3: template_groups_chooser

function template_groups_chooser(&$args)
{
    global $mod_strings, $js_loaded;
    $table_style = '';
    if (!empty($args['display'])) {
        $table_style = "display: " . $args['display'] . "\"";
    }
    $uparraow_big = SugarThemeRegistry::current()->getImage('uparrow_big', 'border="0" style="margin-bottom: 1px;"', null, null, '.gif', $mod_strings['LBL_SORT']);
    $downarrow_big = SugarThemeRegistry::current()->getImage('downarrow_big', 'border="0" style="margin-top: 1px;" ', null, null, '.gif', $mod_strings['LBL_SORT']);
    $leftarrow_big = SugarThemeRegistry::current()->getImage('leftarrow_big', 'border="0" style="margin-right: 1px;"', null, null, '.gif', $mod_strings['LBL_SORT']);
    $rightarrow_big = SugarThemeRegistry::current()->getImage('rightarrow_big', 'border="0" style="margin-left: 1px;"', null, null, '.gif', $mod_strings['LBL_SORT']);
    $smarty = new Sugar_Smarty();
    $smarty->assign('args', $args);
    $smarty->assign('js_loaded', $js_loaded);
    $smarty->assign('table_style', $table_style);
    $smarty->assign('uparraow_big', $uparraow_big);
    $smarty->assign('downarrow_big', $downarrow_big);
    $smarty->assign('leftarrow_big', $leftarrow_big);
    $smarty->assign('rightarrow_big', $rightarrow_big);
    $smarty->assign('table_style', $table_style);
    //echo $smarty->fetch("modules/Reports/templates/_template_groups_chooser.tpl");
    if ($js_loaded == false) {
        $js_loaded = true;
    }
    return $smarty->fetch("modules/Reports/templates/_template_groups_chooser.tpl");
}
开发者ID:jglaine,项目名称:sugar761-ent,代码行数:26,代码来源:templates_group_chooser.php


示例4: display

 function display()
 {
     $db = DBManagerFactory::getInstance();
     /* <<<<<<< HEAD
     		$sql = "SELECT p.id,p.first_name,p.last_name,p.dob FROM reg_patient p WHERE p.id not in (SELECT distinct pe.reg_patient_reg_encounterreg_patient_ida FROM `reg_patient_reg_encounter_c` pe, reg_encounter_cstm e WHERE pe.reg_patient_reg_encounterreg_encounter_idb=e.id_c AND e.next_pmp_review_due_c is not null) ORDER By p.last_name, p.first_name";
     ======= */
     $sql = "SELECT p.id,p.first_name,p.last_name,p.dob, rec.mrn_c AS mrn,(SELECT p1b.name provname FROM reg_provider p1b,reg_provider_reg_patient_c p2b WHERE p2b.reg_provider_reg_patientreg_provider_ida = p1b.id AND p2b.reg_provider_reg_patientreg_patient_idb = p.id AND p2b.deleted =0)provname FROM reg_patient p LEFT JOIN reg_patient_cstm rec ON rec.id_c = p.id WHERE p.id not in (SELECT distinct pe.reg_patient_reg_encounterreg_patient_ida FROM `reg_patient_reg_encounter_c` pe, reg_encounter_cstm e WHERE pe.reg_patient_reg_encounterreg_encounter_idb=e.id_c AND e.last_pmp_review_done_c is not null) ORDER By p.last_name, p.first_name";
     // >>>>>>> 3097a71433de82fec730df252659026274347e46
     $resultb = $db->query($sql, true);
     $final = array();
     while ($row = $db->fetchByAssoc($resultb)) {
         $final[] = $row;
     }
     $sql1 = "SELECT p.id, rec.mrn_c AS mrn,(SELECT p1b.name provname FROM reg_provider p1b,reg_provider_reg_patient_c p2b WHERE p2b.reg_provider_reg_patientreg_provider_ida = p1b.id AND p2b.reg_provider_reg_patientreg_patient_idb = p.id AND p2b.deleted =0)provname FROM reg_patient p LEFT JOIN reg_patient_cstm rec ON rec.id_c = p.id WHERE p.id not in (SELECT distinct pe.reg_patient_reg_encounterreg_patient_ida FROM `reg_patient_reg_encounter_c` pe, reg_encounter_cstm e WHERE pe.reg_patient_reg_encounterreg_encounter_idb=e.id_c AND e.last_pmp_review_done_c is not null) GROUP BY provname ORDER By p.last_name, p.first_name";
     $resultb1 = $db->query($sql1, true);
     $final1 = array();
     while ($row1 = $db->fetchByAssoc($resultb1)) {
         $final1[] = $row1;
     }
     $sugarSmarty = new Sugar_Smarty();
     $sugarSmarty->assign("data", $final);
     $sugarSmarty->assign("data1", $final1);
     $sugarSmarty->assign("title", "Patients who do not have PMP");
     $sugarSmarty->display('custom/modules/REG_Patient/tpls/Report1REG_Patient.tpl');
     //        parent::display();
 }
开发者ID:apikck,项目名称:REG_Patient,代码行数:26,代码来源:view.reports1.php


示例5: display

 /**
  * @see ViewQuickcreate::display()
  */
 public function display()
 {
     $userPref = $GLOBALS['current_user']->getPreference('email_link_type');
     $defaultPref = $GLOBALS['sugar_config']['email_default_client'];
     if ($userPref != '') {
         $client = $userPref;
     } else {
         $client = $defaultPref;
     }
     if ($client == 'sugar') {
         $eUi = new EmailUI();
         if (!empty($this->bean->id) && !in_array($this->bean->object_name, array('EmailMan'))) {
             $fullComposeUrl = "index.php?module=Emails&action=Compose&parent_id={$this->bean->id}&parent_type={$this->bean->module_dir}";
             $composeData = array('parent_id' => $this->bean->id, 'parent_type' => $this->bean->module_dir);
         } else {
             $fullComposeUrl = "index.php?module=Emails&action=Compose";
             $composeData = array('parent_id' => '', 'parent_type' => '');
         }
         $j_quickComposeOptions = $eUi->generateComposePackageForQuickCreate($composeData, $fullComposeUrl);
         $json_obj = getJSONobj();
         $opts = $json_obj->decode($j_quickComposeOptions);
         $opts['menu_id'] = 'dccontent';
         $ss = new Sugar_Smarty();
         $ss->assign('json_output', $json_obj->encode($opts));
         $ss->display('modules/Emails/templates/dceMenuQuickCreate.tpl');
     } else {
         $emailAddress = '';
         if (!empty($this->bean->id) && !in_array($this->bean->object_name, array('EmailMan')) && !is_null($this->bean->emailAddress)) {
             $emailAddress = $this->bean->emailAddress->getPrimaryAddress($this->bean);
         }
         echo "<script>document.location.href='mailto:{$emailAddress}';lastLoadedMenu=undefined;DCMenu.closeOverlay();</script>";
         die;
     }
 }
开发者ID:delkyd,项目名称:sugarcrm_dev,代码行数:37,代码来源:view.quickcreate.php


示例6: browse

 function browse()
 {
     $smarty = new Sugar_Smarty();
     global $mod_strings;
     $smarty->assign('mod_strings', $mod_strings);
     $smarty->assign('view_module', $this->module);
     $smarty->assign('view', $this->layout);
     if (!empty($_REQUEST['subpanel'])) {
         $smarty->assign('subpanel', $_REQUEST['subpanel']);
     }
     $stamps = array();
     global $timedate;
     $userFormat = $timedate->get_date_time_format();
     $page = !empty($_REQUEST['page']) ? $_REQUEST['page'] : 0;
     $count = $this->history->getCount();
     $ts = $this->history->getNth($page * $this->pageSize);
     $snapshots = array();
     for ($i = 0; $i <= $this->pageSize && $ts > 0; $i++) {
         $dbDate = $timedate->fromTimestamp($ts)->asDb();
         $displayTS = $timedate->to_display_date_time($dbDate);
         if ($page * $this->pageSize + $i + 1 == $count) {
             $displayTS = translate("LBL_MB_DEFAULT_LAYOUT");
         }
         $snapshots[$ts] = $displayTS;
         $ts = $this->history->getNext();
     }
     if (count($snapshots) > $this->pageSize) {
         $smarty->assign('nextPage', true);
     }
     $snapshots = array_slice($snapshots, 0, $this->pageSize, true);
     $smarty->assign('currentPage', $page);
     $smarty->assign('snapshots', $snapshots);
     $html = $smarty->fetch('modules/ModuleBuilder/tpls/history.tpl');
     echo $html;
 }
开发者ID:sysraj86,项目名称:carnivalcrm,代码行数:35,代码来源:view.history.php


示例7: getAdditionsHtml

function getAdditionsHtml($focus, $name, $value, $view)
{
    if ('EditView' != $view && 'DetailView' != $view) {
        return "";
        // skip the rest of the method if another view calls this method
    }
    global $mod_strings;
    global $app_list_strings;
    //2.2RC2 translation eroor fix
    $status_list = $app_list_strings["oqc_addition_status_dom"];
    $additions = $focus->getAdditions();
    foreach ($additions as &$addition) {
        $addition = $addition->toArray();
        if (isset($status_list[$addition['status']])) {
            $addition['status'] = $status_list[$addition['status']];
        }
    }
    global $sugar_version;
    $smarty = new Sugar_Smarty();
    $smarty->assign('additions', $additions);
    $smarty->assign($mod_strings);
    if (substr($sugar_version, 0, 1) == '6') {
        return $smarty->fetch('include/oqc/Additions/' . $view . '.html');
    } else {
        return $smarty->fetch('include/oqc/Additions/' . $view . '52.html');
    }
}
开发者ID:santara12,项目名称:OpenQuotesAndContracts,代码行数:27,代码来源:Additions.php


示例8: display

 function display()
 {
     $ss = new Sugar_Smarty();
     $ss->assign('lbl_campaign_name', translate('LBL_TOP_CAMPAIGNS_NAME', 'Campaigns'));
     $ss->assign('lbl_revenue', translate('LBL_TOP_CAMPAIGNS_REVENUE', 'Campaigns'));
     $ss->assign('top_campaigns', $this->top_campaigns);
     return parent::display() . $ss->fetch('modules/Campaigns/Dashlets/TopCampaignsDashlet/TopCampaignsDashlet.tpl');
 }
开发者ID:aldridged,项目名称:gtg-sugar,代码行数:8,代码来源:TopCampaignsDashlet.php


示例9: display

 function display()
 {
     global $app_strings, $current_user, $mod_strings, $theme;
     $smarty = new Sugar_Smarty();
     $type = !empty($_REQUEST['type']) ? $_REQUEST['type'] : 'main';
     $mbt = false;
     $admin = false;
     $mb = strtolower($type);
     $smarty->assign('TYPE', $type);
     $smarty->assign('app_strings', $app_strings);
     $smarty->assign('mod', $mod_strings);
     //Replaced by javascript function "setMode"
     switch ($type) {
         case 'studio':
             //$smarty->assign('ONLOAD','ModuleBuilder.getContent("module=ModuleBuilder&action=wizard")');
             require_once 'modules/ModuleBuilder/Module/StudioTree.php';
             $mbt = new StudioTree();
             break;
         case 'mb':
             //$smarty->assign('ONLOAD','ModuleBuilder.getContent("module=ModuleBuilder&action=package&package=")');
             require_once 'modules/ModuleBuilder/MB/MBPackageTree.php';
             $mbt = new MBPackageTree();
             break;
         case 'dropdowns':
             // $admin = is_admin($current_user);
             require_once 'modules/ModuleBuilder/Module/DropDownTree.php';
             $mbt = new DropDownTree();
             break;
         default:
             //$smarty->assign('ONLOAD','ModuleBuilder.getContent("module=ModuleBuilder&action=home")');
             require_once 'modules/ModuleBuilder/Module/MainTree.php';
             $mbt = new MainTree();
     }
     $smarty->assign('TEST_STUDIO', displayStudioForCurrentUser());
     $smarty->assign('ADMIN', is_admin($current_user));
     $smarty->display('modules/ModuleBuilder/tpls/includes.tpl');
     if ($mbt) {
         $smarty->assign('TREE', $mbt->fetch());
         $smarty->assign('TREElabel', $mbt->getName());
     }
     $userPref = $current_user->getPreference('mb_assist', 'Assistant');
     if (!$userPref) {
         $userPref = "na";
     }
     $smarty->assign('userPref', $userPref);
     ///////////////////////////////////
     require_once 'include/SugarTinyMCE.php';
     $tiny = new SugarTinyMCE();
     $tiny->defaultConfig['width'] = 300;
     $tiny->defaultConfig['height'] = 300;
     $tiny->buttonConfig = "code,separator,bold,italic,underline,strikethrough,separator,justifyleft,justifycenter,justifyright,\n\t                         justifyfull,separator,forecolor,backcolor,\n\t                         ";
     $tiny->buttonConfig2 = "pastetext,pasteword,fontselect,fontsizeselect,";
     $tiny->buttonConfig3 = "";
     $ed = $tiny->getInstance();
     $smarty->assign("tiny", $ed);
     $smarty->display('modules/ModuleBuilder/tpls/index.tpl');
 }
开发者ID:sacredwebsite,项目名称:SuiteCRM,代码行数:57,代码来源:view.main.php


示例10: getAttachmentsHtml

function getAttachmentsHtml($focus, $name, $value, $view)
{
    if ('EditView' != $view && 'DetailView' != $view) {
        return "";
        // skip the rest of the method if another view calls this method
    }
    global $app_list_strings;
    $smarty = new Sugar_Smarty();
    if (isset($focus->attachmentsequence)) {
        $c = get_all_linked_attachment_revisions($focus->attachmentsequence);
        // smarty mit Werten befüllen
        $smarty->assign('attachments', buildAttachmentsArray($c));
    } else {
        $smarty->assign('attachments', array());
    }
    // setup the popup link
    $popup_request_data = array('call_back_function' => 'popup_return_document', 'field_to_name_array' => array("id" => "document_id", "document_name" => "document_name", "document_revision_id" => "document_revision_id", "category_id" => "document_category_id", "revision" => "revision"), 'passthru_data' => array('default_category' => $app_list_strings['document_subcategory_dom']['']));
    $revision_request_data = array('call_back_function' => 'revision_return_document', 'field_to_name_array' => array("id" => "document_id", "document_name" => "document_name", "document_revision_id" => "document_revision_id", "category_id" => "document_category_id", "revision" => "revision"), 'passthru_data' => array('default_category' => $app_list_strings['document_subcategory_dom']['']));
    $json = getJSONobj();
    $encoded_request_data = $json->encode($popup_request_data);
    $encoded_revision_request_data = $json->encode($revision_request_data);
    $languageStrings = $json->encode($app_list_strings["oqc"]["Attachments"]);
    $smarty->assign('moduleName', getCurrentModuleName());
    $smarty->assign('languageStringsAttachments', $languageStrings);
    $smarty->assign('open_popup_encoded_request_data', $encoded_request_data);
    $smarty->assign('create_popup_encoded_request_data', $encoded_request_data);
    $smarty->assign('upload_revision_encoded_request_data', $encoded_revision_request_data);
    $smarty->assign('initialFilter', "\"&deleted=0\"");
    // Todo: Hier nur Dokumente zulassen, die für Vertragsanhänge erlaubt sind
    return $smarty->fetch('include/oqc/Attachments/' . $view . '.html');
}
开发者ID:santara12,项目名称:OpenQuotesAndContracts,代码行数:31,代码来源:Attachments.php


示例11: testVarReplace

 public function testVarReplace()
 {
     $params = array('subject' => 'http://example.com/[email1]', 'use_curly' => false, 'fields' => array('email1' => array('function' => array('name' => 'getEmailAddressWidget', 'returns' => 'html'), 'value' => '<!-- html -->')));
     $bean = new Account();
     $bean->email1 = '[email protected]';
     $smarty = new Sugar_Smarty();
     $smarty->assign('bean', $bean);
     $output = smarty_function_sugar_replace_vars($params, $smarty);
     $this->assertContains($bean->email1, $output, 'Rendered string contains html markup.');
 }
开发者ID:delkyd,项目名称:sugarcrm_dev,代码行数:10,代码来源:Bug54203Test.php


示例12: display

 function display()
 {
     require_once "include/Expressions/Dependency.php";
     require_once "include/TemplateHandler/TemplateHandler.php";
     $th = new TemplateHandler();
     $depScript = $th->createDependencyJavascript(array('phone_office' => array('calculated' => true, "formula" => 'add(strlen($name), $employees)', "enforced" => true)), array(), "EditView");
     $smarty = new Sugar_Smarty();
     $smarty->assign("dependencies", $depScript);
     $smarty->display('modules/ExpressionEngine/tpls/cfTest.tpl');
 }
开发者ID:jglaine,项目名称:sugar761-ent,代码行数:10,代码来源:view.cfTest.php


示例13: display

 function display()
 {
     global $mod_strings, $app_strings;
     echo get_module_title('Connectors', $mod_strings['LBL_ADMINISTRATION_MAIN'], true);
     $sugar_smarty = new Sugar_Smarty();
     $sugar_smarty->assign('mod', $mod_strings);
     $sugar_smarty->assign('app', $app_strings);
     $sugar_smarty->assign('IMG', 'themes/default/images/');
     $sugar_smarty->display('modules/Connectors/tpls/administration.tpl');
 }
开发者ID:klr2003,项目名称:sourceread,代码行数:10,代码来源:view.connectorsettings.php


示例14: display

 function display()
 {
     global $current_user, $mod_strings;
     $smarty = new Sugar_Smarty();
     $mb = new MBPackage("packageCustom");
     $mod = $mb->getCustomModules();
     $modules = array();
     $custom = array();
     if (is_array($mod)) {
         foreach ($mod as $key => $value) {
             $modules[] = $key;
             $custom[] = $value;
         }
     }
     $nb_mod = count($modules);
     $smarty->assign('mod_strings', $mod_strings);
     $smarty->assign('modules', $mod);
     $smarty->assign('custom', $custom);
     $smarty->assign('nb_mod', $nb_mod);
     $smarty->assign('defaultHelp', 'exportHelp');
     $smarty->assign('moduleList', $GLOBALS['app_list_strings']['moduleList']);
     $smarty->assign('moduleList', $GLOBALS['app_list_strings']['moduleList']);
     $ajax = new AjaxCompose();
     $ajax->addCrumb($mod_strings['LBL_STUDIO'], 'ModuleBuilder.getContent("module=ModuleBuilder&action=wizard")');
     $ajax->addSection('center', $mod_strings['LBL_EC_TITLE'], $smarty->fetch($this->getCustomFilePathIfExists('modules/ModuleBuilder/tpls/exportcustomizations.tpl')));
     echo $ajax->getJavascript();
 }
开发者ID:jglaine,项目名称:sugar761-ent,代码行数:27,代码来源:view.exportcustomizations.php


示例15: displayOptions

 public function displayOptions()
 {
     ob_start();
     global $current_language, $app_list_strings;
     $mod_strings = return_module_language($current_language, 'AOR_Reports');
     $optionsSmarty = new Sugar_Smarty();
     $optionsSmarty->assign('MOD', $mod_strings);
     $optionsSmarty->assign('id', $this->id);
     $optionsSmarty->assign('dashletTitle', $this->title);
     $optionsSmarty->assign('aor_report_id', $this->report->id);
     $optionsSmarty->assign('aor_report_name', $this->report->name);
     $optionsSmarty->assign('onlyCharts', $this->onlyCharts);
     $charts = array();
     if (!empty($this->report->id)) {
         foreach ($this->report->get_linked_beans('aor_charts', 'AOR_Charts') as $chart) {
             $charts[$chart->id] = $chart->name;
         }
     }
     $conditions = getConditionsAsParameters($this->report, $this->params);
     $optionsSmarty->assign('parameters', $conditions);
     $chartOptions = get_select_options_with_id($charts, $this->charts);
     $optionsSmarty->assign('chartOptions', $chartOptions);
     $optionsTemplate = get_custom_file_if_exists('modules/AOR_Reports/Dashlets/AORReportsDashlet/dashletConfigure.tpl');
     ob_clean();
     return $optionsSmarty->fetch($optionsTemplate);
 }
开发者ID:omusico,项目名称:suitecrm-docker,代码行数:26,代码来源:AORReportsDashlet.php


示例16: ViewDisplaydeploy

 function ViewDisplaydeploy()
 {
     $smarty = new Sugar_Smarty();
     $smarty->assign('package', $_REQUEST['name']);
     $smarty->assign('message', $GLOBALS['mod_strings']['LBL_DEPLOY_IN_PROGRESS']);
     $ajax = new AjaxCompose();
     $ajax->addCrumb($GLOBALS['mod_strings']['LBL_MODULEBUILDER'], 'ModuleBuilder.main("mb")');
     $ajax->addCrumb($_REQUEST['name'], 'ModuleBuilder.getContent("module=ModuleBuilder&action=package&package=' . $_REQUEST['name'] . '")');
     $ajax->addCrumb(translate('LBL_SECTION_DEPLOY', 'ModuleBuilder'), '');
     $ajax->addSection('center', translate('LBL_SECTION_DEPLOY', 'ModuleBuilder'), $smarty->fetch('modules/ModuleBuilder/tpls/MBPackage/deploy.tpl'));
     echo $ajax->getJavascript();
 }
开发者ID:klr2003,项目名称:sourceread,代码行数:12,代码来源:view.displaydeploy.php


示例17: display

 /**
  * Main display function.
  *
  * @return void
  */
 protected function display()
 {
     global $app_list_strings, $mod_strings, $locale;
     require_once 'modules/Studio/parsers/StudioParser.php';
     $dh = new DropDownHelper();
     $smarty = new Sugar_Smarty();
     $smarty->assign('MOD', $GLOBALS['mod_strings']);
     $title = getClassicModuleTitle($mod_strings['LBL_MODULE_NAME'], array("<a href='index.php?module=Administration&action=index'>" . $mod_strings['LBL_MODULE_NAME'] . "</a>", $mod_strings['LBL_RENAME_TABS']), false);
     $smarty->assign('title', $title);
     if (!empty($_REQUEST['dropdown_lang'])) {
         $selected_lang = $_REQUEST['dropdown_lang'];
     } else {
         $selected_lang = $locale->getAuthenticatedUserLanguage();
     }
     if ($selected_lang == $GLOBALS['current_language']) {
         $my_list_strings = $GLOBALS['app_list_strings'];
     } else {
         $my_list_strings = return_app_list_strings_language($selected_lang);
     }
     $selected_dropdown = $my_list_strings['moduleList'];
     $selected_dropdown_singular = $my_list_strings['moduleListSingular'];
     foreach ($selected_dropdown as $key => $value) {
         $singularValue = isset($selected_dropdown_singular[$key]) ? $selected_dropdown_singular[$key] : $value;
         if ($selected_lang != $_SESSION['authenticated_user_language'] && !empty($app_list_strings['moduleList']) && isset($app_list_strings['moduleList'][$key])) {
             $selected_dropdown[$key] = array('lang' => $value, 'user_lang' => '[' . $app_list_strings['moduleList'][$key] . ']', 'singular' => $singularValue, 'module' => 'module-' . mb_strtolower($key));
         } else {
             $selected_dropdown[$key] = array('lang' => $value, 'singular' => $singularValue, 'module' => 'module-' . mb_strtolower($key));
         }
     }
     $selected_dropdown = $dh->filterDropDown('moduleList', $selected_dropdown);
     $smarty->assign('dropdown', $selected_dropdown);
     $smarty->assign('dropdown_languages', get_languages());
     $buttons = array();
     $buttons[] = array('text' => $mod_strings['LBL_BTN_UNDO'], 'actionScript' => "onclick='jstransaction.undo()'");
     $buttons[] = array('text' => $mod_strings['LBL_BTN_REDO'], 'actionScript' => "onclick='jstransaction.redo()'");
     $buttons[] = array('text' => $mod_strings['LBL_BTN_SAVE'], 'actionScript' => "onclick='if(check_form(\"editdropdown\")){document.editdropdown.submit();}'");
     $buttonTxt = StudioParser::buildImageButtons($buttons);
     $smarty->assign('buttons', $buttonTxt);
     $smarty->assign('dropdown_lang', $selected_lang);
     $editImage = SugarThemeRegistry::current()->getImage('edit_inline', '');
     $smarty->assign('editImage', $editImage);
     $deleteImage = SugarThemeRegistry::current()->getImage('delete_inline', '');
     $smarty->assign('deleteImage', $deleteImage);
     $smarty->display("modules/Studio/wizards/RenameModules.tpl");
     if (!is_file(sugar_cached('jsLanguage/') . $GLOBALS['current_language'] . '.js')) {
         require_once 'include/language/jsLanguage.php';
         jsLanguage::createAppStringsCache($GLOBALS['current_language']);
     }
     if (!is_file(sugar_cached('jsLanguage/') . 'Studio' . '/' . $GLOBALS['current_language'] . '.js')) {
         require_once 'include/language/jsLanguage.php';
         jsLanguage::createModuleStringsCache('Studio', $GLOBALS['current_language']);
     }
 }
开发者ID:jglaine,项目名称:sugar761-ent,代码行数:58,代码来源:RenameModules.php


示例18: get_body

/**
 * Implement get_body function to correctly populate the template for the ModuleBuilder/Studio
 * Add field page.
 * 
 * @param Sugar_Smarty 	$ss
 * @param array 		$vardef
 *
 */
function get_body(&$ss, $vardef)
{
    global $app_list_strings, $mod_strings;
    $vars = $ss->get_template_vars();
    $fields = $vars['module']->mbvardefs->vardefs['fields'];
    $fieldOptions = array();
    foreach ($fields as $id => $def) {
        $fieldOptions[$id] = $def['name'];
    }
    $ss->assign('fieldOpts', $fieldOptions);
    return $ss->fetch('custom/modules/DynamicFields/templates/Fields/Forms/worklog.tpl');
}
开发者ID:hectorrios,项目名称:WorklogField,代码行数:20,代码来源:worklog.php


示例19: display

 function display()
 {
     require_once 'include/connectors/utils/ConnectorUtils.php';
     require_once 'include/connectors/sources/SourceFactory.php';
     global $mod_strings, $app_strings;
     $sugar_smarty = new Sugar_Smarty();
     $sugar_smarty->assign('mod', $mod_strings);
     $sugar_smarty->assign('APP', $app_strings);
     $connectors = ConnectorUtils::getConnectors(true);
     $sugar_smarty->assign('SOURCES', $connectors);
     echo get_module_title('Connectors', $mod_strings['LBL_MODIFY_MAPPING_PAGE_TITLE'], true);
     $sugar_smarty->display('modules/Connectors/tpls/modify_mapping.tpl');
 }
开发者ID:klr2003,项目名称:sourceread,代码行数:13,代码来源:view.modifymapping.php


示例20: display

 /**
  * @see SugarView::display()
  */
 public function display()
 {
     $offset = -1;
     $modules = array();
     if (!empty($_REQUEST['zoom'])) {
         $modules = array($_REQUEST['zoom']);
         if (isset($_REQUEST['offset'])) {
             $offset = $_REQUEST['offset'];
         }
     }
     $limit = !empty($GLOBALS['sugar_config']['max_spotresults_initial']) ? $GLOBALS['sugar_config']['max_spotresults_initial'] : 5;
     if ($offset !== -1) {
         $limit = !empty($GLOBALS['sugar_config']['max_spotresults_more']) ? $GLOBALS['sugar_config']['max_spotresults_more'] : 20;
     }
     $options = array('current_module' => $this->module, 'modules' => $modules);
     $searchEngine = SugarSearchEngineFactory::getInstance('', array(), true);
     $trimmed_query = trim($_REQUEST['q']);
     $rs = $searchEngine->search($trimmed_query, $offset, $limit, $options);
     $formattedResults = $this->formatSearchResultsToDisplay($rs, $offset, $trimmed_query);
     $query_encoded = urlencode($trimmed_query);
     $displayMoreForModule = $formattedResults['displayMoreForModule'];
     $displayResults = $formattedResults['displayResults'];
     $ss = new Sugar_Smarty();
     $ss->assign('displayResults', $displayResults);
     $ss->assign('displayMoreForModule', $displayMoreForModule);
     $ss->assign('appStrings', $GLOBALS['app_strings']);
     $ss->assign('appListStrings', $GLOBALS['app_list_strings']);
     $ss->assign('queryEncoded', $query_encoded);
     $ss->assign('test', "#bwc/index.php?module=Home&action=UnifiedSearch&search_form=false&advanced=false&query_string=" . $query_encoded);
     echo $ss->fetch(SugarAutoLoader::existingCustomOne('include/SearchForm/tpls/SugarSpot.tpl'));
 }
开发者ID:jglaine,项目名称:sugar761-ent,代码行数:34,代码来源:view.spot.php



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP Summit类代码示例发布时间:2022-05-23
下一篇:
PHP SugarView类代码示例发布时间:2022-05-23
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap