public function getProjectsProgress()
 {
     if (Yii::app()->user->getState('project_selected') == null) {
         // seleccionar todos los proyectos del usuario
         $ProjectsList = Projects::model()->findMyProjects(Yii::app()->user->id);
         $data = array();
         // iterar cada proyecto
         foreach ($ProjectsList as $project) {
             // buscando todas las tareas relacionadas al proyecto iterado
             $TasksList = Projects::model()->getProjectProgress($project->project_id);
             $data[] = array('name' => ECHtml::word_split($project->project_name, 10), 'data' => array(!empty($TasksList->progress) ? round($TasksList->progress, 2) : 0));
         }
     } else {
         // buscando todas las tareas relacionadas al proyecto seleccionado
         $TasksList = Projects::model()->getProjectProgress(Yii::app()->user->getState('project_selected'));
         $data[] = array('name' => ECHtml::word_split(Projects::model()->findByPk(Yii::app()->user->getState('project_selected'))->project_name, 10), 'data' => array(!empty($TasksList->progress) ? round($TasksList->progress, 2) : 0));
     }
     return $data;
 }
Exemplo n.º 2
0
<div class="view">
	<div class="grid_7">
		<h3><?php 
echo CHtml::link(CHtml::encode($data->budget_title), array('budgets/view', 'id' => $data->budget_id));
?>
</h3>
		<?php 
echo ECHtml::word_split(Yii::app()->format->ntext($data->budget_notes)) . "...";
?>
<br />
		<?php 
$this->widget('widgets.HasComments', array('countComments' => Logs::getCountComments(Yii::app()->controller->id, $data->budget_id), 'item_id' => $data->budget_id));
?>
	</div>
	<div class="grid_5">
		<div class="subcolumns">
			<div class="c33l">
				<b><?php 
echo $data->getAttributeLabel('budget_date');
?>
:</b><br />
			</div>
			<div class="c66r">
				<abbr class="timeago" title="<?php 
echo CHtml::encode(Yii::app()->dateFormatter->format('yyyy-MM-dd', $data->budget_date));
?>
">
					<?php 
echo CHtml::encode(Yii::app()->dateFormatter->formatDateTime($data->budget_date, 'medium', false));
?>
				</abbr>
Exemplo n.º 3
0
?>
			<?php 
echo CHtml::link(Yii::t('milestones', 'CreateMilestones'), Yii::app()->controller->createUrl('create'), array('class' => 'button'));
?>
			<?php 
if (Yii::app()->user->IsManager) {
    ?>
				<?php 
    echo CHtml::link(Yii::t('milestones', 'UpdateMilestones'), Yii::app()->controller->createUrl('update', array('id' => $model->milestone_id)), array('class' => 'button'));
    ?>
			<?php 
}
?>
		</div>
		<?php 
$this->widget('zii.widgets.CDetailView', array('data' => $model, 'attributes' => array(array('name' => 'milestone_description', 'type' => 'ntext', 'value' => Yii::app()->format->html(ECHtml::createLinkFromString(CHtml::encode($model->milestone_description)))), array('name' => 'milestone_duedate', 'type' => 'text', 'value' => CHtml::encode(Yii::app()->dateFormatter->formatDateTime($model->milestone_duedate, 'medium', false))), array('name' => 'user_id', 'type' => 'raw', 'value' => isset($model->user_id) ? CHtml::link(CHtml::encode($model->Users->completeName), Yii::app()->controller->createUrl("users/view", array("id" => $model->user_id))) : null), array('label' => '', 'type' => 'raw', 'value' => '<div class="prgrss-container" style="float:left;"><div style="width:' . round($percent, 2) . '%"><span>' . round($percent, 2) . '%</span></div></div>'))));
?>
		<br />
		<div id="content" class="container_12">
			<div class="portlet grid_6">
				<div class="portlet-content">
					<h1 class="ptitle tasks"><?php 
echo Yii::t('milestones', 'TasksGraphByType');
?>
</h1>
					<?php 
$this->Widget('application.extensions.highcharts.HighchartsWidget', array('options' => array('credits' => array('enabled' => false), 'chart' => array('defaultSeriesType' => 'column', 'height' => '220'), 'title' => array('text' => ''), 'yAxis' => array('title' => array('text' => 'No. de tareas'), 'label' => array('formatter' => 'js:function(){
											return this.value/1000+"k";
										}'), 'plotLines' => array('value' => 0, 'width' => 1, 'color' => '#808080')), 'xAxis' => array('categories' => array(0)), 'tooltip' => array('formatter' => 'js:function(){
										return this.y + " Tareas";
									}'), 'plotOptions' => array('column' => array('dataLabels' => array('enabled' => true))), 'legend' => array('layout' => 'horizontal', 'align' => 'center', 'verticalAlign' => 'bottom', 'backgroundColor' => '#FFFFFF', 'borderWidth' => 1), 'series' => $TasksStatus)));
<div style="position:absolute;right:20px;top:148px;z-index:100;">
	<?php 
$form = $this->beginWidget('CActiveForm', array('id' => 'search-form', 'enableAjaxValidation' => false, 'action' => Yii::app()->controller->createUrl('site/results')));
?>
	<ul id="menu">
		<li class="searchContainer">
			<div class="corners">
			<?php 
echo CHtml::textField('searchField', '', array('autocomplete' => 'off'));
?>
			<img src="css/images/magnifier.png" alt="Search" onclick="jQuery('#search-form').submit();"></div>
			<ul id="search">
				<li>
					<input id="cbxAll" type="checkbox" name="GlobalSearchForm[all]" value="1">
					<?php 
echo ECHtml::label(Yii::t('modules', 'all'), 'cbxAll');
?>
				</li>
				<?php 
foreach ($this->getModulesToSearch() as $module) {
    ?>
				<li>
					<?php 
    echo CHtml::checkbox('GlobalSearchForm[' . $module->module_name . ']', false);
    echo CHtml::label(Yii::t('modules', $module->module_name), 'GlobalSearchForm_' . $module->module_name);
    ?>
				</li>
				<?php 
}
?>
			</ul>
Exemplo n.º 5
0
<div class="view">
	<h3><?php 
echo CHtml::link("#" . $data->document_id . " - " . CHtml::encode($data->document_name), array('documents/view', 'id' => $data->document_id));
?>
</h3>
	<?php 
$countComments = Logs::getCountComments(Yii::app()->controller->id, $data->document_id);
if ($countComments > 0) {
    ?>
	<span class="jewelCount">
		<span id="jewelRequestCount">
			<?php 
    echo CHtml::link($countComments . " " . Yii::t('site', 'comments'), array('view', 'id' => $data->document_id, '#' => 'comments'), array('title' => Yii::t('site', 'comments')));
    ?>
		</span>
	</span>
	<?php 
}
?>
	<div class="moduleTextDescription corners">
		<?php 
echo ECHtml::word_split(CHtml::encode($data->document_description), 20) . "...";
?>
	</div>
	<div style="text-align:right">
		<b><?php 
echo CHtml::link(Yii::t('documents', 'ViewDetails'), array('documents/view', 'id' => $data->document_id), array('class' => 'detailsImg'));
?>
</b>
	</div>
</div>
Exemplo n.º 6
0
					</td>
				</tr>
			</tfoot>
			<tbody>
				<tr>
					<td valign="top" id="maincontent" style="padding-top:15px;">
						<p><b><?php 
echo $userposted;
?>
</b> ha creado un nuevo presupuesto para el proyecto <b><?php 
echo $projectName;
?>
</b>, los detalles a continuaci&oacute;n.</p>
						<hr />
						<?php 
$this->widget('zii.widgets.CDetailView', array('data' => $model, 'attributes' => array(array('name' => 'budget_date', 'type' => 'text', 'value' => CHtml::encode(Yii::app()->dateFormatter->formatDateTime($model->budget_date, 'medium', false))), array('name' => 'budget_duedate', 'type' => 'text', 'value' => CHtml::encode(Yii::app()->dateFormatter->formatDateTime($model->budget_duedate, 'medium', false))), array('name' => 'budget_notes', 'type' => 'raw', 'value' => Yii::app()->format->html(nl2br(ECHtml::createLinkFromString(CHtml::encode($model->budget_notes))))), array('name' => 'status_id', 'type' => 'raw', 'value' => CHtml::encode($model->Status->status_name)))));
?>
						<hr />
						<p>
							Para ver m&aacute;s informaci&oacute;n sobre este presupuesto puedes ir directamente a esta direcci&oacute;n:<br />
							<a href="<?php 
echo $applicationUrl;
?>
"><?php 
echo $applicationUrl;
?>
</a>
						</p>
						<p>
							<a href="<?php 
echo $applicationUrl;
Exemplo n.º 7
0
</h1>
				<?php 
    $this->widget('zii.widgets.jui.CJuiTabs', array('tabs' => $tabs, 'options' => array('fxAutoHeight' => true)));
    ?>
			</div>
		</div>
		<?php 
}
?>
		
		<?php 
$itemTab = array(Yii::t('projects', 'project_assumptions') => $model->project_assumptions, Yii::t('projects', 'project_warranty') => $model->project_warranty, Yii::t('projects', 'project_outReach') => $model->project_outReach);
$tabs = array();
foreach ($itemTab as $key => $value) {
    if (strlen($value) > 0) {
        $tabs[$key] = CHtml::tag('div', array('class' => 'slidetoogleContent'), Yii::app()->format->html(nl2br(ECHtml::createLinkFromString($value))));
    }
}
if (count($tabs) > 0) {
    ?>
		<div class="portlet grid_12">
			<div class="portlet-content">
				<h1 class="ptitle projectpart"><?php 
    echo Yii::t('projects', 'SpecialConsiderations');
    ?>
</h1>
				<?php 
    $this->widget('zii.widgets.jui.CJuiTabs', array('tabs' => $tabs, 'options' => array('fxAutoHeight' => true)));
    ?>
			</div>
		</div>
Exemplo n.º 8
0
			<br />
			<button class="cupid-green"><?php 
        echo Yii::t('budgetsConcepts', 'StatusAcepted');
        ?>
</button>
			<button class="cupid-red"><?php 
        echo Yii::t('budgetsConcepts', 'StatusRejected');
        ?>
</button>
		</div>
		<?php 
    }
    ?>
		
		<?php 
    echo "<div class=\"moduleTextDescription corners\"><strong>" . Yii::t('budgetsConcepts', 'Notes') . ":</strong> " . Yii::app()->format->html(nl2br(ECHtml::createLinkFromString(CHtml::encode($model->budget_notes)))) . "</div>";
    ?>
		<div class="subcolumns">
			<div class="c20l">
				<b><?php 
    echo Yii::t('projects', 'company_id');
    ?>
:</b>
			</div>
			<div class="c80r">
				<?php 
    echo CHtml::link(CHtml::encode($model->Projects->Company->company_name), Yii::app()->controller->createUrl('companies/view', array('id' => $model->Projects->Company->company_id)));
    ?>
<br />
			</div>
		</div>
Exemplo n.º 9
0
<?php

foreach ($this->getMyProjects() as $project) {
    ?>
	<div style="height:60px;">
		<div class="comm_date">
			<span class="data">
				<span class="j"><?php 
    echo CHtml::encode(CHtml::encode(Yii::app()->dateFormatter->format("dd", $project->project_endDate)));
    ?>
</span>
				<?php 
    echo CHtml::encode(CHtml::encode(Yii::app()->dateFormatter->format("MM/yy", $project->project_endDate)));
    ?>
			</span>
		</div>
		<div class="logactivity">
		<?php 
    echo CHtml::link(ECHtml::word_split(CHtml::encode($project->project_name), 4), Yii::app()->createUrl("projects/view", array("id" => $project->project_id))) . "<br />";
    echo "<span class=\"new\"><abbr class=\"timeago\" title=\"" . CHtml::encode(Yii::app()->dateFormatter->format('yyyy-MM-dd', $project->project_startDate)) . "\">" . CHtml::encode(Yii::app()->dateFormatter->format('dd-MM-yyyy', $project->project_startDate)) . "</abbr></span><br />";
    ?>
		</div>
	</div>
<?php 
}
<?php

foreach ($this->getOverdue() as $milestone) {
    ?>
	<div class="comm_date" style="background-color:#FFCFCF;">
		<span class="data">
			<span class="j"><?php 
    echo CHtml::encode(CHtml::encode(Yii::app()->dateFormatter->format("dd", $milestone->milestone_duedate)));
    ?>
</span>
			<?php 
    echo CHtml::encode(CHtml::encode(Yii::app()->dateFormatter->format("MM/yy", $milestone->milestone_duedate)));
    ?>
		</span>
	</div>
	<div class="logactivity">
		<?php 
    echo CHtml::image(Yii::app()->request->baseUrl . '/images/icons/milestonesoverd-12.png') . "&nbsp;";
    echo CHtml::link(CHtml::encode($milestone->milestone_title), Yii::app()->createUrl("milestones/view", array("id" => $milestone->milestone_id)), array('style' => 'color:#9F0000;')) . "<br />";
    echo ECHtml::word_split(CHtml::encode($milestone->milestone_description), 9) . "...";
    ?>
	</div>
	<br />
<?php 
}
Exemplo n.º 11
0
?>
%">
					<span><?php 
echo round($data->percent, 2);
?>
%</span>
				</div>
			</div>
		</div>
	</div>
	<?php 
$this->widget('widgets.HasComments', array('countComments' => Logs::getCountComments(Yii::app()->controller->id, $data->milestone_id), 'item_id' => $data->milestone_id));
?>
	<div class="moduleTextDescription corners">
		<?php 
echo ECHtml::word_split(Yii::app()->format->ntext($data->milestone_description), 20) . "...";
?>
<br />
	</div>
	<div class="subcolumns">
		<div class="c20l">
			<b><?php 
echo CHtml::encode($data->getAttributeLabel('milestone_duedate'));
?>
:</b><br />
		</div>
		<div class="c80r">
			<?php 
echo CHtml::encode(Yii::app()->dateFormatter->formatDateTime($data->milestone_duedate, "medium", false));
?>
<br />
Exemplo n.º 12
0
<?php

$activity = $this->getActivity();
foreach ($activity as $comment) {
    ?>
	<div style="border-bottom:1px solid #ccc; padding:4px;">
		<div style="float:left;width:50px;display: inline;">
			<?php 
    $this->widget('application.extensions.VGGravatarWidget.VGGravatarWidget', array('email' => CHtml::encode(Yii::app()->user->getState('user_email')), 'hashed' => false, 'default' => 'http://' . $_SERVER['SERVER_NAME'] . Yii::app()->request->baseUrl . '/images/bg-avatar.png', 'size' => 32, 'rating' => 'PG', 'htmlOptions' => array('class' => 'borderCaption', 'alt' => 'Gravatar Icon')));
    ?>
		</div>
		<div>
			<?php 
    echo CHtml::link(ECHtml::word_split($comment->comment_text, $this->lineLenght) . "...", Yii::app()->createUrl($comment->Module->module_name . "/view", array("id" => $comment->comment_resourceid, '#' => 'comment-' . $comment->comment_id)));
    ?>
			<div style="display:block; font-size:10px">
				<?php 
    echo ECHtml::word_split($this->findModuleTitle($comment->Module->module_className, $comment->Module->module_title, $comment->comment_resourceid), 5) . "... ";
    ?>
				<span class="bac" style="font-size:10px;background-color:#DFDFDF"><?php 
    echo "<abbr class=\"timeago\" title=\"" . CHtml::encode($comment->comment_date) . "\">" . CHtml::encode(Yii::app()->dateFormatter->format('dd.MM.yyyy', $comment->comment_date)) . "</abbr>";
    ?>
</span>
			</div>
		</div>
	</div>
<?php 
}
Exemplo n.º 13
0
    echo $comment->comment_date;
    ?>
"><?php 
    echo CHtml::link(CHtml::encode(Yii::app()->dateFormatter->format('dd.MM.yyyy', $comment->comment_date)), '#comment-' . CHtml::encode($comment->comment_id));
    ?>
</abbr>
			</li>
		</ul>
		<div class="body">
			<?php 
    $mystring = $comment->comment_text;
    $findme = Status::STATUS_COMMENT;
    $pos = strpos($mystring, $findme);
    // Es un comentario escrito por el usuario
    if ($pos === false) {
        echo Yii::app()->format->html(nl2br(ECHtml::createLinkFromString(CHtml::encode($comment->comment_text))));
    } else {
        $patterns = array();
        $patterns[0] = '/' . Status::STATUS_COMMENT . '/';
        $replacements = array();
        $replacements[0] = Yii::t('tasks', 'StatusChanged');
        $newStringComment = preg_replace($patterns, $replacements, $mystring);
        echo substr($newStringComment, 0, -1);
        $statusString = strstr($newStringComment, ': ');
        $status = substr($statusString, 2, strlen($statusString));
        echo "<span class=\"status st" . $status . "\">" . Status::model()->findByPk($status)->status_name . "</span>";
    }
    ?>
		</div>
		<?php 
    $documents = $this->getAttachments($comment->comment_id);
Exemplo n.º 14
0
<h1 class="ptitleinfo milestones"><?php 
echo $model->milestone_title;
?>
</h1>
<?php 
$this->widget('zii.widgets.CDetailView', array('data' => $model, 'attributes' => array(array('name' => 'milestone_description', 'type' => 'ntext', 'value' => Yii::app()->format->html(nl2br(ECHtml::createLinkFromString(CHtml::encode($model->milestone_description))))), array('name' => 'milestone_duedate', 'type' => 'text', 'value' => CHtml::encode(Yii::app()->dateFormatter->formatDateTime($model->milestone_duedate, "medium", false))), array('name' => 'user_id', 'type' => 'raw', 'value' => isset($model->user_id) ? CHtml::link(CHtml::encode($model->Users->completeName), Yii::app()->controller->createUrl("users/view", array("id" => $model->user_id))) : null))));
?>
<br />
			<?php 
    echo CHtml::image(Yii::app()->request->baseUrl . '/images/icons/' . CHtml::encode($log->Module->module_name) . '.png');
    ?>
		</span>
	</div>
	<div class="logactivity">
		<?php 
    $output = "";
    // Si no es comentario el enlace
    if ($log->log_commentid == 0) {
        // Si no es del tipo controllerConcepts
        if (strpos($log->Module->module_name, "concepts") === false) {
            $output .= CHtml::link(Yii::t('logs', $log->log_activity), Yii::app()->controller->createUrl($log->Module->module_name . "/view", array("id" => $log->log_resourceid))) . " " . Yii::t('site', 'by') . " ";
        } else {
            $output .= CHtml::link(Yii::t('logs', $log->log_activity), Yii::app()->controller->createUrl($log->Module->module_name . "/index", array("owner" => $log->log_resourceid))) . " " . Yii::t('site', 'by') . " ";
        }
    } else {
        $output .= CHtml::link(Yii::t('logs', $log->log_activity), Yii::app()->controller->createUrl($log->Module->module_name . "/view", array("id" => $log->log_resourceid, "#" => "comment-" . $log->log_commentid))) . " " . Yii::t('site', 'by') . " ";
    }
    $output .= CHtml::link(CHtml::encode($log->User->completeName), Yii::app()->controller->createUrl("users/view", array("id" => $log->User->user_id))) . "<br />";
    if (strpos($log->Module->module_name, "concepts") === false) {
        $output .= " " . Yii::t('logs', 'in') . " " . CHtml::link(ECHtml::word_split($log->getTitleFromLogItem($log->log_resourceid, $log->Module->module_className, $log->Module->module_title), 8), Yii::app()->controller->createUrl($log->Module->module_name . "/view", array("id" => $log->log_resourceid))) . "&nbsp;<br />";
    } else {
        $output .= " " . Yii::t('logs', 'in') . " " . CHtml::link(ECHtml::word_split($log->getTitleFromLogItem($log->log_resourceid, $log->Module->module_className, $log->Module->module_title), 8), Yii::app()->controller->createUrl($log->Module->module_name . "/index", array("owner" => $log->log_resourceid))) . "&nbsp;<br />";
    }
    $output .= "&nbsp;<span class='bac' style=\"font-size:10px;background-color:" . (strtotime($log->log_date) < strtotime(date("Y-m-d")) ? '#DFDFDF' : '#C7EFB3') . ";\"><abbr class=\"timeago\" title=\"" . CHtml::encode($log->log_date) . "\">" . CHtml::encode(Yii::app()->dateFormatter->format('dd.MM.yyyy', $log->log_date)) . "</abbr></span>";
    echo $output;
    ?>
	</div>
<?php 
}
Exemplo n.º 16
0
    ?>
			<?php 
}
?>
			<?php 
if (Yii::app()->user->checkAccess('updateCases')) {
    ?>
				<?php 
    echo CHtml::link(Yii::t('cases', 'UpdateCases'), Yii::app()->controller->createUrl('update', array('id' => $model->case_id)), array('class' => 'button'));
    ?>
			<?php 
}
?>
		</div>
		<?php 
$this->widget('zii.widgets.CDetailView', array('data' => $model, 'attributes' => array(array('name' => 'case_date', 'type' => 'text', 'value' => CHtml::encode(Yii::app()->dateFormatter->formatDateTime($model->case_date, 'medium', false))), array('name' => 'case_code', 'type' => 'raw', 'value' => CHtml::encode($model->case_code), 'visible' => !empty($model->case_code) ? true : false), array('name' => 'case_actors', 'type' => 'raw', 'value' => CHtml::encode($model->case_actors), 'visible' => !empty($model->case_actors) ? true : false), array('name' => 'case_description', 'type' => 'raw', 'value' => Yii::app()->format->html(nl2br(ECHtml::createLinkFromString(CHtml::encode($model->case_description))))), array('label' => 'Status', 'type' => 'raw', 'value' => Yii::app()->user->checkAccess('changeStatusCases') && $model->status_id != Status::STATUS_CANCELLED && $model->status_id != Status::STATUS_ACCEPTED && $model->status_id != Status::STATUS_CLOSED ? '<span class="text status st' . CHtml::encode($model->Status->status_id) . '">' . CHtml::encode($model->Status->status_name) . '</span><div class="actions"><a class="edit" href="#"> _Edit</a></div>' : '<span class="text status st' . CHtml::encode($model->Status->status_id) . '">' . CHtml::encode($model->Status->status_name) . '</span>', 'cssClass' => 'statusContent', 'visible' => Yii::app()->user->checkAccess('changeStatusCases')), array('name' => 'case_requirements', 'type' => 'raw', 'value' => Yii::app()->format->html(nl2br(ECHtml::createLinkFromString(CHtml::encode($model->case_requirements)))), 'visible' => !empty($model->case_requirements) ? true : false))));
?>
		<br />
		<div class="portlet x12">
			<div class="portlet-content">
				<h1 class="ptitle"><?php 
echo Yii::t('cases', 'Secuences');
?>
</h1>
				<?php 
if (Yii::app()->user->checkAccess('createSecuences')) {
    ?>
				<ul class="portlet-tab-nav">
					<li class="portlet-tab-nav-active">
						<?php 
    echo CHtml::link(CHtml::encode(Yii::t('cases', 'SecuencesAdd')), Yii::app()->createUrl("secuences/create", array('owner' => $model->case_id)), array('id' => 'secuencesCreate'));
Exemplo n.º 17
0
<?php

$activity = $this->getActivity();
foreach ($activity as $task) {
    ?>
	<div style="height:28px">
		<?php 
    echo CHtml::tag("span", array("class" => "priority st" . $task->status_id), $task->Status->status_name) . " ";
    echo CHtml::link(ECHtml::word_split($task->task_name, $this->lineLenght) . "...", Yii::app()->createUrl("tasks/view", array("id" => $task->task_id)));
    ?>
	</div>
<?php 
}
Exemplo n.º 18
0
<div class="view">
	<h3><?php 
echo CHtml::link("#" . $data->case_id . " - " . CHtml::encode($data->case_name), Yii::app()->controller->createUrl("cases/view", array("id" => $data->case_id)));
?>
</h3>
	<?php 
$this->widget('widgets.HasComments', array('countComments' => Logs::getCountComments(Yii::app()->controller->id, $data->case_id), 'item_id' => $data->case_id));
?>
	<div class="moduleTextDescription corners">
		<?php 
echo ECHtml::word_split(CHtml::encode($data->case_description), 20) . "...";
?>
<br />
	</div>
	
	<div class="subcolumns">
		<div class="c33l">
			<?php 
if (!empty($data->case_code)) {
    ?>
			<div class="subcolumns">
				<div class="c38l">
					<b><?php 
    echo $data->getAttributeLabel('case_code');
    ?>
:</b>
				</div>
				<div class="c62r">
					<?php 
    echo CHtml::encode($data->case_code);
    ?>
Exemplo n.º 19
0
?>
			<?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) {
    ?>
				<?php 
    echo CHtml::link(Yii::t('tasks', 'UpdateTasks'), Yii::app()->controller->createUrl('update', array('id' => $model->task_id)), array('class' => 'button'));
    ?>
			<?php 
}
?>
		</div>
		<?php 
$this->widget('zii.widgets.CDetailView', array('data' => $model, 'attributes' => array(array('name' => 'task_description', 'type' => 'raw', 'value' => Yii::app()->format->html(nl2br(ECHtml::createLinkFromString(CHtml::encode($model->task_description))))), array('name' => 'task_buildNumber', 'type' => 'raw', 'value' => CHtml::encode($model->task_buildNumber), 'visible' => !empty($model->task_buildNumber)), array('name' => 'user_id', 'type' => 'raw', 'value' => CHtml::link($model->UserReported->CompleteName, Yii::app()->controller->createUrl("users/view", array("id" => $model->user_id)))), array('name' => 'task_startDate', 'type' => 'text', 'value' => CHtml::encode(Yii::app()->dateFormatter->formatDateTime($model->task_startDate, "medium", false)), 'visible' => $model->task_startDate != '0000-00-00'), array('name' => 'task_endDate', 'type' => 'text', 'value' => CHtml::encode(Yii::app()->dateFormatter->formatDateTime($model->task_endDate, "medium", false)), 'visible' => $model->task_endDate != '0000-00-00'), array('name' => 'taskStage_id', 'type' => 'raw', 'value' => $model->Stage->taskStage_name, 'visible' => !empty($model->taskStage_id)), array('name' => 'status_id', 'type' => 'raw', 'value' => Yii::app()->user->checkAccess('changeStatusTasks') && $model->status_id != Status::STATUS_CANCELLED && $model->status_id != Status::STATUS_CLOSED && Yii::app()->user->HasJoined ? '<span class="text status st' . CHtml::encode($model->status_id) . '">' . CHtml::encode($model->Status->status_name) . '</span><div class="actions"><a class="edit" href="#"> _Edit</a></div>' : '<span class="text status st' . CHtml::encode($model->status_id) . '">' . CHtml::encode($model->Status->status_name) . '</span><div class="actions" style="display:none;"><a class="edit" href="#"> _Edit</a></div>', 'cssClass' => 'statusContent', 'visible' => Yii::app()->user->checkAccess('changeStatusTasks')), array('name' => 'taskTypes_id', 'type' => 'raw', 'value' => '<span class="text tasktypes tty' . $model->taskTypes_id . '">' . $model->Types->taskTypes_name . '</span>', 'cssClass' => 'typesContent'), array('name' => 'case_id', 'type' => 'raw', 'value' => !empty($model->Cases->case_name) ? CHtml::link($model->Cases->case_name, Yii::app()->createUrl('cases/view', array('id' => $model->case_id))) : null, 'visible' => !empty($model->Cases->case_name)), array('name' => 'milestone_id', 'type' => 'raw', 'value' => !empty($model->Milestones->milestone_title) ? CHtml::link($model->Milestones->milestone_title, Yii::app()->createUrl('milestones/view', array('id' => $model->milestone_id))) : null, 'visible' => !empty($model->Milestones->milestone_title)))));
?>
			<br />
			<div class="portlet grid_12">
				<div class="portlet-content">
					<h1 class="ptitle users"><?php 
echo Yii::t('tasks', 'UsersWorkingOn');
?>
</h1>
				</div>
				<?php 
if ((bool) Yii::app()->user->IsManager == true && $model->status_id != Status::STATUS_CANCELLED && $model->status_id != Status::STATUS_CLOSED) {
    ?>
				<div style="width:150px;" class="tzSelect">
					<div class="selectBox"><?php 
    echo Yii::t('tasks', 'UsersWorkingOn');
Exemplo n.º 20
0
echo $model->document_name;
?>
</h1>
		<div class="button-group portlet-tab-nav">
			<?php 
echo CHtml::link(Yii::t('documents', 'ListDocuments'), Yii::app()->controller->createUrl('index'), array('class' => 'button primary'));
?>
			<?php 
echo CHtml::link(Yii::t('documents', 'CreateDocuments'), Yii::app()->controller->createUrl('create'), array('class' => 'button'));
?>
			<?php 
echo CHtml::link(Yii::t('documents', 'UpdateDocuments'), Yii::app()->controller->createUrl('update', array('id' => $model->document_id)), array('class' => 'button'));
?>
		</div>
		<?php 
$this->widget('zii.widgets.CDetailView', array('data' => $model, 'attributes' => array('document_name', array('name' => 'document_description', 'type' => 'raw', 'value' => Yii::app()->format->html(nl2br(ECHtml::createLinkFromString(CHtml::encode($model->document_description))))), array('name' => 'document_uploadDate', 'type' => 'raw', 'value' => CHtml::encode(Yii::app()->dateFormatter->formatDateTime($model->document_uploadDate, "medium", false))), 'document_revision', array('name' => 'user_id', 'type' => 'raw', 'value' => CHtml::encode($model->User->CompleteName)))));
?>
		<br /><hr />
		<div class="portlet x12">
			<div class="portlet-content">
				<h1 class="ptitle"><?php 
echo Yii::t('documents', 'lastRevision');
?>
</h1>
				<?php 
$this->widget('zii.widgets.grid.CGridView', array('id' => 'documents-grid', 'cssFile' => 'Yii::app()->clientScript->registerCssFile(Yii::app()->request->baseUrl."/css/screen.css")', 'dataProvider' => $dataProvider, 'summaryText' => Yii::t('site', 'summaryText'), 'emptyText' => Yii::t('site', 'emptyText'), 'columns' => array(array('name' => 'document_revision', 'type' => 'raw', 'htmlOptions' => array('width' => '5%', 'style' => 'text-align:center'), 'value' => '$data->document_revision'), 'document_description', array('name' => 'document_type', 'type' => 'raw', 'htmlOptions' => array('width' => '10%', 'style' => 'text-align:center'), 'value' => 'CHtml::image(Yii::app()->request->baseUrl."/images/filetypes/file_extension_".end(explode("/", $data->document_type)).".png")'), array('name' => 'document_uploadDate', 'type' => 'raw', 'htmlOptions' => array('width' => '10%', 'style' => 'text-align:center'), 'value' => 'CHtml::encode(Yii::app()->dateFormatter->formatDateTime($data->document_uploadDate, "medium", false))'), array('name' => Yii::t('documents', 'download'), 'type' => 'raw', 'htmlOptions' => array('width' => '15%', 'style' => 'text-align:center'), 'value' => 'CHtml::link(Yii::t("documents","downloadFile"),Yii::app()->controller->createUrl("documents/download",array("id"=>$data->document_id)), array("target"=>"_blank","class"=>(in_array($data->document_type,array("image/png","image/jpeg","image/gif","image/bmp")))?"lnkdownloadimage":"lnkdownloadfile"))'))));
?>
				<?php 
$this->widget('application.extensions.YiiColorBox.Colorbox', array('element' => '.lnkdownloadimage', 'options' => array('width' => '800px', 'height' => '450px')));
?>
			</div>
Exemplo n.º 21
0
?>
			<?php 
echo CHtml::link(Yii::t('budgets', 'CreateBudget'), Yii::app()->controller->createUrl('create'), array('class' => 'button'));
?>
			<?php 
if (Yii::app()->user->IsManager && $model->status_id != Status::STATUS_CANCELLED && $model->status_id != Status::STATUS_ACCEPTED && strtotime($model->budget_duedate) >= strtotime(date("Y-m-d"))) {
    ?>
				<?php 
    echo CHtml::link(Yii::t('budgets', 'UpdateBudget'), Yii::app()->controller->createUrl('update', array('id' => $model->budget_id)), array('class' => 'button'));
    ?>
			<?php 
}
?>
		</div>
		<?php 
$this->widget('zii.widgets.CDetailView', array('data' => $model, 'attributes' => array(array('name' => 'budget_date', 'type' => 'text', 'value' => CHtml::encode(Yii::app()->dateFormatter->formatDateTime($model->budget_date, 'medium', false))), array('name' => 'budget_duedate', 'type' => 'text', 'value' => CHtml::encode(Yii::app()->dateFormatter->formatDateTime($model->budget_duedate, 'medium', false))), array('name' => 'budget_notes', 'type' => 'raw', 'value' => Yii::app()->format->html(nl2br(ECHtml::createLinkFromString(CHtml::encode($model->budget_notes))))), array('name' => 'status_id', 'type' => 'raw', 'value' => Yii::app()->user->checkAccess('changeStatusBudgets') && $model->status_id != Status::STATUS_CANCELLED && $model->status_id != Status::STATUS_ACCEPTED && strtotime($model->budget_duedate) >= strtotime(date("Y-m-d")) ? '<span class="text status st' . CHtml::encode($model->status_id) . '">' . CHtml::encode($model->Status->status_name) . '</span><div class="actions"><a class="edit" href="#"> _Edit</a></div>' : '<span class="text status st' . CHtml::encode($model->status_id) . '">' . CHtml::encode($model->Status->status_name) . '</span>', 'cssClass' => 'statusContent'), array('name' => Yii::t('budgets', 'BudgetCost'), 'type' => 'raw', 'value' => Yii::app()->NumberFormatter->formatCurrency(CHtml::encode($model->Cost), $model->Projects->Currency->currency_code) . " " . $model->Projects->Currency->currency_code), array('type' => 'html', 'value' => '<b>' . CHtml::link(Yii::t('budgets', 'ViewDetailsBudget'), array('bconcepts/index', 'owner' => $model->budget_id)) . '</b>'))));
?>
		<br />
		<div class="result">
		<?php 
$this->widget('widgets.ListComments', array('resourceid' => $model->budget_id, 'moduleid' => Yii::app()->controller->id));
?>
		</div>

		<?php 
Yii::app()->clientScript->registerScript('jQueryStatusEditInPlace', '
			$(document).ready(function() {
				var currentStatus;
				$(".statusContent a").live("click",function(e){
					currentStatus = $(this).closest(".statusContent");
					e.preventDefault();