2012-07-02 10 views
0

모델, 컨트롤러, 콘솔로보기를 구웠습니다. 그런 다음 View/xxx/index.ctp의 내용을 변경했지만 웹 페이지에 변경 사항이 적용되지 않았습니다.변경시 케이크보기가 업데이트되지 않음

어떤 생각이 잘못되었을 수 있습니까?

편집 :


보기/로그/index.ctp

<div class="logs index"> 
    <h2><?php echo __('SystemLogs');?></h2> 
    <table cellpadding="0" cellspacing="0"> 
    <tr>  
      <th><?php echo $this->Paginator->sort('isError');?></th> 
      <th><?php echo $this->Paginator->sort('id');?></th> 
      <th><?php echo $this->Paginator->sort('timestamp');?></th> 
      <th><?php echo $this->Paginator->sort('category');?></th> 
      <th><?php echo $this->Paginator->sort('action');?></th> 
      <th><?php echo $this->Paginator->sort('detail');?></th> 

    </tr> 
    <?php 

    foreach ($logs as $log): ?> 
    <tr> 
     <td> 
      <?php 
      if (($log['Log']['isError'] == 1){ 
       echo h("ERR"); 
      }else{ 
       echo h("NFO"); 
      } 

     ?>&nbsp; </td> 

     <td><?php echo h($log['Log']['id']); ?>&nbsp;</td> 
     <td><?php echo h($log['Log']['timestamp']); ?>&nbsp;</td> 
     <td><?php echo h($log['Log']['category']); ?>&nbsp;</td> 
     <td><?php echo h($log['Log']['action']); ?>&nbsp;</td> 
     <td><?php echo h($log['Log']['detail']); ?>&nbsp; <br> 
      (User: <?php echo h($log['Log']['userID']); ?>)<br> 
      (PersID: <?php echo h($log['Log']['PersonalID']); ?>) 
     </td> 

    </tr> 
<?php endforeach; ?> 
    </table> 
    <p> 
    <?php 
    echo $this->Paginator->counter(array(
    'format' => __('Page {:page} of {:pages}, showing {:current} records out of {:count} total, starting on record {:start}, ending on {:end}') 
    )); 
    ?> </p> 

    <div class="paging"> 
    <?php 
     echo $this->Paginator->prev('< ' . __('previous'), array(), null, array('class' => 'prev disabled')); 
     echo $this->Paginator->numbers(array('separator' => '')); 
     echo $this->Paginator->next(__('next') . ' >', array(), null, array('class' => 'next disabled')); 
    ?> 
    </div> 
</div> 

모델로 사용하는 캐시/Log.php

<?php 
App::uses('AppModel', 'Model'); 
/** 
* Log Model 
* 
*/ 
class Log extends AppModel { 
/** 
* Display field 
* 
* @var string 
*/ 

    var $order = "Log.timestamp desc"; 
    public $displayField = 'detail'; 
} 

컨트롤러/LogsController.php는

<?php 
App::uses('AppController', 'Controller'); 
/** 
* Logs Controller 
* 
*/ 

class LogsController extends AppController { 

/** 
* Scaffold 
* 
* @var mixed 
*/ 
    var $name = "Logs"; 
    public $scaffold; 


} 
+0

캐시를 사용합니까? – 472084

+0

코드를 보지 않고서는 말하기가 다소 어렵습니다. 관련 비트를 포함하도록 이것을 편집 하시겠습니까? 이것은 그렇지 않으면 빨리 폐쇄 될 것입니다. –

+0

index.ctp의 내용이 표시되지 않음 –

답변

1

당신은 LogsController 내부 index() 조치를 필요가 없습니다.

public function index() { 
    $this->Log->recursive = 0; 
    $this->set('logs', $this->paginate()); 
} 
1

public $scaffold; 줄을 제거하고 변경 사항이 적용됩니다 :

당신은 같은 일을 만들 수 있습니다. 비계는 케이크가 당신을 위해 부호를 생성 할 것이라는 점을 의미한다.

관련 문제