コード例 #1
0
ファイル: list.php プロジェクト: nico13051995/IntITA
?>
<table id="data-list">
<thead>
	<tr>
		<th></th>
<?php
if(!empty($urlSub))
{
		?><th>
			<?php echo (!empty($clientData['subHrefTitle']) ? $clientData['subHrefTitle'].'<br/>' : '')?>
			<small><?php echo Yii::t('AutoAdmin.common', 'Click on the icons below to go down to the next interface')?></small>
		</th><?php
	$numCols++;
}

$urlForSort = AAHelperUrl::stripParam($baseURL, 'sortBy');
$sortDir = ($sortBy < 0 ? '-' : '');
foreach($fields as $k=>$field)
{	//Display table header
	if(!$field->showInList)
		continue;
	$class = 'data';
	if(!is_null($sortBy) && abs($sortBy)==$k+1)
	{
		$urlSort = AAHelperUrl::addParam($urlForSort, 'sortBy', -1*$sortBy);
		$class .= ' '.($sortBy <= 0 ? 'sort-desc' : 'sort-asc');
	}
	else
		$urlSort = AAHelperUrl::addParam($urlForSort, 'sortBy', $sortDir.($k+1));

	echo CHtml::tag('th', array('class'=>$class), CHtml::link($field->label, $urlSort));
コード例 #2
0
ファイル: AutoAdmin.php プロジェクト: nico13051995/IntITA
	/**
	 * Outputs results of operations.
	 * @param array $dataToPass Specific data to pass into the view script.
	 */
	protected function resultMode($dataToPass=array())
	{
		$dataToPass['redirectURL'] = AAHelperUrl::stripParam(Yii::app()->request->requestUri, array('action', 'sure'));
		foreach($this->_data->pk as $pkField=>$value)
			$dataToPass['redirectURL'] = AAHelperUrl::stripParam($dataToPass['redirectURL'], "id[{$pkField}]");
		$this->_controller->render($this->viewsPath.'editResult', array_merge($dataToPass, $this->_viewData));
	}
コード例 #3
0
ファイル: edit.php プロジェクト: nico13051995/IntITA
<?php
Yii::app()->clientScript
	->registerCssFile(AutoAdmin::$assetPath.'/css/edit.css')
	->registerScriptFile(AutoAdmin::$assetPath.'/js/edit.js');

$url = AAHelperUrl::replaceParam($baseURL, 'action', ($manageAction == 'edit' ? 'update' : 'insert'));

if(empty($this->breadcrumbs))
	$this->breadcrumbs[$this->pageTitle] = AAHelperUrl::stripParam($url, array('action', 'id'));
else
{
	$key = array_search($this->pageTitle, $this->breadcrumbs);
	if(is_numeric($key))
	{
		unset($this->breadcrumbs[$key]);
		$this->breadcrumbs[$this->pageTitle] = AAHelperUrl::stripParam($url, array('action', 'id'));
	}
}
?>
<h1><?php echo $this->pageTitle?></h1>
<?php
if(!empty($partialViews['up']))
	$this->renderPartial($partialViews['up'], $clientData);

if(!empty($clientData['subtitle']))
{
	?><h2><?php echo $clientData['subtitle']?></h2><?php
}
if(!empty($clientData['subhtml']))
{
	echo $clientData['subhtml'];