我创建了一个关系请求页面, 现在的问题是, 当我进行关系活动时, 它会继续显示在视图中。 我只要显示字段活动 =false 的要求 。
这是我的请求控制器,它因为阵列而坠毁, 我怎样才能绕过这个?
public function request(){
$this->set( title_for_layout , Relationships );
$this->set( stylesheet_used , homestyle );
$this->set( image_used , eBOXLogoHome.jpg );
$this->layout= home_layout ;
$userid = $this->Auth->user( username );
$this->set( Relationships , $this->Relationship->find( all , array( conditions => array( Relationship.partytwo => $userid)) array( conditions =>array( Relationship.active =false))));
}
笑笑,这是我的观点
<?php foreach($Relationships as $relationship):?>
<tr>
<td align= center ><?php echo $relationship[ Relationship ][ partyone ]; ?></td>
<td align= center ><?php echo $relationship[ Relationship ][ partytwo ]; ?></td>
<td> </td>
<td><?php echo $this->Html->link($relationship[ Relationship ][ partyone ], array( action => approve , $relationship[ Relationship ][ id ])); ;?>
</td>
</tr>
<?php endforeach; ?>
</table>