Show
Ignore:
Timestamp:
07/07/08 22:23:03 (5 months ago)
Author:
aarkerio
Message:

Adding annotations

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • trunk/app/views/lessons/view.ctp

    r630 r632  
    11<?php 
     2//die(debug($data)); 
    23  echo '<h1>'  .$data['Lesson']['title']   . '</h1>'; 
    34  echo $html->div(null, $data['Lesson']['body']); 
    45  echo $html->div(null, __('Last edition', true). ': '.$data['Lesson']['created']); 
    56   
    6   echo $form->create('CommentsLesson', array('onsubmit'=>'return chkForm()', 'action'=>'add')); 
    7   echo $form->hidden('CommentsLesson.redirect_to', array('value'=>'/lessons/view/'.$blog['User']['username'].'/'.$data['Lesson']['id'])); 
    8   echo $form->hidden('CommentsLesson.lesson_id', array('value'=>$data['Lesson']['id'])); 
     7  echo $form->create('Annotation', array('onsubmit'=>'return chkForm()', 'action'=>'add')); 
     8  echo $form->hidden('Annotation.redirect_to', array('value'=>'/lessons/view/'.$blog['User']['username'].'/'.$data['Lesson']['id'])); 
     9  echo $form->hidden('Annotation.lesson_id', array('value'=>$data['Lesson']['id'])); 
    910        
    1011  if ( $session->check('Auth.User') ): 
     
    1516   echo $session->read('Auth.User.username') . ' ' . __('writes', true); 
    1617                  
    17    echo $form->label('CommentsLesson.comment', 'Comment'); 
    18    echo $form->textarea('CommentsLesson.comment', array('rows' => 10, 'cols' => 50)); 
    19    echo $form->error('CommentsLesson.comment', 'A comment is required.'); 
     18   echo $form->label('Annotation.comment', 'Comment'); 
     19   echo $form->textarea('Annotation.comment', array('rows' => 10, 'cols' => 50)); 
     20   echo $form->error('Annotation.comment', 'A comment is required.'); 
    2021         
    2122   echo $form->end(__('Send', true));