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


PHP ViewEdit::display方法代码示例

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


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

示例1: display

 function display()
 {
     require_once 'modules/ACLRoles/ACLRole.php';
     //Get the current user's role
     $objACLRole = new ACLRole();
     $roles = $objACLRole->getUserRoles($GLOBALS['current_user']->id);
     //check if they are in the Admin or Admin Manager's role
     if (in_array('Admin', $roles) || in_array('Branch Manager - Delhi', $roles)) {
         $this->ev->ss->assign('ReadOnly', '');
     } else {
         //If not pass in a variable with the value readonly
         $this->ev->ss->assign('ReadOnly', 'readonly');
     }
     //Call the parent display function
     parent::display();
 }
开发者ID:anmoldeep,项目名称:erp,代码行数:16,代码来源:view.edit.php

示例2: display

    function display()
    {
        global $app_list_strings;
        $json = getJSONobj();
        $prob_array = $json->encode($app_list_strings['sales_probability_dom']);
        $prePopProb = '';
        if (empty($this->bean->id) && empty($_REQUEST['probability'])) {
            $prePopProb = 'document.getElementsByName(\'sales_stage\')[0].onchange();';
        }
        $probability_script = <<<EOQ
\t<script>
\tprob_array = {$prob_array};
\tdocument.getElementsByName('sales_stage')[0].onchange = function() {
\t\t\tif(typeof(document.getElementsByName('sales_stage')[0].value) != "undefined" && prob_array[document.getElementsByName('sales_stage')[0].value]
\t\t\t&& typeof(document.getElementsByName('probability')[0]) != "undefined"
\t\t\t) {
\t\t\t\tdocument.getElementsByName('probability')[0].value = prob_array[document.getElementsByName('sales_stage')[0].value];
\t\t\t\tSUGAR.util.callOnChangeListers(document.getElementsByName('probability')[0]);

\t\t\t} 
\t\t};
\t{$prePopProb}
\t</script>
EOQ;
        $this->ss->assign('PROBABILITY_SCRIPT', $probability_script);
        parent::display();
    }
开发者ID:thsonvt,项目名称:sugarcrm_dev,代码行数:27,代码来源:view.edit.php

示例3: display

 public function display()
 {
     global $mod_strings;
     if ($_REQUEST['return_module'] == 'Project') {
         $project = new Project();
         $project->retrieve($_REQUEST['return_id']);
         //Get project resources (users & contacts)
         $resources1 = $project->get_linked_beans('project_users_1', 'User');
         $resources2 = $project->get_linked_beans('project_contacts_1', 'Contact');
         //sort into descending order
         ksort($resources1);
         ksort($resources2);
         echo "<script type='text/javascript'>";
         echo "var users = [];";
         echo "var contacts = [];";
         foreach ($resources1 as $user) {
             echo "var user = ['" . $user->id . "', '" . $user->name . "', 'User'];";
             echo "users.push(user);";
         }
         foreach ($resources2 as $contact) {
             echo "var user = ['" . $contact->id . "', '" . $contact->name . "', 'Contact'];";
             echo "contacts.push(user);";
         }
         echo "</script>";
     }
     parent::display();
 }
开发者ID:omusico,项目名称:suitecrm-docker,代码行数:27,代码来源:view.edit.php

示例4: display

 function display()
 {
     if (is_admin($GLOBALS['current_user'])) {
         $this->ss->assign('EDIT_REPORTS_TO', true);
     }
     parent::display();
 }
开发者ID:nerdystudmuffin,项目名称:dashlet-subpanels,代码行数:7,代码来源:view.edit.php

示例5: display

 public function display()
 {
     // Disable VCR Control
     $this->ev->showVCRControl = false;
     // Default Team as Global
     if (empty($this->bean->id) && !$this->ev->isDuplicate) {
         $this->bean->team_id = 1;
         $this->bean->team_set_id = 1;
     }
     // Load TinyMCE
     require_once 'include/SugarTinyMCE.php';
     $tiny = new SugarTinyMCE();
     $tiny->defaultConfig['apply_source_formatting'] = true;
     $tiny->defaultConfig['cleanup_on_startup'] = true;
     $tiny->defaultConfig['relative_urls'] = false;
     $tiny->defaultConfig['convert_urls'] = false;
     $ed = $tiny->getInstance('body_html');
     $this->ss->assign('tiny_script', $ed);
     // Load Fields for main module
     if (empty($this->bean->base_module)) {
         $modulesList = PdfManagerHelper::getAvailableModules();
         $this->bean->base_module = key($modulesList);
     }
     $fieldsForSelectedModule = PdfManagerHelper::getFields($this->bean->base_module, true);
     $this->ss->assign('fieldsForSelectedModule', $fieldsForSelectedModule);
     parent::display();
 }
开发者ID:jglaine,项目名称:sugar761-ent,代码行数:27,代码来源:view.edit.php

示例6: display

 function display()
 {
     $this->displayJSInclude();
     $this->setFields();
     parent::display();
     $this->displayJS();
 }
开发者ID:santara12,项目名称:advanced-opensales,代码行数:7,代码来源:view.edit.php

示例7: display

 /**
  * @see SugarView::display()
  */
 public function display()
 {
     global $json;
     $json = getJSONobj();
     $json_config = new json_config();
     if (isset($this->bean->json_id) && !empty($this->bean->json_id)) {
         $javascript = $json_config->get_static_json_server(false, true, 'Calls', $this->bean->json_id);
     } else {
         $this->bean->json_id = $this->bean->id;
         $javascript = $json_config->get_static_json_server(false, true, 'Calls', $this->bean->id);
     }
     $this->ss->assign('JSON_CONFIG_JAVASCRIPT', $javascript);
     if ($this->ev->isDuplicate) {
         $this->bean->status = $this->bean->getDefaultStatus();
     }
     //if
     $this->ss->assign('APPLIST', $GLOBALS['app_list_strings']);
     $repeatIntervals = array();
     for ($i = 1; $i <= self::MAX_REPEAT_INTERVAL; $i++) {
         $repeatIntervals[$i] = $i;
     }
     $this->ss->assign("repeat_intervals", $repeatIntervals);
     $fdow = $GLOBALS['current_user']->get_first_day_of_week();
     $dow = array();
     for ($i = $fdow; $i < $fdow + 7; $i++) {
         $dayIndex = $i % 7;
         $dow[] = array("index" => $dayIndex, "label" => $GLOBALS['app_list_strings']['dom_cal_day_short'][$dayIndex + 1]);
     }
     $this->ss->assign('dow', $dow);
     $this->ss->assign('repeatData', json_encode($this->view_object_map['repeatData']));
     parent::display();
 }
开发者ID:jglaine,项目名称:sugar761-ent,代码行数:35,代码来源:view.edit.php

示例8: display

 function display()
 {
     $this->bean->is_template = 1;
     $this->ev->ss->assign("is_template", 1);
     $this->ev->setModuleTitleKey('LBL_PROJECT_TEMPLATE');
     parent::display();
 }
开发者ID:klr2003,项目名称:sourceread,代码行数:7,代码来源:view.templatesedit.php

示例9: display

    function display()
    {
        parent::display();
        ?>
        <script>
            function update_parent_display(){
                var name_elem = document.getElementById("parent_category_name");
                var id_elem = document.getElementById("parent_category_id");
                var btn_elem = document.getElementById("btn_parent_category_name");
                var disable = document.getElementById("is_parent") && document.getElementById("is_parent").checked;
                if(name_elem){
                    name_elem.disabled = disable;
                }
                if(id_elem){
                    id_elem.disabled = disable;
                }
                if(btn_elem){
                    btn_elem.disabled = disable;
                }
                if(disable){
                    SUGAR.clearRelateField(this.form, 'parent_category_name', 'parent_category_id');
                }
            }
            document.getElementById("is_parent").onchange = update_parent_display;
            document.getElementById("is_parent").onchange();
        </script>

        <?php 
    }
开发者ID:NALSS,项目名称:SuiteCRM,代码行数:29,代码来源:view.edit.php

示例10: display

 function display()
 {
     require_once "custom/include/metrix/loadDynamicLists.php";
     //helper class to autopoluate the dropdowns
     require_once 'include/utils.php';
     global $current_user, $app_list_strings;
     /********************************************************************************************************/
     /*                                                   dynamic dd                                         */
     /********************************************************************************************************/
     $list = new loadDynamicLists();
     $domaine_c = $this->bean->domaine_c;
     $domaine_c = str_replace('^', '', $domaine_c);
     $selected = explode(',', $domaine_c);
     $dynamic_dd_fileds = array("pays_text_c" => array("tblname" => "ref_pays", "listname" => "pays_text_list", "field" => "nom"), "pays_iso2_c" => array("tblname" => "ref_pays", "listname" => "pays_iso2_c_list", "field" => "code"), "id_region_a_c" => array("tblname" => "ref_region", "listname" => "id_region_a_c_list", "field" => "nom"));
     ////special multi enum
     $dynamic_dd_fileds2 = array("domaine_c" => array("tblname" => "ref_discip", "listname" => "domaines_section_c_list", "field" => "Domaine", "field2" => "Discipline"));
     foreach ($dynamic_dd_fileds2 as $k => $v) {
         unset($app_list_strings[$v['listname']]);
         $edit_enum = $list->populate_list2($v['tblname'], $v['field'], $v['field2'], $selected);
     }
     foreach ($dynamic_dd_fileds as $k => $v) {
         unset($app_list_strings[$v['listname']]);
         $app_list_strings[$v['listname']] = $list->populate_list($v['tblname'], $v['field'], $v['pay']);
     }
     /********************************************************************************************************/
     /*                                                   Javascript                                         */
     /********************************************************************************************************/
     //echo $edit_enum['list_edit'];
     //if the orginisme is type_etablissement_c==faculte
     echo "\r\n\r\n\t\t\t<script>\r\n\t\t\t\t\r\n\t\t\t\t\$(document).ready(function()\r\n\t\t\t\t{     render();//init\r\n\t\t\t\t\t\$('#domaine_c').html('" . $edit_enum['list_edit'] . "');\r\n\r\n\t\t\t\t\t\$( '#type_etablissement_c' ).change(function() {                \r\n                      \r\n                      render();\r\n\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t  });\t\r\n\t\t\t\t});\r\n\r\n            //custom function\r\n            render = function(){\r\n\r\n            \tvar remove_fields =    \t['coda_name_c','coda_sname_c','prive_c','id_etat_c','date_effectif_c','date_maj_c','statut_c','commentaire2_c','code_hier_c','qualite_c','adhesion_c','sigle_c','historique','nb_etud_c','nb_ens_c','nb_cherch_c','rub_c','commentaire2_c','nb_etud_annee_obs_c','nb_ens_annee_obs_c','nb_cherch_annee_obs_c','chiffres_c'];//you can add the fields you want to hide here\r\n                       \r\n\r\n\t\t\t\t\t\t\$.each( remove_fields, function( key, value ) {\r\n                        var dd_val =\$( '#type_etablissement_c' ).val();\r\n\t\t                if(dd_val=='faculte'){\r\n\t\t                \t\$('#' + value ).hide();\r\n\t\t                \t\$('#' + value +'_label' ).css( 'color','white' );\r\n\t\t                \t\$('#date_effectif_c_date').parent().parent().hide();\r\n\t\t                \t\$('#date_maj_c_date').parent().parent().hide();\r\n\t\t                \t\$('#adhesion_c_date').parent().parent().hide();\r\n\t\t                \t\r\n\t\t                \t\r\n\t\t                \t\r\n\t\t                }\r\n\t\t\t\t\t\telse{\r\n\t\t\t\t\t\t\t\$('#' + value  ).show();\r\n\t\t\t\t\t\t\t\$('#' + value +'_label' ).show();\r\n\t\t\t\t\t\t\t\$('#' + value +'_label' ).css( 'color','black' );\r\n\t\t\t\t\t\t\t\$('#date_effectif_c_date').parent().parent().show();\r\n\t\t                \t\$('#date_maj_c_date').parent().parent().show();\r\n\t\t                \t\$('#adhesion_c_date').parent().parent().show();\r\n\t\t\t\t\t\t}\t\t\t\t\r\n\t\t\t\t\t\t});\r\n            }\r\n\r\n\t\t\t</script>";
     $this->ev->process();
     parent::display();
 }
开发者ID:auf,项目名称:crm_auf_org,代码行数:33,代码来源:view.edit.php

示例11: display

 public function display()
 {
     global $current_user, $current_language, $sugar_flavor, $sugar_config;
     if (!$current_user->is_admin) {
         sugar_die(translate("LBL_MUST_BE_ADMIN"));
     }
     //RemoveTabSave: let dashboard pass since we are still altering it
     if (isset($_REQUEST['action']) && $_REQUEST['action'] == 'RemoveTabSave') {
         if (isset($_REQUEST['TabToRemove'])) {
             $dashboardManager = BeanFactory::newBean("dash_DashboardManager");
             $dashboardManager->temp_unencoded_pages = $dashboardManager->deletePageByKey($_REQUEST['TabToRemove'], $current_user->getPreference('pages', 'Home'));
             $dashboardManager->temp_unencoded_dashlets = $current_user->getPreference('dashlets', 'Home');
             $dashboardManager->setDashboardForUser($current_user);
             $current_user->getPreference('pages', 'Home');
             $current_user->getPreference('dashlets', 'Home');
         }
     } elseif (isset($this->bean->fetched_row['id'])) {
         //set this dashboard for current user
         $this->bean->setDashboardForUser($current_user);
     } else {
         //set dashboard back to clean template
         $current_user->resetPreferences('Home');
     }
     parent::display();
     //get language for dashboard
     $mod_strings = return_module_language($current_language, 'Home');
     //render dashboard
     $lock_homepage = $sugar_config['lock_homepage'];
     $sugar_config['lock_homepage'] = false;
     require_once "modules/Home/index.php";
     $sugar_config['lock_homepage'] = $lock_homepage;
 }
开发者ID:omusico,项目名称:SelkirkCRM,代码行数:32,代码来源:view.edit.php

示例12: display

 public function display()
 {
     $GLOBALS['log']->info("JrMis_DepartmentsViewEdit.display");
     $GLOBALS['log']->debug("JrMis_DepartmentsViewEdit.display, bean_id: " . $this->bean->id);
     global $app_list_strings;
     $city_list = array();
     // if (!empty($this->bean->id))
     // {
     $this->bean->custom_fields->retrieve();
     $province_id = $this->bean->province_c;
     $max_id = $province_id + 9999;
     $GLOBALS['log']->debug("JrMis_DepartmentsViewEdit.display, privince_id: " . $province_id);
     $GLOBALS['log']->debug("JrMis_DepartmentsViewEdit.display, max_id: " . $max_id);
     foreach ($app_list_strings['jrmis_city_list'] as $id => $val) {
         if ($id > $province_id && $id <= $max_id) {
             $city_list[$id] = $val;
         }
     }
     // }
     // else
     // {
     //     $city_list[''] = '请选择省份';
     // }
     $GLOBALS['log']->debug("JrMis_DepartmentsViewEdit.display, city_list: " . print_r($city_list, TRUE));
     $this->ss->assign('CITY_LIST', $city_list);
     parent::display();
 }
开发者ID:jeffcao,项目名称:fzglsys_v5,代码行数:27,代码来源:view.edit.php

示例13: display

    function display()
    {
        global $mod_strings;
        parent::display();
        $javascript = <<<EOQ
EOQ;
        echo $javascript;
    }
开发者ID:sunmo,项目名称:snowlotus,代码行数:8,代码来源:view.edit.php

示例14: display

 /**
  * @see SugarView::display()
  */
 public function display()
 {
     if ($this->ev->isDuplicate) {
         $this->bean->status = $this->bean->getDefaultStatus();
     }
     //if
     parent::display();
 }
开发者ID:MexinaD,项目名称:SuiteCRM,代码行数:11,代码来源:view.edit.php

示例15: display

 function display()
 {
     $admin = Administration::getSettings();
     if (isset($admin->settings['portal_on']) && $admin->settings['portal_on']) {
         $this->ev->ss->assign("PORTAL_ENABLED", true);
     }
     parent::display();
 }
开发者ID:jglaine,项目名称:sugar761-ent,代码行数:8,代码来源:view.edit.php


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