On page 210, it says this
“One other small change we made as to add a simple link from the project details page so we could access this form form the application. The following line was added to the project show.php view file’s list of link options:”
[<?php echo CHtml::link('Add User To Project',array('adduser','id'=>$m odel->projectId)); ?>]
First, I cannot find a
show.php
file in the source code that I got with the book, so that’s one problem.
Second, assuming that show.php might actually be /views/project/view.php, there’s a discrepancy because view.php has
if(Yii::app()->user->checkAccess('createUser',array('project'=>$model)))
{
$this->menu[] = array('label'=>'Add User To Project', 'url'=>array('adduser', 'id'=>$model->id));
}
Anyways, when I put this into my view.php, the link doesn’t show up. I’m wondering if it could be related to the problem I have in the next thread, about the CDbException