Changeset 354
- Timestamp:
- 03/28/08 12:50:07 (10 months ago)
- Location:
- trunk/app
- Files:
-
- 8 modified
-
controllers/ecourses_controller.php (modified) (4 diffs)
-
controllers/lessons_controller.php (modified) (1 diff)
-
views/ecourses/admin_add.ctp (modified) (1 diff)
-
views/ecourses/admin_edit.ctp (modified) (1 diff)
-
views/lessons/admin_add.ctp (modified) (2 diffs)
-
views/lessons/admin_edit.ctp (modified) (3 diffs)
-
webroot/js/fckeditor/editor/filemanager/connectors/php/connector.php (modified) (1 diff)
-
webroot/js/fckeditor/fckeditor_php5.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/app/controllers/ecourses_controller.php
r352 r354 65 65 { 66 66 $this->Ecourse->filed(); //show filed classrooms 67 67 68 68 $this->set('historic', true); 69 69 } 70 70 71 71 $order = "Ecourse.id DESC"; 72 72 73 //die( debug($this->Ecourse->find($conditions)));74 75 73 $this->set('data', $this->Ecourse->find($conditions)); 76 74 } … … 111 109 if ($this->Ecourse->save($this->data['Ecourse'])) 112 110 { 113 $this->msgFlash('Course saved', '/admin/ecourses/ listing');111 $this->msgFlash('Course saved', '/admin/ecourses/edit/'.$this->Ecourse->getLastInsertID()); 114 112 } 115 113 } … … 118 116 public function admin_edit($id = null) 119 117 { 120 $this->set('subjects', Set::combine($this->Ecourse->Subject->find('all', array('order' => 'title')), "{n}.Subject.id","{n}.Subject.title")); 118 $this->layout = 'admin'; 119 120 $this->set('subjects', Set::combine($this->Ecourse->Subject->find('all', array('order' => 'title')), "{n}.Subject.id","{n}.Subject.title")); 121 121 122 122 $this->set('langs', Set::combine($this->Ecourse->Lang->find('all', array('order' => 'lang')), "{n}.Lang.id","{n}.Lang.lang")); … … 124 124 if ( empty($this->data['Ecourse']) ) 125 125 { 126 $this->layout = 'admin';127 126 128 127 $this->Ecourse->id = $id; -
trunk/app/controllers/lessons_controller.php
r353 r354 70 70 } 71 71 72 /*** 73 === ADMIN METHODS 74 ****/ 72 /*** === ADMIN METHODS ****/ 75 73 public function admin_listing() 76 74 { -
trunk/app/views/ecourses/admin_add.ctp
r342 r354 5 5 <fieldset> 6 6 <legend>New Course</legend> 7 <?php 8 9 echo $form->input('Ecourse.title', array("size" => 30, "maxlength" => 90, 'title'=>' e.g. History of Literature')); 7 <table><tr><td> 8 <?php 9 echo $form->input('Ecourse.title', array("size" => 37, "maxlength" => 90, 'title'=>' e.g. History of Literature')); 10 ?> 11 </td><td> 12 <?php 13 echo $form->label('Ecourse.subject_id', 'Subject:'); 14 echo $form->select('Ecourse.subject_id', $subjects, null, null, null, false); 15 ?> 16 </td><td> 17 <?php 18 echo $form->label('Ecourse.lang_id', 'Lang:'); 19 echo $form->select('Ecourse.lang_id', $langs, null, null, null, false); 20 ?> 21 </td></tr> 22 <tr><td colspan="3"> 23 <?php 24 echo $form->label('Ecourse.description', 'Description:'); 25 echo $form->textarea('Ecourse.description', array("cols" => 40, "rows" =>4)); 26 echo $fck->load('EcourseDescription', 'Default'); 27 ?> 28 </td></tr> 10 29 11 echo $form->label('Ecourse.description', 'Description:'); 12 echo $form->textarea('Ecourse.description', array("cols" => 40, "rows" =>4)); 13 echo $fck->load('EcourseDescription', 'Default'); 14 echo $form->error('Ecourse.description', 'You must describe course '); 15 16 echo $form->input('Ecourse.code', array("size" => 12, "maxlenght" => 12, 'title'=>' max. 12 characters. Example: ROM2121', 'error'=>'Code is required')); 17 18 echo $form->label('Ecourse.subject_id', 'Subject:'); 19 echo $form->select('Ecourse.subject_id', $subjects, null, null, null, false); 30 <tr><td> 31 <?php 32 echo $form->input('Ecourse.code', array("size" => 12, "maxlenght" => 12, 'title'=>' max. 12 characters. Example: ROM2121')); 33 ?> 34 </td><td colspan="2"> 35 <?php 36 echo $form->label('Ecourse.status', 'Enabled:' ); 37 echo $form->checkbox('Ecourse.status', array("value"=>1, 'title'=>'Enabled course')); 38 ?></fieldset> 39 </td></tr> 20 40 21 echo $form->label('Ecourse.lang_id', 'Lang:'); 22 echo $form->select('Ecourse.lang_id', $langs, null, null, null, false); 23 24 echo $form->label('Ecourse.status', 'Enabled:' ); 25 echo $form->checkbox('Ecourse.status', array("value"=>1, 'title'=>'Enabled course')); 26 ?> 27 </fieldset> 28 <br /> 41 <tr><td colspan="3"> 29 42 <?php echo $form->end('Save'); ?> 43 </td></tr> 44 </table> 30 45 31 46 <script type="text/javascript"> -
trunk/app/views/ecourses/admin_edit.ctp
r342 r354 6 6 <fieldset> 7 7 <legend>Edit Course</legend> 8 <?php 8 <table><tr><td> 9 <?php 9 10 echo $form->input('Ecourse.title', array("size" => 30, "maxlength" => 90, 'title'=>' e.g. History of Literature')) ; 10 11 echo '<br />'; 11 ?> 12 </td><td> 13 <?php 14 echo $form->label('Ecourse.subject_id', 'Subject:'); 15 echo $form->select('Ecourse.subject_id', $subjects, null, null, null, false); 16 ?> 17 </td><td> 18 <?php 19 echo $form->label('Ecourse.lang_id', 'Lang:'); 20 echo $form->select('Ecourse.lang_id', $langs, null, null, null, false); 21 ?> 22 </td></tr> 23 <tr><td colspan="3"> 24 <?php 12 25 echo $form->label('Ecourse.description', 'Description:'); 13 26 echo $form->textarea('Ecourse.description', array("cols" => 40, "rows" =>4)); 14 echo $fck->load('EcourseDescription', 'Default'); 15 16 echo $form->input('Ecourse.code', array("size" => 12, "maxlenght" => 12, 'title'=>'max. 12 characters, ie.ROM2121')); 17 18 echo $form->label('Ecourse.subject_id', 'Subject:'); 19 echo $form->select('Ecourse.subject_id', $subjects, null, null, null, false); 20 21 echo $form->label('Ecourse.lang_id', 'Lang:'); 22 echo $form->select('Ecourse.lang_id', $langs, null, null, null, false); 23 ?> 24 <div style="clear:both"></div> 25 <?php 26 echo $form->label('Ecourse.status', 'Enabled:' ); 27 echo $form->checkbox('Ecourse.status', array("value"=>1, 'title'=>'Enabled course')); 28 ?> 29 <div style="clear:both"></div> 30 <br /> 31 <?php echo $form->submit('Save'); ?> 32 </fieldset> 33 </form> 27 echo $fck->load('EcourseDescription', 'Default'); 28 ?> 29 </td></tr> 30 <tr><td> 31 <?php 32 echo $form->input('Ecourse.code', array("size" => 12, "maxlenght" => 12, 'title'=>'max. 12 characters, ie.ROM2121')); 33 ?> 34 </td> 35 <td colspan="2"> 36 <?php 37 echo $form->label('Ecourse.status', 'Enabled:' ); 38 echo $form->checkbox('Ecourse.status', array("value"=>1, 'title'=>'Enabled course')); 39 ?> 40 </td></tr> 41 <tr><td colspan="3"> 42 </fieldset><?php echo $form->end('Save'); ?> 43 </td></tr> 44 </table> 34 45 <script type="text/javascript"> 35 46 /* <![CDATA[ */ -
trunk/app/views/lessons/admin_add.ctp
r352 r354 17 17 <?php echo $html->link($html->image('admin/myimages.jpg', array("alt"=>"My Images", "title"=>"My Images")), '#', array("onclick"=>"javascript:window.open('/admin/images/listing/set', 'blank', 'toolbar=no, scrollbars=yes,width=700,height=500')"), null, false) ?> 18 18 </td> 19 <td> 20 <?php 21 echo $form->label('Lesson.subject_id', 'Subject:'); 22 echo $form->select('Lesson.subject_id', $subjects, null, null, false); 23 ?> 24 </td> 19 25 </tr> 20 26 <tr> 21 <td colspan=" 2">27 <td colspan="3"> 22 28 <?php 23 echo $form->label('Lesson.subject_id', 'Subject:');24 echo $form->select('Lesson.subject_id', $subjects, null, null, false);25 26 29 echo $form->label('Lesson.body', 'Body:' ); 27 30 echo $form->textarea('Lesson.body', array("cols"=>80, "rows"=>20)); … … 35 38 echo $form->checkbox('Lesson.status', array('value'=>1)); 36 39 ?> 37 </td><td >40 </td><td colspan="2"> 38 41 <?Php 39 Echo $form->label('Lesson.disc', 'Comments allowed to this Lesson:' );42 Echo $form->label('Lesson.disc', 'Comments enabled:' ); 40 43 echo $form->checkbox('Lesson.disc', array('value'=>1)); 41 44 ?> 42 45 </td></tr> 43 <tr><td colspan=" 2"> </fieldset>46 <tr><td colspan="3"> </fieldset> 44 47 <?php echo $form->end('Save'); ?> 45 48 </td></tr> -
trunk/app/views/lessons/admin_edit.ctp
r352 r354 4 4 <?php 5 5 $session->flash(); 6 6 7 7 echo $javascript->link('myfunctions'); 8 8 echo $javascript->link('fckeditor/fckeditor'); 9 10 echo $form->create('Lesson');11 echo $form->hidden('Lesson.id');9 10 echo $form->create('Lesson'); 11 echo $form->hidden('Lesson.id'); 12 12 ?> 13 13 <fieldset> 14 <legend> Add Lesson</legend>14 <legend>Edit Lesson: <?php echo $this->data['Lesson']['title']; ?></legend> 15 15 <table> 16 16 <tr><td> … … 20 20 <?php echo $html->link($html->image('admin/myimages.jpg', array("alt"=>"My Images", "title"=>"My Images")), '#', array("onclick"=>"javascript:window.open('/admin/images/listing/set', 'blank', 'toolbar=no, scrollbars=yes,width=700,height=500')"), null, false) ?> 21 21 </td> 22 <td> 23 <?php 24 echo $form->label('Lesson.subject_id', 'Subject:'); 25 echo $form->select('Lesson.subject_id', $subjects, null, null, false); 26 ?> 27 </td> 22 28 </tr> 23 29 <tr> 24 <td colspan=" 2">30 <td colspan="3"> 25 31 <?php 26 echo $form->label('Lesson.subject_id', 'Subject:');27 echo $form->select('Lesson.subject_id', $subjects, null, null, false);28 29 32 echo $form->label('Lesson.body', 'Body:' ); 30 33 echo $form->textarea('Lesson.body', array("cols"=>80, "rows"=>20)); … … 39 42 </td><td> 40 43 <?php 41 echo $form->label('Lesson.disc', 'Comments allowed to this Lesson:' );44 echo $form->label('Lesson.disc', 'Comments enabled:' ); 42 45 echo $form->checkbox('Lesson.disc', array("value"=>1)); 43 44 echo $form->label( 'Lesson.end', 'End edition:' ); 46 ?> 47 </td><td> 48 <?php 49 echo $form->label('Lesson.end', 'End edition:' ); 45 50 echo $form->checkbox('Lesson.end', array("value"=>1)); 46 ?>51 ?> 47 52 </td></tr> 48 <tr><td colspan=" 2"> </fieldset>53 <tr><td colspan="3"> </fieldset> 49 54 <?php echo $form->end('Save'); ?> 50 55 </td></tr> -
trunk/app/webroot/js/fckeditor/editor/filemanager/connectors/php/connector.php
r300 r354 39 39 function DoResponse() 40 40 { 41 if (!isset($_GET)) { 41 if (!isset($_GET)) 42 { 42 43 global $_GET; 43 44 } -
trunk/app/webroot/js/fckeditor/fckeditor_php5.php
r296 r354 37 37 38 38 // PHP 5 Constructor (by Marcus Bointon <coolbru@users.sourceforge.net>) 39 function __construct( $instanceName )39 public function __construct( $instanceName ) 40 40 { 41 41 $this->InstanceName = $instanceName ;
