本文整理汇总了PHP中ControllerActionsName::createIndexButtonRoles方法的典型用法代码示例。如果您正苦于以下问题:PHP ControllerActionsName::createIndexButtonRoles方法的具体用法?PHP ControllerActionsName::createIndexButtonRoles怎么用?PHP ControllerActionsName::createIndexButtonRoles使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ControllerActionsName
的用法示例。
在下文中一共展示了ControllerActionsName::createIndexButtonRoles方法的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: array
$this->breadcrumbs = array('Banner Management');
$menus = array(array('label' => 'Create Banner', 'url' => array('create')));
$this->menu = ControllerActionsName::createMenusRoles($menus, $actions);
Yii::app()->clientScript->registerScript('search', "\n\$('.search-button').click(function(){\n\t\$('.search-form').toggle();\n\treturn false;\n});\n\$('.search-form form').submit(function(){\n\t\$.fn.yiiGridView.update('banners-grid', {\n url : \$(this).attr('action'),\n\t\tdata: \$(this).serialize()\n\t});\n\treturn false;\n});\n");
Yii::app()->clientScript->registerScript('ajaxupdate', "\n\$('#banners-grid a.ajaxupdate').live('click', function() {\n \$.fn.yiiGridView.update('banners-grid', {\n type: 'POST',\n url: \$(this).attr('href'),\n success: function() {\n \$.fn.yiiGridView.update('banners-grid');\n }\n });\n return false;\n});\n");
?>
<h1><?php
echo Yii::t('translation', 'Banner Management');
?>
</h1>
<?php
echo CHtml::link(Yii::t('translation', '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('id' => 'banners-grid', 'dataProvider' => $model->search(), 'afterAjaxUpdate' => 'function(id, data){ fixTargetBlank();}', 'columns' => array(array('header' => 'S/N', 'type' => 'raw', 'value' => '$this->grid->dataProvider->pagination->currentPage * $this->grid->dataProvider->pagination->pageSize + ($row+1)', 'headerHtmlOptions' => array('width' => '30px', 'style' => 'text-align:center;'), 'htmlOptions' => array('style' => 'text-align:center;')), array('name' => 'banner_title', 'type' => 'html'), array('name' => 'large_image', 'type' => 'BannerImageBe', 'value' => '$data', 'htmlOptions' => array('style' => 'text-align:center;width:600px;')), array('header' => 'Banner Type', 'name' => 'banner_type', 'htmlOptions' => array('style' => 'text-align:center;'), 'value' => 'Banners::$bannerType[$data->banner_type]'), array('name' => 'status', 'type' => 'status', 'htmlOptions' => array('style' => 'text-align:center;')), 'created_date:date', array('header' => 'Actions', 'class' => 'CButtonColumn', 'template' => ControllerActionsName::createIndexButtonRoles($actions), 'buttons' => array()))));
?>
<style>
.b_img{
height: 70px !important;
}
</style>
示例2: array
<?php
$this->breadcrumbs = array('Layouts');
$menus = array(array('label' => 'Create Layouts', 'url' => array('create')));
$this->menu = ControllerActionsName::createMenusRoles($menus, $actions);
Yii::app()->clientScript->registerScript('search', "\n\$('.search-button').click(function(){\n\t\$('.search-form').toggle();\n\treturn false;\n});\n\$('.search-form form').submit(function(){\n\t\$.fn.yiiGridView.update('layouts-grid', {\n url : \$(this).attr('action'),\n\t\tdata: \$(this).serialize()\n\t});\n\treturn false;\n});\n");
Yii::app()->clientScript->registerScript('ajaxupdate', "\n\$('#layouts-grid a.ajaxupdate').live('click', function() {\n \$.fn.yiiGridView.update('layouts-grid', {\n type: 'POST',\n url: \$(this).attr('href'),\n success: function() {\n \$.fn.yiiGridView.update('layouts-grid');\n }\n });\n return false;\n});\n");
?>
<h1>List Layouts</h1>
<?php
echo CHtml::link('Advanced Search', '#', array('class' => 'search-button'));
?>
<div class="search-form" style="display:none">
<?php
$this->renderPartial('_search', array('model' => $model));
?>
</div><!-- search-form -->
<?php
$visible = ControllerActionsName::checkVisibleButton($actions);
$this->widget('zii.widgets.grid.CGridView', array('id' => 'layouts-grid', 'dataProvider' => $model->search(), 'columns' => array(array('header' => 'S/N', 'type' => 'raw', 'value' => '$row+1', 'headerHtmlOptions' => array('width' => '30px', 'style' => 'text-align:center;'), 'htmlOptions' => array('style' => 'text-align:center;')), array('name' => 'title', 'htmlOptions' => array('style' => 'text-align:center;')), array('name' => 'content', 'htmlOptions' => array('style' => 'text-align:center;')), array('header' => 'Display Order', 'name' => 'order', 'htmlOptions' => array('style' => 'text-align:center;')), array('header' => 'Status', 'name' => 'status', 'type' => 'status', 'htmlOptions' => array('style' => 'text-align:center;'), 'value' => 'array("status"=>$data->status,"id"=>$data->id)', 'visible' => $visible), array('class' => 'CButtonColumn', 'template' => ControllerActionsName::createIndexButtonRoles($actions)))));
示例3: array
$this->breadcrumbs = array('Account Payable Management');
/*
$menus=array(
array('label'=> Yii::t('translation','Create Vouchers'), 'url'=>array('createvoucher')),
);
$this->menu= ControllerActionsName::createMenusRoles($menus, $actions);*/
Yii::app()->clientScript->registerScript('search', "\n\$('.search-button').click(function(){\n\t\$('.search-form').toggle();\n\treturn false;\n});\n\$('.search-form form').submit(function(){\n\t\$.fn.yiiGridView.update('fi-invoice-grid', {\n url : \$(this).attr('action'),\n\t\tdata: \$(this).serialize()\n\t});\n\treturn false;\n});\n");
Yii::app()->clientScript->registerScript('ajaxupdate', "\n\$('#fi-invoice-grid a.ajaxupdate').live('click', function() {\n \$.fn.yiiGridView.update('fi-invoice-grid', {\n type: 'POST',\n url: \$(this).attr('href'),\n success: function() {\n \$.fn.yiiGridView.update('fi-invoice-grid');\n }\n });\n return false;\n});\n");
?>
<?php
include '_tab_index.php';
?>
<h1 ><?php
echo Yii::t('translation', 'Account Payable Management');
?>
</h1>
<?php
echo CHtml::link(Yii::t('translation', 'Advanced Search'), '#', array('class' => 'search-button'));
?>
<div class="search-form" style="display:none">
<?php
$this->renderPartial('_search_voucher', array('model' => $model));
?>
</div><!-- search-form -->
<?php
$this->widget('zii.widgets.grid.CGridView', array('id' => 'fi-invoice-grid', 'dataProvider' => $model->search(), 'enableSorting' => false, 'columns' => array(array('header' => 'S/N', 'type' => 'raw', 'value' => '$this->grid->dataProvider->pagination->currentPage * $this->grid->dataProvider->pagination->pageSize + ($row+1)', 'headerHtmlOptions' => array('width' => '30px', 'style' => 'text-align:center;'), 'htmlOptions' => array('style' => 'text-align:center;')), 'voucher_no', array('name' => 'pay_to', 'value' => 'FiPaymentVoucher::getStatus($data->pay_to)'), 'user_name', 'user_billing_address', 'user_postal_code', array('name' => 'total_amount', 'type' => 'Price', 'htmlOptions' => array('style' => 'text-align:right;')), array('header' => 'Print Voucher', 'type' => 'PrintPaymentVoucher', 'value' => '$data', 'htmlOptions' => array('style' => 'text-align:center;')), array('name' => 'created_date', 'header' => 'Created Date', 'type' => 'date'), array('name' => 'status', 'htmlOptions' => array('style' => 'text-align:center;'), 'value' => '($data->status==1) ? "Paid" : "Unpaid" '), array('header' => 'Actions', 'class' => 'CButtonColumn', 'template' => ControllerActionsName::createIndexButtonRoles($actions), 'buttons' => array('update' => array('url' => 'Yii::app()->createAbsoluteUrl("admin/fiInvoice/updatevoucher", array("id"=>$data->id))', 'visible' => 'FiPaymentVoucher::CanUpdate($data)'), 'view' => array('url' => 'Yii::app()->createAbsoluteUrl("admin/fiInvoice/viewvoucher", array("id"=>$data->id))'), 'delete' => array('url' => 'Yii::app()->createAbsoluteUrl("admin/fiInvoice/deletevoucher", array("id"=>$data->id))'))))));
示例4: CmsFormatter
$cmsFormater = new CmsFormatter();
$arrVal = array("name" => $mTrans->listing->property_name_or_address, "transaction_id" => $mTrans->id);
$sPropertyName = $cmsFormater->formatpropertyname($arrVal);
$tenancy_agreement_date = $cmsFormater->formatLongDate($mTrans->tenancy_agreement_date);
$expiring_date = $cmsFormater->formatLongDate($mTrans->expiring_date);
$titleH1 = $sPropertyName . " [ {$tenancy_agreement_date} - {$expiring_date} ] ";
?>
<h1>Calls Log: <?php
echo $titleH1;
?>
</h1>
<?php
$this->widget('zii.widgets.grid.CGridView', array('id' => 'pro-transactions-grid', 'dataProvider' => $model->search(), 'afterAjaxUpdate' => 'function(id, data){ fixTargetBlank(); fnUpdateColorbox(); }', 'columns' => array(array('header' => 'S/N', 'type' => 'raw', 'value' => '$this->grid->dataProvider->pagination->currentPage * $this->grid->dataProvider->pagination->pageSize + ($row+1)', 'headerHtmlOptions' => array('width' => '30px', 'style' => 'text-align:center;'), 'htmlOptions' => array('style' => 'text-align:center;')), array('name' => 'date', 'type' => 'DateTimeTran', 'htmlOptions' => array('style' => 'text-align:center;'), 'headerHtmlOptions' => array('class' => 'first', 'style' => 'text-align:center;')), array('name' => 'received_by'), array('name' => 'description', 'type' => 'html', 'value' => 'MyFormat::replaceNewLineTextArea($data->description)'), array('name' => 'person_call_type', 'value' => 'isset(ProCallLog::$ARR_PERSON_CALL_TYPE[$data->person_call_type])?ProCallLog::$ARR_PERSON_CALL_TYPE[$data->person_call_type]:""', 'htmlOptions' => array('style' => 'text-align:center;', 'class' => 'w-100')), array('name' => 'person_called'), array('name' => 'phone'), array('header' => 'Actions', 'class' => 'CButtonColumn', 'template' => ControllerActionsName::createIndexButtonRoles($actions, array('update', 'delete')), 'buttons' => array('updateCallsLog' => array('label' => 'Update Call Log', 'imageUrl' => Yii::app()->theme->baseUrl . '/img/gridview/update.png', 'options' => array('class' => 'update update_item'), 'url' => 'Yii::app()->createAbsoluteUrl("admin/transactions/updateCallsLog",
array("id"=>$data->id))'), 'deleteCallsLog' => array('label' => 'Update Call Log', 'imageUrl' => Yii::app()->theme->baseUrl . '/img/gridview/delete.png', 'options' => array('class' => 'delete'), 'url' => 'Yii::app()->createAbsoluteUrl("admin/transactions/deleteCallsLog",
array("id"=>$data->id))'))))));
?>
<script type="text/javascript" src="<?php
echo Yii::app()->theme->baseUrl;
?>
/admin/colorbox/jquery.colorbox-min.js"></script>
<link rel="stylesheet" href="<?php
echo Yii::app()->theme->baseUrl;
?>
/admin/css/colorbox.css" />
<script>
示例5: array
<?php
$dataProvider = $model->SearchCompanyBE();
$this->widget('zii.widgets.grid.CGridView', array('id' => 'listing-company-grid', 'dataProvider' => $dataProvider, 'enableSorting' => true, 'afterAjaxUpdate' => 'function(id, data){ fnBindMoveTo();}', 'summaryText' => 'Show:' . MyFormat::GetDropDownPageSize('pageSize', $dataProvider->pagination->pageSize) . ' rows per page', 'columns' => array(array('class' => 'CCheckBoxColumn', 'selectableRows' => 2, 'id' => 'chk'), array('header' => 'S/N', 'type' => 'raw', 'value' => '$this->grid->dataProvider->pagination->currentPage * $this->grid->dataProvider->pagination->pageSize + ($row+1)', 'headerHtmlOptions' => array('width' => '30px', 'style' => 'text-align:center;'), 'htmlOptions' => array('style' => 'text-align:center;')), array('name' => 'listing_type', 'header' => 'Type', 'type' => 'PropertyType', 'headerHtmlOptions' => array('class' => 'first', 'style' => 'width:70px;')), array('name' => 'location_id', 'header' => 'District', 'value' => '"D".($data->location_id>9?$data->location_id:"0$data->location_id")'), array('name' => 'property_name_or_address', 'header' => 'Property Address'), array('name' => 'unit_from', 'value' => '$data->unit_from." - $data->unit_to"', 'htmlOptions' => array('style' => 'width: 50px;')), array('name' => 'floor_area', 'type' => 'Price', 'htmlOptions' => array('style' => 'text-align:right;')), array('name' => 'of_bedroom', 'htmlOptions' => array('style' => 'text-align:center;')), array('name' => 'price', 'type' => 'Price', 'htmlOptions' => array('style' => 'width: 80px;text-align:right;')), array('name' => 'company_owner_name'), array('name' => 'contact_name_no'), array('name' => 'company_email'), array('name' => 'company_availability'), array('name' => 'dnc_expiry_date', 'type' => 'CompanyDncExpiryDate', 'value' => '$data'), array('name' => 'user_id', 'type' => 'FullNameRegisteredUsers', 'value' => '$data->rUser?$data->rUser:null', 'htmlOptions' => array('style' => 'width: 100px;')), array('name' => 'owner_contact_click', 'type' => 'raw', 'value' => '$this->grid->widget("application.components.ListingClickWidget", array("listing"=>$data), true)', 'htmlOptions' => array('style' => 'width: 100px;')), array('name' => 'last_update_time', 'type' => 'date'), array('name' => 'company_listing_status', 'type' => 'ListingCompanyStatus', 'value' => '$data', 'htmlOptions' => array('style' => 'text-align:center;')), array('header' => 'Move To', 'class' => 'CButtonColumn', 'template' => '{move_to_that}', 'buttons' => array('move_to_that' => array('label' => "Move To {$MoveTo}", 'options' => array('class' => 'move_to_that ajaxupdate remove_target_blank'), 'url' => 'Yii::app()->createAbsoluteUrl("admin/ajax/companyListingMoveto",
array("id"=>$data->id, "company_listing_type"=>Listing::$COMPANY_TYPE_MOVE_REVERT[$data->company_listing_type] ))'))), array('header' => 'Actions', 'class' => 'CButtonColumn', 'template' => ControllerActionsName::createIndexButtonRoles($actions), 'buttons' => array('update' => array('visible' => 'Listing::CanUpdateCompanyListing($data)'), 'delete' => array('visible' => 'Listing::CanDeleteCompanyListing($data)'))))));
?>
<style>
.summary { float:right !important;}
.change-pageSize { padding:0; height:23px;}
</style>
<script>
$(function(){
fnBindMoveTo();
});
function fnBindMoveTo(){
$('.move_to_that').click(function(){
if(confirm('Are you sure to move this item?')){
return true;
}
return false;
});
$('.remove_target_blank').attr('target','');
$('.change-pageSize').change(function(){
var pageSize = $(this).val();
$('.change-pageSize').val(pageSize);
$('.submit_form_pri').find('button:submit').trigger('click');
});
示例6: array
$this->breadcrumbs = array('Tenancies New');
$menus = array(array('label' => Yii::t('translation', 'Create Tenancy'), 'url' => array('CreateTenancy', 'add_property' => 1)));
$this->menu = ControllerActionsName::createMenusRoles($menus, $actions);
Yii::app()->clientScript->registerScript('search', "\n\$('.search-button').click(function(){\n\t\$('.search-form').toggle();\n\treturn false;\n});\n\$('.search-form form').submit(function(){\n\t\$.fn.yiiGridView.update('pro-transactions-grid', {\n url : \$(this).attr('action'),\n\t\tdata: \$(this).serialize()\n\t});\n\treturn false;\n});\n");
Yii::app()->clientScript->registerScript('ajaxupdate', "\n\$('#pro-transactions-grid a.ajaxupdate').live('click', function() {\n \$.fn.yiiGridView.update('pro-transactions-grid', {\n type: 'POST',\n url: \$(this).attr('href'),\n success: function() {\n \$.fn.yiiGridView.update('pro-transactions-grid');\n }\n });\n return false;\n});\n");
//if(MyFormat::isAllowAccess('transactions', 'viewInvoice'))
// echo 'sssssssss';
?>
<h1><?php
echo Yii::t('translation', 'Tenancies New');
?>
</h1>
<?php
$this->widget('zii.widgets.grid.CGridView', array('id' => 'pro-transactions-grid', 'dataProvider' => $model->getBEListTenanciesNew(), 'filter' => $model, 'enableSorting' => false, 'afterAjaxUpdate' => 'function(id, data){ fixTargetBlank(); fnUpdateLink(); }', 'columns' => array(array('header' => 'Property name', 'name' => 'sPropertyName', 'type' => 'propertyname', 'value' => 'array("name"=>$data->listing?$data->listing->property_name_or_address:"", "transaction_id"=>$data->id,"title_full"=>$data,"title_full"=>$data)', 'htmlOptions' => array('class' => 'w-250 ', 'style' => '')), array('name' => 'tenancy_agreement_date', 'type' => 'longDate', 'value' => '$data->tenancy_agreement_date', 'htmlOptions' => array('class' => 'w-150 item_c', 'style' => ''), 'filterHtmlOptions' => array('class' => 'ad_w1 ad_datepicker', 'style' => '')), array('name' => 'commencement_date', 'type' => 'longDate', 'value' => '$data->commencement_date', 'htmlOptions' => array('class' => 'w-150 item_c', 'style' => ''), 'filterHtmlOptions' => array('class' => 'ad_w1 ad_datepicker', 'style' => '')), array('name' => 'expiring_date', 'type' => 'expiredDate', 'value' => '$data->expiring_date', 'htmlOptions' => array('class' => 'w-150 item_c', 'style' => ''), 'filterHtmlOptions' => array('class' => 'ad_w1 ad_datepicker', 'style' => '')), array('header' => 'Tenancy Amount', 'name' => 'tenancy_amount', 'type' => 'price', 'value' => '$data->tenancy_amount', 'htmlOptions' => array('class' => 'w-80 item_r', 'style' => ''), 'filterHtmlOptions' => array('class' => 'ad_w1', 'style' => '')), array('header' => 'Deposit Payable', 'name' => 'deposit_payable', 'type' => 'price', 'value' => '$data->deposit_payable', 'htmlOptions' => array('class' => 'w-80 item_r', 'style' => ''), 'filterHtmlOptions' => array('class' => 'ad_w1', 'style' => '')), array('header' => 'Tenancy Period', 'name' => 'months_rent', 'value' => '$data->months_rent != NULL ? $data->months_rent." months":""', 'htmlOptions' => array('class' => 'w-80 item_c', 'style' => ''), 'filterHtmlOptions' => array('class' => 'ad_w1', 'style' => '')), array('header' => 'Actions', 'class' => 'CButtonColumn', 'template' => ControllerActionsName::createIndexButtonRoles($actions, array('view', 'ApproveTenancy', 'delete')), 'buttons' => array('ApproveTenancy' => array('label' => 'Update status tenancy', 'imageUrl' => Yii::app()->theme->baseUrl . '/admin/images/icon-view.png', 'options' => array('class' => 'ApproveTenancy'), 'url' => 'Yii::app()->createAbsoluteUrl("admin/tenancy/approveTenancy",
array("id"=>$data->id))'), 'view' => array('url' => 'Yii::app()->createAbsoluteUrl("admin/tenancy/view",
array("id"=>$data->id, "next"=>"new"))'))))));
Yii::app()->clientScript->registerCoreScript('jquery.ui');
?>
<script type="text/javascript" src="<?php
echo Yii::app()->theme->baseUrl;
?>
/admin/colorbox/jquery.colorbox-min.js"></script>
<link rel="stylesheet" href="<?php
echo Yii::app()->theme->baseUrl;
?>
/admin/css/colorbox.css" />
<script>
示例7: array
<?php
$this->breadcrumbs = array('Manage Menu');
$menus = array(array('label' => 'Create Menu', 'url' => array('create')));
$this->menu = ControllerActionsName::createMenusRoles($menus, $actions);
Yii::app()->clientScript->registerScript('search', "\n\$('.search-button').click(function(){\n\t\$('.search-form').toggle();\n\treturn false;\n});\n\$('.search-form form').submit(function(){\n\t\$.fn.yiiGridView.update('menus-grid', {\n\t\tdata: \$(this).serialize()\n\t});\n\treturn false;\n});\n");
?>
<h1>Manage Menu</h1>
<?php
echo CHtml::link('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('id' => 'menus-grid', 'dataProvider' => $model->search(), 'columns' => array(array('header' => 'S/N', 'type' => 'raw', 'value' => '$this->grid->dataProvider->pagination->currentPage * $this->grid->dataProvider->pagination->pageSize + ($row+1)', 'headerHtmlOptions' => array('width' => '30px', 'style' => 'text-align:center;'), 'htmlOptions' => array('style' => 'text-align:center;')), array('class' => 'CButtonColumn', 'template' => ControllerActionsName::createIndexButtonRoles($actions)), array('name' => 'menu_name', 'filter' => ''), 'controller_name', array('name' => 'roles', 'type' => 'raw', 'value' => 'RolesMenus::getActionName($data->id)'), 'menu_link', array('name' => 'parent_id', 'header' => 'Parent menu', 'value' => '(!is_null(Menus::model()->findByPk($data->parent_id))?Menus::model()->findByPk($data->parent_id)->menu_name:"")', 'filter' => Menus::getDropDownList("Menus[parent_id]", "Menus_parent_id", 0, true), 'htmlOptions' => array('style' => 'text-align:center;')), array('name' => 'display_order', 'htmlOptions' => array('style' => 'text-align:center;')), array('name' => 'show_in_menu', 'value' => '(!empty($data->show_in_menu) && $data->show_in_menu==1) ? "Yes" : "No"', 'filter' => array('1' => 'Yes', '0' => 'No'), 'htmlOptions' => array('style' => 'text-align:center;')))));
示例8: CmsFormatter
$mTrans = $model->rTransactions;
$cmsFormater = new CmsFormatter();
$arrVal = array("name" => $mTrans->listing->property_name_or_address, "transaction_id" => $mTrans->id);
$sPropertyName = $cmsFormater->formatpropertyname($arrVal);
$tenancy_agreement_date = $cmsFormater->formatLongDate($mTrans->tenancy_agreement_date);
$expiring_date = $cmsFormater->formatLongDate($mTrans->expiring_date);
$titleH1 = $sPropertyName . " [ {$tenancy_agreement_date} - {$expiring_date} ] ";
?>
<h1>Aircon Service: <?php
echo $titleH1;
?>
</h1>
<?php
$this->widget('zii.widgets.grid.CGridView', array('id' => 'pro-defect-grid', 'dataProvider' => $model->search(), 'afterAjaxUpdate' => 'function(id, data){ fixTargetBlank(); fnUpdateColorbox(); }', 'columns' => array(array('header' => 'S/N', 'type' => 'raw', 'value' => '$this->grid->dataProvider->pagination->currentPage * $this->grid->dataProvider->pagination->pageSize + ($row+1)', 'headerHtmlOptions' => array('width' => '30px', 'style' => 'text-align:center;'), 'htmlOptions' => array('style' => 'text-align:center;')), array('header' => 'Date/Time', 'type' => 'AirconDateTime', 'value' => '$data'), array('name' => 'remark', 'type' => 'html', 'value' => 'nl2br($data->remark)'), array('header' => 'Service Documents', 'name' => 'upload_service_documents', 'type' => 'AirconFile', 'value' => '$data'), array('header' => 'Actions', 'class' => 'CButtonColumn', 'template' => ControllerActionsName::createIndexButtonRoles($actions, array('updateAirconService')), 'buttons' => array('updateAirconService' => array('label' => 'Update Report Defect(s)', 'imageUrl' => Yii::app()->theme->baseUrl . '/img/gridview/update.png', 'options' => array('class' => 'update update_item'), 'url' => 'Yii::app()->createAbsoluteUrl("admin/transactions/updateAirconService",
array("id"=>$data->id))'))))));
?>
<script type="text/javascript" src="<?php
echo Yii::app()->theme->baseUrl;
?>
/admin/colorbox/jquery.colorbox-min.js"></script>
<link rel="stylesheet" href="<?php
echo Yii::app()->theme->baseUrl;
?>
/admin/css/colorbox.css" />
<script>
$(document).ready(function() {
示例9: array
</br>
<div class="form" style="padding-left: 0px;">
<div class="row">
<label class="required" for="UsersActions_user_id">Role: <span class="required">*</span></label>
<?php
echo CHtml::dropDownList('roles', 1, CHtml::listData(Roles::model()->findAll(), 'id', 'role_name'));
?>
<?php
//echo $form->error($model,'user_id');
?>
</div>
</div>
<?php
$this->widget('zii.widgets.grid.CGridView', array('id' => 'controllers-grid', 'dataProvider' => $model->search(), 'columns' => array(array('header' => 'S/N', 'type' => 'raw', 'value' => '$row+1', 'headerHtmlOptions' => array('width' => '30px', 'style' => 'text-align:center;'), 'htmlOptions' => array('style' => 'text-align:center;')), array('class' => 'CButtonColumn', 'template' => ControllerActionsName::createIndexButtonRoles($actions, array('update'))), 'controller_name', 'module_name', 'actions')));
?>
<div id="re"></div>
<script type="text/javascript">
$("select[name='roles']").change(rolesSession);
function rolesSession(){
var url = "<?php
echo Yii::app()->createAbsoluteUrl('admin/getactions/rolessession');
?>
";
var request = $.ajax({
type: "post",
示例10: array
<h1><?php
echo Yii::t('translation', 'Account Receivables Management');
?>
</h1>
<?php
echo CHtml::link(Yii::t('translation', '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('id' => 'fi-invoice-grid', 'dataProvider' => $model->search(), 'enableSorting' => false, 'afterAjaxUpdate' => 'function(id, data){ fixTargetBlank(); fnUpdateLink(); }', 'columns' => array(array('header' => 'S/N', 'type' => 'raw', 'value' => '$this->grid->dataProvider->pagination->currentPage * $this->grid->dataProvider->pagination->pageSize + ($row+1)', 'headerHtmlOptions' => array('width' => '30px', 'style' => 'text-align:center;'), 'htmlOptions' => array('style' => 'text-align:center;')), Yii::t('translation', 'invoice_no'), Yii::t('translation', 'transactions_no'), array('name' => 'total_amount_due', 'type' => 'Price', 'htmlOptions' => array('style' => 'text-align:right;')), array('name' => 'status', 'value' => 'FiInvoice::$STA_STATUS[$data->status]', 'htmlOptions' => array('style' => 'text-align:center;')), array('header' => 'Receipt', 'type' => 'InvoiceGenReceipt', 'value' => '$data', 'htmlOptions' => array('style' => 'text-align:center;')), array('header' => 'Actions', 'class' => 'CButtonColumn', 'template' => ControllerActionsName::createIndexButtonRoles($actions), 'buttons' => array('update' => array('visible' => 'FiInvoice::CanUpdate($data)'))))));
?>
<script type="text/javascript" src="<?php
echo Yii::app()->theme->baseUrl;
?>
/admin/colorbox/jquery.colorbox-min.js"></script>
<link rel="stylesheet" href="<?php
echo Yii::app()->theme->baseUrl;
?>
/admin/css/colorbox.css" />
<script>
$(function(){
fnUpdateLink();
});