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


PHP SubPanel::setTemplateFile方法代码示例

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


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

示例1: loadSubpanel

    function loadSubpanel($module_name, $child_module)
    {
        $this->parent_module = $module_name;
        $this->child_module = $child_module;
        global $beanList, $beanFiles;
        $class = $beanList[$module_name];
        require_once $beanFiles[$class];
        require_once 'include/SubPanel/SubPanelDefinitions.php';
        $mod = new $class();
        $spd = new SubPanelDefinitions($mod);
        $spd->open_layout_defs(true);
        $panel = $spd->load_subpanel($child_module, true);
        $this->panel = $panel;
        $subpanel = new SubPanel($module_name, 'fab4', $child_module, $panel);
        $subpanel->setTemplateFile('include/SubPanel/SubPanelDynamic.html');
        $oldcontents = ob_get_contents();
        ob_clean();
        $subpanel->display();
        $this->curText = ob_get_contents();
        ob_clean();
        echo $oldcontents;
        $this->subpanel = $subpanel;
        $this->form = <<<EOQ
\t\t</form>
\t\t<form name='studio' method='POST'>
\t\t\t<input type='hidden' name='action' value='saveSubpanel'>
\t\t\t<input type='hidden' name='module' value='Studio'>
\t\t\t<input type='hidden' name='subpanel' value='{$child_module}'>
EOQ;
    }
开发者ID:BackupTheBerlios,项目名称:livealphaprint,代码行数:30,代码来源:SubpanelParser.php

示例2: SubPanelDefinitions

 function set_subpanel($module_name, $child_module)
 {
     $this->parent_module = $module_name;
     $this->child_module = $child_module;
     global $beanList, $beanFiles;
     $class = $beanList[$module_name];
     require_once $beanFiles[$class];
     require_once 'include/SubPanel/SubPanelDefinitions.php';
     $mod = new $class();
     $spd = new SubPanelDefinitions($mod);
     $spd->open_layout_defs(true);
     $panel = $spd->load_subpanel($child_module, true);
     $this->panel = $panel;
     $subpanel = new SubPanel($module_name, 'fab4', $child_module, $panel);
     $subpanel->setTemplateFile('include/SubPanel/SubPanelDynamic.html');
     ob_flush();
     ob_clean();
     $subpanel->display();
     $this->contents = ob_get_contents();
     ob_clean();
     $this->subpanel = $subpanel;
 }
开发者ID:BackupTheBerlios,项目名称:livealphaprint,代码行数:22,代码来源:SubPanelParser.php

示例3: display


//.........这里部分代码省略.........
            if ($div_display == 'none') {
                $opp_display = 'inline';
            } else {
                $opp_display = 'none';
            }
            if (!empty($this->layout_def_key)) {
                $layout_def_key = $this->layout_def_key;
            } else {
                $layout_def_key = '';
            }
            if (empty($this->show_tabs)) {
                $show_icon_html = SugarThemeRegistry::current()->getImage('advanced_search', 'border="0" align="absmiddle"', null, null, '.gif', translate('LBL_SHOW'));
                $hide_icon_html = SugarThemeRegistry::current()->getImage('basic_search', 'border="0" align="absmiddle"', null, null, '.gif', translate('LBL_HIDE'));
                $max_min = "<a name=\"{$tab}\"> </a><span id=\"show_link_" . $tab . "\" style=\"display: {$opp_display}\"><a href='#' class='utilsLink' onclick=\"current_child_field = '" . $tab . "';showSubPanel('" . $tab . "',null,null,'" . $layout_def_key . "');document.getElementById('show_link_" . $tab . "').style.display='none';document.getElementById('hide_link_" . $tab . "').style.display='';return false;\">" . "" . $show_icon_html . "</a></span>";
                $max_min .= "<span id=\"hide_link_" . $tab . "\" style=\"display: {$div_display}\"><a href='#' class='utilsLink' onclick=\"hideSubPanel('" . $tab . "');document.getElementById('hide_link_" . $tab . "').style.display='none';document.getElementById('show_link_" . $tab . "').style.display='';return false;\">" . "" . $hide_icon_html . "</a></span>";
                echo '<div id="subpanel_title_' . $tab . '"';
                if (empty($sugar_config['lock_subpanels']) || $sugar_config['lock_subpanels'] == false) {
                    echo ' onmouseover="this.style.cursor = \'move\';"';
                }
                echo '>' . get_form_header($thisPanel->get_title(), $max_min, false) . '</div>';
            }
            echo <<<EOQ
<div cookie_name="{$cookie_name}" id="subpanel_{$tab}" style="display:{$div_display}">
    <script>document.getElementById("subpanel_{$tab}" ).cookie_name="{$cookie_name}";</script>
EOQ;
            $display_spd = '';
            if ($div_display != 'none') {
                echo "<script>SUGAR.util.doWhen(\"typeof(markSubPanelLoaded) != 'undefined'\", function() {markSubPanelLoaded('{$tab}');});</script>";
                $old_contents = ob_get_contents();
                @ob_end_clean();
                ob_start();
                include_once 'include/SubPanel/SubPanel.php';
                $subpanel_object = new SubPanel($this->module, $_REQUEST['record'], $tab, $thisPanel, $layout_def_key);
                $subpanel_object->setTemplateFile('include/SubPanel/SubPanelDynamic.html');
                $subpanel_object->display();
                $subpanel_data = ob_get_contents();
                @ob_end_clean();
                ob_start();
                echo $this->get_buttons($thisPanel, $subpanel_object->subpanel_query);
                $buttons = ob_get_contents();
                @ob_end_clean();
                ob_start();
                echo $old_contents;
                //echo $buttons;
                $display_spd = $subpanel_data;
            }
            echo <<<EOQ
    <div id="list_subpanel_{$tab}">{$display_spd}</div>
</div>
EOQ;
            array_push($tab_names, $tab);
            echo '</li>';
        }
        // end $tabs foreach
        if ($showContainer) {
            echo '</ul>';
            if (!empty($selected_group)) {
                // closing table from tpls/singletabmenu.tpl
                echo '</td></tr></table>';
            }
        }
        // drag/drop code
        $tab_names = '["' . join($tab_names, '","') . '"]';
        global $sugar_config;
        if (empty($sugar_config['lock_subpanels']) || $sugar_config['lock_subpanels'] == false) {
            echo <<<EOQ
开发者ID:butschster,项目名称:sugarcrm_dev,代码行数:67,代码来源:SubPanelTiles.php

示例4: testOneToManyRelationshipModule2Modult

 /**
  * @group 53223
  */
 public function testOneToManyRelationshipModule2Modult()
 {
     $_REQUEST['relate_id'] = $this->parentAccount->id;
     $_REQUEST['relate_to'] = $this->relationship->getName();
     // create new account
     $objAccount = new Account();
     $objAccount->name = "AccountBug53223" . $_REQUEST['relate_to'] . time();
     $objAccount->save();
     SugarTestAccountUtilities::setCreatedAccount(array($objAccount->id));
     // Retrieve new data
     $this->parentAccount->retrieve($this->parentAccount->id);
     $objAccount->retrieve($objAccount->id);
     $this->parentAccount->load_relationship($this->relationship->getName());
     $objAccount->load_relationship($this->relationship->getName());
     // Getting data of subpanel of parent bean
     $_REQUEST['module'] = 'Accounts';
     $_REQUEST['action'] = 'DetailView';
     $_REQUEST['record'] = $this->parentAccount->id;
     $_SERVER['REQUEST_METHOD'] = 'GET';
     unset($GLOBALS['focus']);
     $subpanels = new SubPanelDefinitions($this->parentAccount, 'Accounts');
     $subpanelDef = $subpanels->load_subpanel($this->relationship->getName() . 'accounts_ida');
     $subpanel = new SubPanel('Accounts', $this->parentAccount->id, 'default', $subpanelDef);
     $subpanel->setTemplateFile('include/SubPanel/SubPanelDynamic.html');
     $subpanel->display();
     $actual = $this->getActualOutput();
     $this->assertContains($objAccount->name, $actual, 'Account name is not displayed in subpanel of parent account');
     ob_clean();
     // Getting data of subpanel of child bean
     $_REQUEST['module'] = 'Accounts';
     $_REQUEST['action'] = 'DetailView';
     $_REQUEST['record'] = $objAccount->id;
     $_SERVER['REQUEST_METHOD'] = 'GET';
     unset($GLOBALS['focus']);
     $subpanels = new SubPanelDefinitions($objAccount, 'Accounts');
     $subpanelDef = $subpanels->load_subpanel($this->relationship->getName() . 'accounts_ida');
     $subpanel = new SubPanel('Accounts', $objAccount->id, 'default', $subpanelDef);
     $subpanel->setTemplateFile('include/SubPanel/SubPanelDynamic.html');
     $subpanel->display();
     $actual = $this->getActualOutput();
     $this->assertNotContains($this->parentAccount->name, $actual, 'Parent account name is displayed in subpanel of child aaccount');
 }
开发者ID:delkyd,项目名称:sugarcrm_dev,代码行数:45,代码来源:Bug53223Test.php

示例5: empty

}
$subpanel = $_REQUEST['subpanel'];
$record = $_REQUEST['record'];
$module = $_REQUEST['module'];
$image_path = 'themes/' . $theme . '/images/';
if (empty($_REQUEST['inline'])) {
    insert_popup_header($theme);
}
//require_once('include/SubPanel/SubPanelDefinitions.php');
//require_once($beanFiles[$beanList[$_REQUEST['module']]]);
//$focus=new $beanList[$_REQUEST['module']];
//$focus->retrieve($record);
include 'include/SubPanel/SubPanel.php';
$layout_def_key = '';
if (!empty($_REQUEST['layout_def_key'])) {
    $layout_def_key = $_REQUEST['layout_def_key'];
}
$subpanel_object = new SubPanel($module, $record, $subpanel, null, $layout_def_key);
$subpanel_object->setTemplateFile('include/SubPanel/SubPanelDynamic.html');
if (!empty($_REQUEST['mkt_id']) && $_REQUEST['mkt_id'] != 'all') {
    // bug 32910
    $mkt_id = $_REQUEST['mkt_id'];
}
if (!empty($mkt_id)) {
    $subpanel_object->subpanel_defs->_instance_properties['function_parameters']['EMAIL_MARKETING_ID_VALUE'] = $mkt_id;
}
echo empty($_REQUEST['inline']) ? $subpanel_object->get_buttons() : '';
$subpanel_object->display();
if (empty($_REQUEST['inline'])) {
    insert_popup_footer($theme);
}
开发者ID:delkyd,项目名称:sugarcrm_dev,代码行数:31,代码来源:SubPanelViewer.php

示例6: SubPanelDefinitions

 function get_list_view_data()
 {
     global $app_strings;
     global $mod_strings;
     $field_list = $this->get_list_view_array();
     $bean = BeanFactory::getBean('xeBayOrders');
     $bean->retrieve($field_list['ID']);
     require_once 'include/SubPanel/SubPanelDefinitions.php';
     $subpanel_definitions = new SubPanelDefinitions($bean);
     $subpanel_definitions->layout_defs['subpanel_setup']['xebaytransactions']['subpanel_name'] = "ForOrderSimple";
     $thisPanel = $subpanel_definitions->load_subpanel("xebaytransactions");
     ob_start();
     include_once 'include/SubPanel/SubPanel.php';
     $subpanel_object = new SubPanel('xeBayOrders', $field_list['ID'], 'all', $thisPanel);
     $subpanel_object->setTemplateFile('modules/xeBayTransactions/SubPanelDynamic.html');
     $subpanel_object->display();
     $subpanel_data = ob_get_contents();
     @ob_end_clean();
     $order_details .= '<p style="margin: 8px 0px 8px 0px;">';
     $order_details .= $field_list['BUYER_USER_ID'];
     $order_details .= '</p>';
     $order_details .= $subpanel_data;
     $field_list['ORDER_DETAILS'] = $order_details;
     if (!empty($field_list['BUYER_CHECKOUT_MESSAGE'])) {
         $message = "<img alt='{$mod_strings['LBL_MESSAGE']}' style='padding: 0px 5px 0px 2px' border='0' onclick=\"SUGAR.util.getStaticAdditionalDetails(this,'";
         $message .= str_replace(array("&#039;"), array("\\'"), $field_list['BUYER_CHECKOUT_MESSAGE']);
         // $message .= $field_list['BUYER_CHECKOUT_MESSAGE'];
         $message .= "','<div style=\\'float:left\\'>{$mod_strings['LBL_MESSAGE']}</div><div style=\\'float: right\\'>";
         $closeVal = "false";
         $message .= "'," . $closeVal . ")\" src='" . SugarThemeRegistry::current()->getImageURL('AlertEmailTemplates.gif') . "' class='info'>";
         $field_list['BUYER_CHECKOUT_MESSAGE'] = $message;
     }
     if ($field_list['PRINT_STATUS']) {
         $field_list['PRINT_STATUS_ICON'] = "<img alt='Print status' border='0' src='" . SugarThemeRegistry::current()->getImageURL('Print_Email.gif') . "'>";
     }
     return $field_list;
 }
开发者ID:sunmo,项目名称:snowlotus,代码行数:37,代码来源:xeBayOrder.php

示例7: display

    function display($showContainer = true, $forceTabless = false)
    {
        global $layout_edit_mode, $sugar_version, $sugar_config, $current_user, $app_strings;
        if (isset($layout_edit_mode) && $layout_edit_mode) {
            return;
        }
        global $modListHeader;
        ob_start();
        echo '<script type="text/javascript" src="include/javascript/popup_parent_helper.js?s=' . $sugar_version . '&c=' . $sugar_config['js_custom_version'] . '"></script>';
        echo '<script type="text/javascript" src="include/SubPanel/SubPanelTiles.js?s=' . $sugar_version . '&c=' . $sugar_config['js_custom_version'] . '"></script>';
        ?>
<script>
if(document.DetailView != null && 
   document.DetailView.elements != null && 
   document.DetailView.elements.layout_def_key != null && 
   typeof document.DetailView.elements['layout_def_key'] != 'undefined'){
    document.DetailView.elements['layout_def_key'].value = '<?php 
        echo $this->layout_def_key;
        ?>
';
}
</script>
<?php 
        $tabs = array();
        $default_div_display = 'inline';
        if (!empty($sugar_config['hide_subpanels_on_login'])) {
            if (!isset($_SESSION['visited_details'][$this->focus->module_dir])) {
                setcookie($this->focus->module_dir . '_divs', '');
                unset($_COOKIE[$this->focus->module_dir . '_divs']);
                $_SESSION['visited_details'][$this->focus->module_dir] = true;
            }
            $default_div_display = 'none';
        }
        $div_cookies = get_sub_cookies($this->focus->module_dir . '_divs');
        //Display the group header. this section is executed only if the tabbed interface is being used.
        $current_key = '';
        if (!empty($this->show_tabs)) {
            require_once 'include/tabs.php';
            $tab_panel = new SugarWidgetTabs($tabs, $current_key, 'showSubPanel');
            echo get_form_header('Related', '', false);
            echo "<br />" . $tab_panel->display();
        }
        if (empty($_REQUEST['subpanels'])) {
            $selected_group = $forceTabless ? '' : $this->getSelectedGroup();
            $tabs = $this->getTabs($showContainer, $selected_group);
        } else {
            $tabs = explode(',', $_REQUEST['subpanels']);
        }
        $tab_names = array();
        if ($showContainer) {
            echo '<ul class="noBullet" id="subpanel_list">';
        }
        //echo "<li id='hidden_0' style='height: 5px' class='noBullet'>&nbsp;&nbsp;&nbsp;</li>";
        foreach ($tabs as $tab) {
            echo '<li class="noBullet" id="whole_subpanel_' . $tab . '">';
            //load meta definition of the sub-panel.
            $thisPanel = $this->subpanel_definitions->load_subpanel($tab);
            $display = 'none';
            $div_display = $default_div_display;
            $cookie_name = $tab . '_v';
            if (isset($div_cookies[$cookie_name])) {
                $div_display = $div_cookies[$cookie_name];
            }
            if (!empty($sugar_config['hide_subpanels'])) {
                $div_display = 'none';
            }
            if ($div_display == 'none') {
                $opp_display = 'inline';
            } else {
                $opp_display = 'none';
            }
            if (empty($this->show_tabs)) {
                global $theme;
                $theme_path = "themes/" . $theme . "/";
                $image_path = $theme_path . "images/";
                $show_icon_html = get_image($image_path . 'advanced_search', 'alt="' . translate('LBL_SHOW') . '" border="0 align="absmiddle""');
                $hide_icon_html = get_image($image_path . 'basic_search', 'alt="' . translate('LBL_HIDE') . '" border="0" align="absmiddle"');
                $max_min = "<a name=\"{$tab}\"> </a><span id=\"show_link_" . $tab . "\" style=\"display: {$opp_display}\"><a href='#' class='utilsLink' onclick=\"current_child_field = '" . $tab . "';showSubPanel('" . $tab . "');document.getElementById('show_link_" . $tab . "').style.display='none';document.getElementById('hide_link_" . $tab . "').style.display='';return false;\">" . "" . $show_icon_html . "</a></span>";
                $max_min .= "<span id=\"hide_link_" . $tab . "\" style=\"display: {$div_display}\"><a href='#' class='utilsLink' onclick=\"hideSubPanel('" . $tab . "');document.getElementById('hide_link_" . $tab . "').style.display='none';document.getElementById('show_link_" . $tab . "').style.display='';return false;\">" . "" . $hide_icon_html . "</a></span>";
                echo '<div id="subpanel_title_' . $tab . '"';
                if (empty($sugar_config['lock_subpanels']) || $sugar_config['lock_subpanels'] == false) {
                    echo ' onmouseover="this.style.cursor = \'move\';"';
                }
                echo '>' . get_form_header($thisPanel->get_title(), $max_min, false) . '</div>';
            }
            echo <<<EOQ
<div cookie_name="{$cookie_name}" id="subpanel_{$tab}" style="display:{$div_display}">
    <script>document.getElementById("subpanel_{$tab}" ).cookie_name="{$cookie_name}";</script>
EOQ;
            $display_spd = '';
            if ($div_display != 'none') {
                echo "<script>markSubPanelLoaded('{$tab}');</script>";
                $old_contents = ob_get_contents();
                @ob_end_clean();
                ob_start();
                include_once 'include/SubPanel/SubPanel.php';
                $subpanel_object = new SubPanel($this->module, $_REQUEST['record'], $tab, $thisPanel);
                $subpanel_object->setTemplateFile('include/SubPanel/SubPanelDynamic.html');
                $subpanel_object->display();
                $subpanel_data = ob_get_contents();
//.........这里部分代码省略.........
开发者ID:BackupTheBerlios,项目名称:livealphaprint,代码行数:101,代码来源:SubPanelTiles.php


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