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


PHP smarty_function_sugar_button函数代码示例

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


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

示例1: smarty_function_sugar_button_slider

/**
 * smarty_function_sugar_button
 * This is the constructor for the Smarty plugin.
 *
 * @param $params The runtime Smarty key/value arguments
 * @param $smarty The reference to the Smarty object used in this invocation
 */
function smarty_function_sugar_button_slider($params, &$smarty)
{
    if (empty($params['module'])) {
        $smarty->trigger_error("sugar_button_slider: missing required param (module)");
    } else {
        if (empty($params['buttons'])) {
            $smarty->trigger_error("sugar_button_slider: missing required param (buttons)");
        } else {
            if (empty($params['view'])) {
                $smarty->trigger_error("sugar_button_slider: missing required param (view)");
            }
        }
    }
    $module = $params['module'];
    $view = $params['view'];
    $buttons = $params['buttons'];
    $str = '';
    if (is_array($buttons)) {
        if (count($buttons) <= 2) {
            foreach ($buttons as $val => $button) {
                $str .= smarty_function_sugar_button(array('module' => $module, 'id' => $button, 'view' => $view), $smarty);
            }
        } else {
            $str = '<div id="buttonSlide" class="yui-module">';
            $str .= '<table border="0">';
            $str .= '<tr><td>';
            $str .= '<div class="yui-hd">';
            for ($i = 0; $i < 2; $i++) {
                $button = $buttons[$i];
                $str .= smarty_function_sugar_button(array('module' => $module, 'id' => $button, 'view' => $view), $smarty);
                $str .= ' ';
            }
            $str .= '</div></td>';
            $str .= '<td align="right"> <div class="yui-bd">';
            for ($i = 2; $i < count($buttons); $i++) {
                $button = $buttons[$i];
                $str .= smarty_function_sugar_button(array('module' => $module, 'id' => $button, 'view' => $view), $smarty);
                $str .= ' ';
            }
            $str .= '</div></td>';
            $str .= '</tr></table>';
        }
    }
    return $str;
}
开发者ID:MexinaD,项目名称:SuiteCRM,代码行数:52,代码来源:function.sugar_button_slider.php

示例2: unset

   <?php 
            }
        }
        unset($_from);
    } else {
        echo smarty_function_sugar_button(array('module' => $this->_tpl_vars['module'], 'id' => 'SAVE', 'view' => $this->_tpl_vars['view'], 'form_id' => $this->_tpl_vars['form_id'], 'location' => 'FOOTER', 'appendTo' => 'footer_buttons'), $this);
        ?>

<?php 
        echo smarty_function_sugar_button(array('module' => $this->_tpl_vars['module'], 'id' => 'CANCEL', 'view' => $this->_tpl_vars['view'], 'form_id' => $this->_tpl_vars['form_id'], 'location' => 'FOOTER', 'appendTo' => 'footer_buttons'), $this);
        ?>

<?php 
    }
    if (empty($this->_tpl_vars['form']['hideAudit']) || !$this->_tpl_vars['form']['hideAudit']) {
        echo smarty_function_sugar_button(array('module' => $this->_tpl_vars['module'], 'id' => 'Audit', 'view' => $this->_tpl_vars['view'], 'form_id' => $this->_tpl_vars['form_id'], 'appendTo' => 'footer_buttons'), $this);
        ?>

<?php 
    }
    echo smarty_function_sugar_action_menu(array('buttons' => $this->_tpl_vars['footer_buttons'], 'class' => 'fancymenu', 'flat' => true), $this);
    ?>

</div>
<?php 
}
?>
</form>
<?php 
if ($this->_tpl_vars['externalJSFile']) {
    ?>
开发者ID:isrealconsulting,项目名称:ic-suite,代码行数:31,代码来源:%%6C^6CE^6CEFC0A9%%footer.tpl.php

示例3: foreach

    }
    if (count($_from)) {
        foreach ($_from as $this->_tpl_vars['val'] => $this->_tpl_vars['button']) {
            ?>
      <?php 
            echo smarty_function_sugar_button(array('module' => $this->_tpl_vars['module'], 'id' => $this->_tpl_vars['button'], 'location' => 'FOOTER', 'view' => $this->_tpl_vars['view']), $this);
            ?>

   <?php 
        }
    }
    unset($_from);
} else {
    ?>
	<?php 
    echo smarty_function_sugar_button(array('module' => $this->_tpl_vars['module'], 'id' => 'SAVE', 'view' => $this->_tpl_vars['view']), $this);
    ?>

	<?php 
    echo smarty_function_sugar_button(array('module' => $this->_tpl_vars['module'], 'id' => 'CANCEL', 'view' => $this->_tpl_vars['view']), $this);
    ?>

<?php 
}
?>

<?php 
echo smarty_function_sugar_button(array('module' => $this->_tpl_vars['module'], 'id' => 'Audit', 'view' => $this->_tpl_vars['view']), $this);
?>

</div> 
开发者ID:augustosoto1991,项目名称:SuiteCRMGlamour,代码行数:31,代码来源:%%12^121^121A18F0%%footer.tpl.php

示例4: smarty_function_sugar_field

            echo smarty_function_sugar_field(array('parentFieldArray' => 'fields', 'vardef' => $this->_tpl_vars['fields'][$this->_tpl_vars['colData']['field']['name']], 'accesskey' => $this->_tpl_vars['ACCKEY'], 'displayType' => 'searchView', 'displayParams' => $this->_tpl_vars['colData']['field']['displayParams'], 'typeOverride' => $this->_tpl_vars['colData']['field']['type'], 'formName' => $this->_tpl_vars['form_name']), $this);
            ?>

   	<?php 
        }
        ?>
   	</td>
<?php 
    }
}
unset($_from);
?>
    {if $formData|@count >= $basicMaxColumns+1}
    </tr>
    <tr>
	<td colspan="{$searchTableColumnCount}">
    {else}
	<td class="sumbitButtons">
    {/if}
        <?php 
echo smarty_function_sugar_button(array('module' => $this->_tpl_vars['module'], 'id' => 'search', 'view' => 'searchView'), $this);
?>

	    <input tabindex='2' title='{$APP.LBL_CLEAR_BUTTON_TITLE}' onclick='SUGAR.searchForm.clear_form(this.form); return false;' class='button' type='button' name='clear' id='search_form_clear' value='{$APP.LBL_CLEAR_BUTTON_LABEL}'/>
        {if $HAS_ADVANCED_SEARCH}
	    &nbsp;&nbsp;<a id="advanced_search_link" onclick="SUGAR.searchForm.searchFormSelect('{$module}|advanced_search','{$module}|basic_search')" href="javascript:void(0);" accesskey="{$APP.LBL_ADV_SEARCH_LNK_KEY}" >{$APP.LNK_ADVANCED_SEARCH}</a>
	    {/if}
    </td>
	<td class="helpIcon" width="*"><img alt="Help" border='0' id="filterHelp" src='{sugar_getimagepath file="help-dashlet.gif"}'></td>
	</tr>
</table>
开发者ID:omusico,项目名称:SelkirkCRM,代码行数:31,代码来源:%%E6^E6C^E6CB51D1%%SearchFormGeneric.tpl.php

示例5: unset

            <?php 
                }
                ?>
        <?php 
            }
        }
        unset($_from);
        ?>
    <?php 
    }
    ?>
    <?php 
    if (empty($this->_tpl_vars['form']['hideAudit']) || !$this->_tpl_vars['form']['hideAudit']) {
        ?>
        <?php 
        echo smarty_function_sugar_button(array('module' => $this->_tpl_vars['module'], 'id' => 'Audit', 'view' => 'EditView', 'form_id' => 'formDetailView', 'appendTo' => 'detail_header_buttons'), $this);
        ?>

    <?php 
    }
}
?>

<form action="index.php" method="post" name="DetailView" id="formDetailView">
    <input type="hidden" name="module" value="{$module}">
    <input type="hidden" name="record" value="{$fields.id.value}">
    <input type="hidden" name="return_action">
    <input type="hidden" name="return_module">
    <input type="hidden" name="return_id">
    <input type="hidden" name="module_tab">
    <input type="hidden" name="isDuplicate" value="false">
开发者ID:kulaginds,项目名称:SugarCRMTest,代码行数:31,代码来源:%%E3^E32^E3280675%%header.tpl.php

示例6: testBuildSugarHtml

 public function testBuildSugarHtml()
 {
     $sugar_html = array('type' => 'submit', 'value' => '{$APP.LBL_CLOSE_AND_CREATE_BUTTON_TITLE}', 'htmlOptions' => array('title' => '{$APP.LBL_CLOSE_AND_CREATE_BUTTON_TITLE}', 'name' => 'button', 'class' => 'button', 'onclick' => 'this.form.isSaveFromDetailView.value=true; this.form.status.value=\'Held\'; this.form.action.value=\'Save\';this.form.return_module.value=\'Meetings\';this.form.isDuplicate.value=true;this.form.isSaveAndNew.value=true;this.form.return_action.value=\'EditView\'; this.form.isDuplicate.value=true;this.form.return_id.value=\'{$fields.id.value}\';'), 'template' => '{if $fields.status.value != "Held"}[CONTENT]{/if}');
     $expected_html = '{if $fields.status.value != "Held"}<input title="{$APP.LBL_CLOSE_AND_CREATE_BUTTON_TITLE}" name="button" class="button" onclick="var _form = document.getElementById(\'DetailView\');_form.isSaveFromDetailView.value=true; _form.status.value=\'Held\'; _form.action.value=\'Save\';_form.return_module.value=\'Meetings\';_form.isDuplicate.value=true;_form.isSaveAndNew.value=true;_form.return_action.value=\'EditView\'; _form.isDuplicate.value=true;_form.return_id.value=\'{$fields.id.value}\';_form.submit();" type="button" value="{$APP.LBL_CLOSE_AND_CREATE_BUTTON_TITLE}"/>{/if}';
     $params = array('module' => 'Accounts', 'view' => 'DetailView', 'id' => array('sugar_html' => $sugar_html), 'form_id' => 'DetailView');
     //Test for smarty_function_sugar_button for sugar_html
     $this->assertEquals($expected_html, smarty_function_sugar_button($params, $this->_smarty));
 }
开发者ID:delkyd,项目名称:sugarcrm_dev,代码行数:8,代码来源:FunctionSugarButtonTest.php


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