Skip to content

Commit

Permalink
added task history box in the logupdate form
Browse files Browse the repository at this point in the history
  • Loading branch information
thevikas committed Jun 9, 2013
1 parent b8674c4 commit b2c105a
Show file tree
Hide file tree
Showing 4 changed files with 30 additions and 1 deletion.
12 changes: 12 additions & 0 deletions css/main.css
Original file line number Diff line number Diff line change
Expand Up @@ -338,4 +338,16 @@ strong.update
ol#objlist ol li.task
{
background-color: skyblue;
}
table.tasklog
{
background-color: pink;
float:right;
width: 500px;
}

table.tasklog tr
{
border-top: solid 1px blue;
padding: 2px;
}
2 changes: 1 addition & 1 deletion protected/controllers/TasksController.php
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ public function actionLogbook($id)
$this->redirect(array('/objectives/index'));
}
}
$this->render('logbook',array('model'=>$model));
$this->render('logbook',array('model'=>$model,'task' => $task));
}

public function actionNew($id_objective = 0)
Expand Down
13 changes: 13 additions & 0 deletions protected/views/tasks/_taskhistory.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<table class="tasklog">
<?php
foreach($task->tasklogs as $log)
{
?>
<tr>
<td><?php echo $log->dated; ?></td>
<td><?php echo $log->comment; ?></td>
</tr>
<?php
}
?>
</table>
4 changes: 4 additions & 0 deletions protected/views/tasks/logbook.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@
/* @var $form CActiveForm */
?>

<?php
echo $this->renderPartial('_taskhistory',array('task' => $task));
?>

<div class="form">

<?php $form=$this->beginWidget('CActiveForm', array(
Expand Down

0 comments on commit b2c105a

Please sign in to comment.