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


PHP ProfileField::itemAlias方法代码示例

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


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

示例1: registerScript

 /**
  * Register Script
  */
 public function registerScript()
 {
     $basePath = Yii::getPathOfAlias('application.modules.user.views.asset');
     $baseUrl = Yii::app()->getAssetManager()->publish($basePath);
     $cs = Yii::app()->getClientScript();
     $cs->registerCoreScript('jquery');
     $cs->registerCssFile($baseUrl . '/css/redmond/jquery-ui.css');
     $cs->registerCssFile($baseUrl . '/css/style.css');
     $cs->registerScriptFile($baseUrl . '/js/jquery-ui.min.js');
     $cs->registerScriptFile($baseUrl . '/js/form.js');
     $cs->registerScriptFile($baseUrl . '/js/jquery.json.js');
     $widgets = self::getWidgets();
     $wgByTypes = ProfileField::itemAlias('field_type');
     foreach ($wgByTypes as $k => $v) {
         $wgByTypes[$k] = array();
     }
     foreach ($widgets[1] as $widget) {
         if (isset($widget['fieldType']) && count($widget['fieldType'])) {
             foreach ($widget['fieldType'] as $type) {
                 array_push($wgByTypes[$type], $widget['name']);
             }
         }
     }
     //echo '<pre>'; print_r($widgets[1]); die();
     $js = "\n\n\tvar name = \$('#name'),\n\tvalue = \$('#value'),\n\tallFields = \$([]).add(name).add(value),\n\ttips = \$('.validateTips');\n\t\n\tvar listWidgets = jQuery.parseJSON('" . str_replace("'", "\\'", CJavaScript::jsonEncode($widgets[0])) . "');\n\tvar widgets = jQuery.parseJSON('" . str_replace("'", "\\'", CJavaScript::jsonEncode($widgets[1])) . "');\n\tvar wgByType = jQuery.parseJSON('" . str_replace("'", "\\'", CJavaScript::jsonEncode($wgByTypes)) . "');\n\t\n\tvar fieldType = {\n\t\t\t'INTEGER':{\n\t\t\t\t'hide':['match','other_validator','widgetparams'],\n\t\t\t\t'val':{\n\t\t\t\t\t'field_size':10,\n\t\t\t\t\t'default':'0',\n\t\t\t\t\t'range':'',\n\t\t\t\t\t'widgetparams':''\n\t\t\t\t}\n\t\t\t},\n\t\t\t'VARCHAR':{\n\t\t\t\t'hide':['widgetparams'],\n\t\t\t\t'val':{\n\t\t\t\t\t'field_size':255,\n\t\t\t\t\t'default':'',\n\t\t\t\t\t'range':'',\n\t\t\t\t\t'widgetparams':''\n\t\t\t\t}\n\t\t\t},\n\t\t\t'TEXT':{\n\t\t\t\t'hide':['field_size','range','widgetparams'],\n\t\t\t\t'val':{\n\t\t\t\t\t'field_size':0,\n\t\t\t\t\t'default':'',\n\t\t\t\t\t'range':'',\n\t\t\t\t\t'widgetparams':''\n\t\t\t\t}\n\t\t\t},\n\t\t\t'DATE':{\n\t\t\t\t'hide':['field_size','field_size_min','match','range','widgetparams'],\n\t\t\t\t'val':{\n\t\t\t\t\t'field_size':0,\n\t\t\t\t\t'default':'0000-00-00',\n\t\t\t\t\t'range':'',\n\t\t\t\t\t'widgetparams':''\n\t\t\t\t}\n\t\t\t},\n\t\t\t'FLOAT':{\n\t\t\t\t'hide':['match','other_validator','widgetparams'],\n\t\t\t\t'val':{\n\t\t\t\t\t'field_size':'10.2',\n\t\t\t\t\t'default':'0.00',\n\t\t\t\t\t'range':'',\n\t\t\t\t\t'widgetparams':''\n\t\t\t\t}\n\t\t\t},\n\t\t\t'DECIMAL':{\n\t\t\t\t'hide':['match','other_validator','widgetparams'],\n\t\t\t\t'val':{\n\t\t\t\t\t'field_size':'10,2',\n\t\t\t\t\t'default':'0',\n\t\t\t\t\t'range':'',\n\t\t\t\t\t'widgetparams':''\n\t\t\t\t}\n\t\t\t},\n\t\t\t'BOOL':{\n\t\t\t\t'hide':['field_size','field_size_min','match','widgetparams'],\n\t\t\t\t'val':{\n\t\t\t\t\t'field_size':0,\n\t\t\t\t\t'default':0,\n\t\t\t\t\t'range':'1==" . UserModule::t('Yes') . ";0==" . UserModule::t('No') . "',\n\t\t\t\t\t'widgetparams':''\n\t\t\t\t}\n\t\t\t},\n\t\t\t'BLOB':{\n\t\t\t\t'hide':['field_size','field_size_min','match','widgetparams'],\n\t\t\t\t'val':{\n\t\t\t\t\t'field_size':0,\n\t\t\t\t\t'default':'',\n\t\t\t\t\t'range':'',\n\t\t\t\t\t'widgetparams':''\n\t\t\t\t}\n\t\t\t},\n\t\t\t'BINARY':{\n\t\t\t\t'hide':['field_size','field_size_min','match','widgetparams'],\n\t\t\t\t'val':{\n\t\t\t\t\t'field_size':0,\n\t\t\t\t\t'default':'',\n\t\t\t\t\t'range':'',\n\t\t\t\t\t'widgetparams':''\n\t\t\t\t}\n\t\t\t}\n\t\t};\n\t\t\t\n\tfunction showWidgetList(type) {\n\t\t\$('div.widget select').empty();\n\t\t\$('div.widget select').append('<option value=\"\">" . UserModule::t('No') . "</option>');\n\t\tif (wgByType[type]) {\n\t\t\tfor (var k in wgByType[type]) {\n\t\t\t\t\$('div.widget select').append('<option value=\"'+wgByType[type][k]+'\">'+widgets[wgByType[type][k]]['label']+'</option>');\n\t\t\t}\n\t\t}\n\t}\n\t\t\n\tfunction setFields(type) {\n\t\tif (fieldType[type]) {\n\t\t\tif (" . (isset($_GET['id']) ? 0 : 1) . ") {\n\t\t\t\tshowWidgetList(type);\n\t\t\t\t\$('#widgetlist option:first').attr('selected', 'selected');\n\t\t\t}\n\t\t\t\n\t\t\t\$('div.row').addClass('toshow').removeClass('tohide');\n\t\t\tif (fieldType[type].hide.length) \$('div.'+fieldType[type].hide.join(', div.')).addClass('tohide').removeClass('toshow');\n\t\t\tif (\$('div.widget select').val()) {\n\t\t\t\t\$('div.widgetparams').removeClass('tohide');\n\t\t\t}\n\t\t\t\$('div.toshow').show(500);\n\t\t\t\$('div.tohide').hide(500);\n\t\t\t" . (!isset($_GET['id']) ? "\n\t\t\tfor (var k in fieldType[type].val) { \n\t\t\t\t\$('div.'+k+' input').val(fieldType[type].val[k]);\n\t\t\t}" : '') . "\n\t\t}\n\t}\n\t\n\tfunction isArray(obj) {\n\t\tif (obj.constructor.toString().indexOf('Array') == -1)\n\t\t\treturn false;\n\t\telse\n\t\t\treturn true;\n\t}\n\t\t\n\t\$('#dialog-form').dialog({\n\t\tautoOpen: false,\n\t\theight: 400,\n\t\twidth: 400,\n\t\tmodal: true,\n\t\tbuttons: {\n\t\t\t'" . UserModule::t('Save') . "': function() {\n\t\t\t\tvar wparam = {};\n\t\t\t\tvar fparam = {};\n\t\t\t\t\$('#dialog-form fieldset .wparam').each(function(){\n\t\t\t\t\tif (\$(this).val()) wparam[\$(this).attr('name')] = \$(this).val();\n\t\t\t\t});\n\t\t\t\t\n\t\t\t\tvar tab = \$('#tabs ul li.ui-tabs-selected').text();\n\t\t\t\tfparam[tab] = {};\n\t\t\t\t\$('#dialog-form fieldset .tab-'+tab).each(function(){\n\t\t\t\t\tif (\$(this).val()) fparam[tab][\$(this).attr('name')] = \$(this).val();\n\t\t\t\t});\n\t\t\t\t\n\t\t\t\tif (\$.JSON.encode(wparam)!='{}') \$('div.widgetparams input').val(\$.JSON.encode(wparam));\n\t\t\t\tif (\$.JSON.encode(fparam[tab])!='{}') \$('div.other_validator input').val(\$.JSON.encode(fparam)); \n\t\t\t\t\n\t\t\t\t\$(this).dialog('close');\n\t\t\t},\n\t\t\t'" . UserModule::t('Cancel') . "': function() {\n\t\t\t\t\$(this).dialog('close');\n\t\t\t}\n\t\t},\n\t\tclose: function() {\n\t\t}\n\t});\n\n\n\t\$('#widgetparams').focus(function() {\n\t\tvar widget = widgets[\$('#widgetlist').val()];\n\t\tvar html = '';\n\t\tvar wparam = (\$('div.widgetparams input').val())?\$.JSON.decode(\$('div.widgetparams input').val()):{};\n\t\tvar fparam = (\$('div.other_validator input').val())?\$.JSON.decode(\$('div.other_validator input').val()):{};\n\t\t\n\t\t// Class params\n\t\tfor (var k in widget.params) {\n\t\t\thtml += '<label for=\"name\">'+((widget.paramsLabels[k])?widget.paramsLabels[k]:k)+'</label>';\n\t\t\thtml += '<input type=\"text\" name=\"'+k+'\" id=\"widget_'+k+'\" class=\"text wparam ui-widget-content ui-corner-all\" value=\"'+((wparam[k])?wparam[k]:widget.params[k])+'\" />';\n\t\t}\n\t\t// Validator params\t\t\n\t\tif (widget.other_validator) {\n\t\t\tvar tabs = '';\n\t\t\tvar li = '';\n\t\t\tfor (var t in widget.other_validator) {\n\t\t\t\ttabs += '<div id=\"tab-'+t+'\" class=\"tab\">';\n\t\t\t\tli += '<li'+((fparam[t])?' class=\"ui-tabs-selected\"':'')+'><a href=\"#tab-'+t+'\">'+t+'</a></li>';\n\t\t\t\t\n\t\t\t\tfor (var k in widget.other_validator[t]) {\n\t\t\t\t\ttabs += '<label for=\"name\">'+((widget.paramsLabels[k])?widget.paramsLabels[k]:k)+'</label>';\n\t\t\t\t\tif (isArray(widget.other_validator[t][k])) {\n\t\t\t\t\t\ttabs += '<select type=\"text\" name=\"'+k+'\" id=\"filter_'+k+'\" class=\"text fparam ui-widget-content ui-corner-all tab-'+t+'\">';\n\t\t\t\t\t\tfor (var i in widget.other_validator[t][k]) {\n\t\t\t\t\t\t\ttabs += '<option value=\"'+widget.other_validator[t][k][i]+'\"'+((fparam[t]&&fparam[t][k])?' selected=\"selected\"':'')+'>'+widget.other_validator[t][k][i]+'</option>';\n\t\t\t\t\t\t}\n\t\t\t\t\t\ttabs += '</select>';\n\t\t\t\t\t} else {\n\t\t\t\t\t\ttabs += '<input type=\"text\" name=\"'+k+'\" id=\"filter_'+k+'\" class=\"text fparam ui-widget-content ui-corner-all tab-'+t+'\" value=\"'+((fparam[t]&&fparam[t][k])?fparam[t][k]:widget.other_validator[t][k])+'\" />';\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\ttabs += '</div>';\n\t\t\t}\n\t\t\thtml += '<div id=\"tabs\"><ul>'+li+'</ul>'+tabs+'</div>';\n\t\t}\n\t\t\n\t\t\$('#dialog-form fieldset').html(html);\n\t\t\n\t\t\$('#tabs').tabs();\n\t\t\n\t\t// Show form\n\t\t\$('#dialog-form').dialog('open');\n\t});\n\t\n\t\$('#field_type').change(function() {\n\t\tsetFields(\$(this).val());\n\t});\n\t\n\t\$('#widgetlist').change(function() {\n\t\tif (\$(this).val()) {\n\t\t\t\$('div.widgetparams').show(500);\n\t\t} else {\n\t\t\t\$('div.widgetparams').hide(500);\n\t\t}\n\t\t\n\t});\n\t\n\t// show all function \n\t\$('div.form p.note').append('<br/><a href=\"#\" id=\"showAll\">" . UserModule::t('Show all') . "</a>');\n \t\$('#showAll').click(function(){\n\t\t\$('div.row').show(500);\n\t\treturn false;\n\t});\n\t\n\t// init\n\tsetFields(\$('#field_type').val());\n\t\n\t";
     $cs->registerScript(__CLASS__ . '#dialog', $js);
 }
开发者ID:lidijakralj,项目名称:bober,代码行数:30,代码来源:ProfileFieldController.php

示例2:

?>
		<?php 
echo CHtml::error($model, 'position');
?>
		<p class="hint"><?php 
echo UserModule::t('Display order of fields.');
?>
</p>
	</div>

	<div class="row visible">
		<?php 
echo CHtml::activeLabelEx($model, 'visible');
?>
		<?php 
echo CHtml::activeDropDownList($model, 'visible', ProfileField::itemAlias('visible'));
?>
		<?php 
echo CHtml::error($model, 'visible');
?>
	</div>

	<div class="row buttons">
		<?php 
echo CHtml::submitButton($model->isNewRecord ? UserModule::t('Create') : UserModule::t('Save'));
?>
	</div>

<?php 
echo CHtml::endForm();
?>
开发者ID:brettbrusda,项目名称:chat,代码行数:31,代码来源:_form.php

示例3: array

<?php

$this->breadcrumbs = array(UserModule::t('Profile Fields') => array('admin'), UserModule::t('Manage'));
$this->menu = array(array('label' => UserModule::t('Create Profile Field'), 'url' => array('create')), array('label' => UserModule::t('Manage Profile Field'), 'url' => array('admin')), array('label' => UserModule::t('Manage Users'), 'url' => array('/user/admin')));
Yii::app()->clientScript->registerScript('search', "\n\$('.search-button').click(function(){\n    \$('.search-form').toggle();\n    return false;\n});\n\$('.search-form form').submit(function(){\n    \$.fn.yiiGridView.update('profile-field-grid', {\n        data: \$(this).serialize()\n    });\n    return false;\n});\n");
?>
<h1><?php 
echo UserModule::t('Manage Profile Fields');
?>
</h1>

<p><?php 
echo UserModule::t("You may optionally enter a comparison operator (<b>&lt;</b>, <b>&lt;=</b>, <b>&gt;</b>, <b>&gt;=</b>, <b>&lt;&gt;</b> or <b>=</b>) at the beginning of each of your search values to specify how the comparison should be done.");
?>
</p>

<?php 
echo CHtml::link(UserModule::t('Advanced Search'), '#', array('class' => 'search-button'));
?>
<div class="search-form" style="display:none">
<?php 
$this->renderPartial('_search', array('model' => $model));
?>
</div><!-- search-form -->

<?php 
$this->widget('bootstrap.widgets.TbGridView', array('dataProvider' => $model->search(), 'filter' => $model, 'columns' => array('id', array('name' => 'varname', 'type' => 'raw', 'value' => 'UHtml::markSearch($data,"varname")'), array('name' => 'title', 'value' => 'UserModule::t($data->title)'), array('name' => 'field_type', 'value' => '$data->field_type', 'filter' => ProfileField::itemAlias("field_type")), 'field_size', array('name' => 'required', 'value' => 'ProfileField::itemAlias("required",$data->required)', 'filter' => ProfileField::itemAlias("required")), 'position', array('name' => 'visible', 'value' => 'ProfileField::itemAlias("visible",$data->visible)', 'filter' => ProfileField::itemAlias("visible")), array('class' => 'bootstrap.widgets.TbButtonColumn'))));
开发者ID:yinhe,项目名称:yincart,代码行数:27,代码来源:admin.php

示例4: array

<?php

$this->breadcrumbs = array(UserModule::t('Profile Fields') => array('admin'), UserModule::t('Manage'));
$this->menu = array(array('label' => UserModule::t('Create Profile Field'), 'url' => array('create')), array('label' => UserModule::t('Manage Profile Field'), 'url' => array('admin')), array('label' => UserModule::t('Manage Users'), 'url' => array('/user/admin')));
Yii::app()->clientScript->registerScript('search', "\n\$('.search-button').click(function(){\n    \$('.search-form').toggle();\n    return false;\n});\n\$('.search-form form').submit(function(){\n    \$.fn.yiiGridView.update('profile-field-grid', {\n        data: \$(this).serialize()\n    });\n    return false;\n});\n");
?>
<h1><?php 
echo UserModule::t('Manage Profile Fields');
?>
</h1>

<p class="helper"><?php 
echo UserModule::t("You may optionally enter a comparison operator (<b>&lt;</b>, <b>&lt;=</b>, <b>&gt;</b>, <b>&gt;=</b>, <b>&lt;&gt;</b> or <b>=</b>) at the beginning of each of your search values to specify how the comparison should be done.");
?>
</p>

<?php 
echo CHtml::link(UserModule::t('Advanced Search'), '#', array('class' => 'search-button'));
?>
<div class="search-form" style="display:none">
<?php 
$this->renderPartial('_search', array('model' => $model));
?>
</div><!-- search-form -->

<?php 
//$this->widget('zii.widgets.grid.CGridView', array(
$this->widget('JGridView', array('dataProvider' => $model->search(), 'filter' => $model, 'columns' => array(array('name' => 'id', 'htmlOptions' => array('class' => 'id-column')), array('name' => 'varname', 'type' => 'raw', 'value' => 'UHtml::markSearch($data,"varname")'), array('name' => 'title', 'value' => 'UserModule::t($data->title)'), array('name' => 'field_type', 'value' => '$data->field_type', 'filter' => ProfileField::itemAlias("field_type")), 'field_size', array('name' => 'required', 'value' => 'ProfileField::itemAlias("required",$data->required)', 'filter' => ProfileField::itemAlias("required")), 'position', array('name' => 'visible', 'value' => 'ProfileField::itemAlias("visible",$data->visible)', 'filter' => ProfileField::itemAlias("visible")), array('class' => 'CButtonColumn', 'template' => '{update}{delete}', 'updateButtonImageUrl' => Yii::app()->theme->baseUrl . '/images/update16x16.png', 'deleteButtonImageUrl' => Yii::app()->theme->baseUrl . '/images/delete16x16.png'))));
开发者ID:sjnlabs2013,项目名称:sampleyii,代码行数:28,代码来源:admin.php

示例5: array

echo $form->dropDownListRow($model, 'widget', $widgetsList, array('class' => 'widget', 'id' => 'widgetlist', 'hint' => UserModule::t('Widget name.')));
?>
    </div>
    <div class="formrow widgetparams">
        <?php 
echo $form->textFieldRow($model, 'widgetparams', array('class' => 'widgetparams', 'size' => 60, 'maxlength' => 5000, 'id' => 'widgetparams', 'hint' => UserModule::t('JSON string (example: {example}).', array('{example}' => CJavaScript::jsonEncode(array('param1' => array('val1', 'val2'), 'param2' => array('k1' => 'v1', 'k2' => 'v2')))))));
?>
	</div>
	<div class="formrow position">
	   <?php 
echo $form->textFieldRow($model, 'position', array('class' => 'position', 'hint' => UserModule::t('Display order of fields.')));
?>
	</div>
	<div class="formrow visible">
	   <?php 
echo $form->dropDownListRow($model, 'visible', ProfileField::itemAlias('visible'), array('class' => 'visible'));
?>
	</div>
	<div class="form-actions">
        <?php 
$this->widget('bootstrap.widgets.TbButton', array('type' => 'primary', 'buttonType' => 'submit', 'label' => $model->isNewRecord ? UserModule::t('Create') : UserModule::t('Save')));
?>
    </div>
	
	<?php 
/*
	<div class="row varname">
		<?php echo CHtml::activeLabelEx($model,'varname'); ?>
		<?php echo (($model->id)?CHtml::activeTextField($model,'varname',array('size'=>60,'maxlength'=>50,'readonly'=>true)):CHtml::activeTextField($model,'varname',array('size'=>60,'maxlength'=>50))); ?>
		<?php echo CHtml::error($model,'varname'); ?>
		<p class="hint"><?php echo UserModule::t("Allowed lowercase letters and digits."); ?></p>
开发者ID:alsvader,项目名称:hackbanero,代码行数:31,代码来源:_form.php

示例6: array

?>
        <?php 
echo $form->textFieldRow($model, 'error_message', array('size' => 60, 'maxlength' => 255));
?>
        <?php 
echo $form->textFieldRow($model, 'other_validator', array('size' => 60, 'maxlength' => 5000));
?>
        <?php 
echo $form->textFieldRow($model, 'default', array('size' => 60, 'maxlength' => 255));
?>
        <?php 
echo $form->textFieldRow($model, 'widget', array('size' => 60, 'maxlength' => 255));
?>
        <?php 
echo $form->textFieldRow($model, 'widgetparams', array('size' => 60, 'maxlength' => 5000));
?>
        <?php 
echo $form->textFieldRow($model, 'position');
?>
        <?php 
echo $form->dropDownListRow($model, 'visible', ProfileField::itemAlias('visible'));
?>

    <div class="form-actions">
        <?php 
$this->widget('bootstrap.widgets.TbButton', array('type' => 'primary', 'buttonType' => 'submit', 'label' => UserModule::t('Search')));
?>
    </div>

<?php 
$this->endWidget();
开发者ID:alsvader,项目名称:hackbanero,代码行数:31,代码来源:_search.php

示例7: operator

<p><?php 
echo UserModule::t("You may optionally enter a comparison operator (<b>&lt;</b>, <b>&lt;=</b>, <b>&gt;</b>, <b>&gt;=</b>, <b>&lt;&gt;</b> or <b>=</b>) at the beginning of each of your search values to specify how the comparison should be done.");
?>
</p>

<?php 
echo CHtml::link(UserModule::t('Advanced Search'), '#', array('class' => 'search-button'));
?>
<div class="search-form" style="display:none">
    <?php 
$this->renderPartial('_search', array('model' => $model));
?>
</div><!-- search-form -->

<?php 
$this->widget('zii.widgets.grid.CGridView', array('dataProvider' => $model->search(), 'columns' => array(array('name' => 'id', 'value' => '$data->id', 'htmlOptions' => array('style' => 'display:none;'), 'headerHtmlOptions' => array('style' => 'display:none;')), array('header' => '# ', 'value' => '$data->position'), array('name' => 'title', 'value' => 'UserModule::t($data->title)'), array('name' => 'field_type', 'value' => '$data->field_type', 'filter' => ProfileField::itemAlias("field_type")), 'group', 'subgroup', array('name' => 'visible', 'value' => 'ProfileField::itemAlias("visible",$data->visible)', 'filter' => ProfileField::itemAlias("visible")), 'visible_for_role', array('class' => 'CButtonColumn'))));
?>

<?php 
Yii::app()->clientScript->registerCoreScript('jquery.ui');
?>
<script type="text/javascript">
    $(function() {
        $( "table.items tbody" ).sortable({ 
            items: 'tr',
            update : function () { 
                var order = [];
                $('table.items tbody tr').each(function(i,item) {
                    order.push($(item).find('td:eq(0)').text() * 1);
                    $(item).find('td:eq(1)').text(i + 1);
                });
开发者ID:rizkyramadhan,项目名称:yii-user,代码行数:31,代码来源:admin.php

示例8: array

					<?php 
echo UserModule::t('Display order of fields.');
?>
				</span>
			</div>
		</div>

		<div class="form-group">
			<label class="control-label col-sm-3">
				<?php 
echo CHtml::activeLabelEx($model, 'visible');
?>
			</label>
			<div class="col-sm-9">
				<?php 
echo CHtml::activeDropDownList($model, 'visible', ProfileField::itemAlias('visible'), array('class' => 'form-control'));
?>
				<span class="help-block error">
					<?php 
echo CHtml::error($model, 'visible');
?>
				</span>
			</div>
		</div>
		
		<div class="form-actions text-right">
		<?php 
$this->widget('booster.widgets.TbButton', array('buttonType' => 'submit', 'context' => 'primary', 'label' => $model->isNewRecord ? UserModule::t('Create') : UserModule::t('Save')));
?>
		</div>
开发者ID:piond,项目名称:new_rsud,代码行数:30,代码来源:_form.php

示例9: array

  </div>
 </td>
 <td valign="top">
<div class="cont_right formWrapper">
<h1><?php 
echo UserModule::t('Manage Profile Fields');
?>
</h1>
<div class="edit_bttns" style="top:15px; right:20px">
    <ul>
    <li>
     <?php 
echo CHtml::link(Yii::t('user', '<span>Create Profile Field</span>'), array('profileField/create'), array('class' => 'addbttn last'));
?>
    </li>
    </ul>
    <div class="clear"></div>
    </div>
<div class="search-form" style="display:none">
<?php 
$this->renderPartial('_search', array('model' => $model));
?>
</div><!-- search-form -->

<?php 
$this->widget('zii.widgets.grid.CGridView', array('dataProvider' => $model->search(), 'pager' => array('cssFile' => Yii::app()->baseUrl . '/css/formstyle.css'), 'cssFile' => Yii::app()->baseUrl . '/css/formstyle.css', 'columns' => array('id', array('name' => 'varname', 'type' => 'raw', 'value' => 'UHtml::markSearch($data,"varname")'), array('name' => 'title', 'value' => 'UserModule::t($data->title)'), array('name' => 'field_type', 'value' => '$data->field_type', 'filter' => ProfileField::itemAlias("field_type")), 'field_size', array('name' => 'required', 'value' => 'ProfileField::itemAlias("required",$data->required)', 'filter' => ProfileField::itemAlias("required")), 'position', array('name' => 'visible', 'value' => 'ProfileField::itemAlias("visible",$data->visible)', 'filter' => ProfileField::itemAlias("visible")), array('class' => 'CButtonColumn'))));
?>
</div>
 </td>
  </tr>
</table>
开发者ID:rajuniit,项目名称:open-school-CE,代码行数:31,代码来源:admin.php

示例10: operator

?>
<h1><?php 
echo UserModule::t('Manage Profile Fields');
?>
</h1>
<div class="row white-bg inside-block">
<div class="col-md-12">
<p><?php 
echo UserModule::t("You may optionally enter a comparison operator (<b>&lt;</b>, <b>&lt;=</b>, <b>&gt;</b>, <b>&gt;=</b>, <b>&lt;&gt;</b> or <b>=</b>) at the beginning of each of your search values to specify how the comparison should be done.");
?>
</p>
</div>
<div class="col-md-12">
<?php 
echo CHtml::link(UserModule::t('Advanced Search'), '#', array('class' => 'search-button'));
?>
<div class="search-form" style="display:none">
<?php 
//	$this->renderPartial('_search',array(
//		'model'=>$model,
//	));
?>
</div><!-- search-form -->
</div>
<div class="col-md-12">
<?php 
$this->widget('zii.widgets.grid.CGridView', array('dataProvider' => $dataProvider, 'columns' => array('id', array('name' => UserModule::t('varname'), 'type' => 'raw', 'value' => 'UHtml::markSearch($data,"varname")'), array('name' => UserModule::t('title'), 'value' => 'UserModule::t($data->title)'), array('name' => UserModule::t('field_type'), 'value' => '$data->field_type', 'filter' => ProfileField::itemAlias("field_type")), 'field_size', array('name' => UserModule::t('required'), 'value' => 'ProfileField::itemAlias("required",$data->required)', 'filter' => ProfileField::itemAlias("required")), 'position', array('name' => UserModule::t('visible'), 'value' => 'ProfileField::itemAlias("visible",$data->visible)', 'filter' => ProfileField::itemAlias("visible")), array('name' => 'paymentProps', 'value' => '$data->paymentProps'), array('class' => 'CButtonColumn'))));
?>
</div>
</div>
开发者ID:akoch-ov,项目名称:dipstart-development,代码行数:30,代码来源:admin.php

示例11: array

<?php

$this->breadcrumbs = array(UserModule::t('Profile Fields') => array('admin'), UserModule::t('Manage'));
Yii::app()->clientScript->registerScript('search', "\n\$('.search-button').click(function(){\n    \$('.search-form').toggle();\n    return false;\n});\n\$('.search-form form').submit(function(){\n    \$.fn.yiiGridView.update('profile-field-grid', {\n        data: \$(this).serialize()\n    });\n    return false;\n});\n");
?>
<ul class="breadcrumb" id="breadcrumb">
	<li><span class="badge badge-success"><strong><?php 
echo UserModule::t('Manage Profile Fields');
?>
</strong></span></li>
</ul>

<p><?php 
echo UserModule::t("You may optionally enter a comparison operator (<b>&lt;</b>, <b>&lt;=</b>, <b>&gt;</b>, <b>&gt;=</b>, <b>&lt;&gt;</b> or <b>=</b>) at the beginning of each of your search values to specify how the comparison should be done.");
?>
</p>

<?php 
echo CHtml::link(UserModule::t('Advanced Search'), '#', array('class' => 'search-button btn'));
?>
<div class="search-form" style="display:none">
<?php 
$this->renderPartial('_search', array('model' => $model));
?>
</div><!-- search-form -->

<?php 
$this->widget('bootstrap.widgets.TbGridView', array('id' => 'profile-field-grid', 'dataProvider' => $model->search(), 'filter' => $model, 'itemsCssClass' => 'table-default items table table-striped table-bordered', 'columns' => array(array('name' => 'id', 'type' => 'raw', 'value' => '$data->id', 'htmlOptions' => array('style' => 'width:50px')), array('name' => 'varname', 'type' => 'raw', 'value' => 'UHtml::markSearch($data,"varname")'), array('name' => 'title', 'value' => 'UserModule::t($data->title)'), array('name' => 'field_type', 'value' => '$data->field_type', 'filter' => ProfileField::itemAlias("field_type")), 'field_size', array('name' => 'required', 'value' => 'ProfileField::itemAlias("required",$data->required)', 'filter' => ProfileField::itemAlias("required")), 'position', array('name' => 'visible', 'value' => 'ProfileField::itemAlias("visible",$data->visible)', 'filter' => ProfileField::itemAlias("visible")), array('class' => 'CButtonColumn', 'htmlOptions' => array('style' => 'width:55px')))));
开发者ID:phiphi1992,项目名称:fpthue,代码行数:28,代码来源:admin.php


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