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


PHP Tasks::getNameOfTaskPriority方法代码示例

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


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

示例1: array

	<div class="portlet-content">
		<div class="grid_8">
			<h1 class="ptitleinfo tasks">
				<?php 
echo $model->task_name;
?>
			</h1>
		</div>
		<div class="grid_4">
			<h1 class="prtribbon">
				<span class="priority pr<?php 
echo CHtml::encode($model->task_priority);
?>
">
					<?php 
echo Tasks::getNameOfTaskPriority($model->task_priority);
?>
				</span>
			</h1>
		</div>
		<div class="clear">&nbsp;</div>
		<div class="button-group portlet-tab-nav">
			<?php 
echo CHtml::link(Yii::t('tasks', 'ListTasks'), Yii::app()->controller->createUrl('index'), array('class' => 'button primary'));
?>
			<?php 
echo CHtml::link(Yii::t('tasks', 'CreateTasks'), Yii::app()->controller->createUrl('create'), array('class' => 'button'));
?>
			<?php 
if ($model->user_id == Yii::app()->user->id && $model->status_id == Status::STATUS_PENDING) {
    ?>
开发者ID:lanzelotik,项目名称:celestic-community,代码行数:31,代码来源:view.php

示例2: array

			<?php 
echo CHtml::link("#" . $data->task_id . " - " . CHtml::encode($data->task_name), array('tasks/view', 'id' => $data->task_id));
?>
		</h3>
		<?php 
echo ECHtml::word_split(CHtml::encode($data->task_description), 20) . "...";
?>
<br />
	</div>
	<div class="grid_5">
		<span style="float:right" class="priority pr<?php 
echo CHtml::encode($data->task_priority);
?>
">
			<?php 
echo Tasks::getNameOfTaskPriority($data->task_priority);
?>
		</span>
		<?php 
if (Users::countWorkersByTask($data->task_id) > 0) {
    ?>
		<div style="float:left;">
			<?php 
    echo CHtml::image(Yii::app()->request->baseUrl . '/images/collaborators.png', '', array('style' => 'vertical-align:middle;')) . " " . CHtml::link(Yii::t('tasks', 'viewCollaborators'), Yii::app()->createUrl('tasks/ShowWorkers', array('id' => $data->task_id)), array('class' => 'viewCollaborators'));
    ?>
		</div>
		<?php 
}
?>
		<?php 
if (substr($data->task_startDate, 0, 10) != '0000-00-00') {
开发者ID:lanzelotik,项目名称:celestic-community,代码行数:31,代码来源:_view.php

示例3: actionView

 /**
  * Displays a particular model.
  * @return string with success message
  */
 public function actionView($id)
 {
     // check if user has permission to viewMilestones
     if (Yii::app()->user->checkAccess('viewMilestones')) {
         // get Invoice object model
         $model = $this->loadModel($id);
         // Tasks dataprovider
         $dataProviderTasks = Tasks::model()->findAll(array('condition' => 't.milestone_id = :milestone_id', 'params' => array(':milestone_id' => $model->milestone_id), 'order' => 't.status_id ASC, t.task_priority DESC'));
         // finding by status
         $criteria = new CDbCriteria();
         $criteria->select = "count(t.status_id) as total";
         $criteria->condition = "t.milestone_id = :milestone_id";
         $criteria->params = array(':milestone_id' => $id);
         $criteria->group = "t.status_id";
         $foundTasksStatus = Tasks::model()->with('Status')->together()->findAll($criteria);
         $TasksStatus = array();
         foreach ($foundTasksStatus as $task) {
             $TasksStatus[] = array('name' => $task->Status->status_name, 'data' => intval($task->total));
         }
         // finding by priority
         $criteria = new CDbCriteria();
         $criteria->select = "t.task_priority, count(t.task_priority) as total";
         $criteria->condition = "t.milestone_id = :milestone_id";
         $criteria->params = array(':milestone_id' => $id);
         $criteria->group = "t.task_priority";
         $foundTasksPriority = Tasks::model()->findAll($criteria);
         $TasksPriority = array();
         foreach ($foundTasksPriority as $task) {
             $TasksPriority[] = array(Tasks::getNameOfTaskPriority($task->task_priority), intval($task->total));
         }
         // output view
         $this->render('view', array('model' => $model, 'percent' => Milestones::model()->getMilestonePercent($model->milestone_id), 'dataProviderTasks' => $dataProviderTasks, 'TasksStatus' => $TasksStatus, 'TasksPriority' => $TasksPriority));
     } else {
         throw new CHttpException(403, Yii::t('site', '403_Error'));
     }
 }
开发者ID:lanzelotik,项目名称:celestic-community,代码行数:40,代码来源:MilestonesController.php


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