Changeset 541 for trunk/app/views/catforums
- Timestamp:
- 05/21/08 15:27:00 (6 months ago)
- Location:
- trunk/app/views/catforums
- Files:
-
- 3 modified
-
admin_edit.ctp (modified) (2 diffs)
-
admin_listing.ctp (modified) (4 diffs)
-
display.ctp (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/app/views/catforums/admin_edit.ctp
r325 r541 1 <div class="spaced">2 1 <?php 3 2 echo $form->create('Catforum'); … … 6 5 <fieldset> 7 6 <legend>Edit Phorums Category</legend> 7 <?php 8 echo $form->input('Catforum.title', array('size'=>60, 'maxlength'=>90)); 9 echo $form->error('Catforum.title','Please enter a title.'); 8 10 9 <?php10 echo $form->input('Catforum.title', array('size'=>60, 'maxlength'=>90));11 echo $form->error('Catforum.title','Please enter a title.');12 ?>13 <br />14 <br />15 <?php16 11 echo $form->input('Catforum.description', array("size" => 60, "maxlength" => 90)); 17 12 echo $form->error('Catforum.description','Please enter a description.'); 13 14 echo $form->label('Catforum.status', 'Status:') . "<br />"; 15 echo $form->checkbox('Catforum.status', array('value'=>1)); 18 16 ?> 19 17 20 <br /><br /> 21 <?php 22 echo $form->label('Catforum.status', 'Status:') . "<br />"; 23 echo $form->checkbox('Catforum.status', array('value'=>1)); 24 ?> 25 <br /><br /> 26 <p style="clear:both"></p></fieldset> 18 <p style="clear:both"></p> 27 19 <?php echo $form->end('Update'); ?> 28 29 </div> 30 20 </fieldset> -
trunk/app/views/catforums/admin_listing.ctp
r393 r541 2 2 // exit(debug($data)); 3 3 ?> 4 <script type="text/javascript">5 <!--6 function hU() {7 8 var tr = document.getElementById('trh');9 10 if (tr.style.display == 'none')11 {12 tr.style.display = 'table-row';13 } else {14 tr.style.display = 'none';15 }16 }17 -->18 </script>19 20 4 <?php 21 5 echo $html->div('title_section', 'Categories Forums'); … … 27 11 <tr style="text-align:left;display:none;border:1px dotted grey;padding:6px" id="trh"> 28 12 <td colspan="7"> 29 <?php echo $form->create('Catforum', array('action'=>'ad min_add')); ?>13 <?php echo $form->create('Catforum', array('action'=>'add', 'onsubmit'=>'return chkData()')); ?> 30 14 <fieldset> 31 15 <legend>Add new Category Forum</legend> … … 44 28 $th = array ('Edit', 'Add', 'Title', 'Description', 'Status', 'Delete', ' '); 45 29 echo $html->tableHeaders($th); 30 46 31 foreach ($data as $val) 47 {32 { 48 33 49 34 $tr = array ( … … 69 54 ?> 70 55 </table> 56 57 <script type="text/javascript"> 58 <!-- 59 function hU() 60 { 61 62 var tr = document.getElementById('trh'); 63 64 if (tr.style.display == 'none') 65 { 66 tr.style.display = 'table-row'; 67 } else { 68 tr.style.display = 'none'; 69 } 70 } 71 --> 72 </script> -
trunk/app/views/catforums/display.ctp
r325 r541 1 <div style="font-size:18pt;padding:5px;boder:1px solid #c0c0c0"> <?php echo $blog["User"]["username"]; ?>'s Forums</div>2 3 1 <?php 4 2 //die(print_r($data)); 3 echo $html->div(null, $blog['User']['username'] .'\'s Forums', array('style'=>'font-size:18pt;padding:5px;boder:1px solid #c0c0c0')); 4 5 foreach ($data as $val): 5 6 6 foreach ($data as $val) 7 { 8 echo '<div style="border:1px dotted gray;padding:4px;margin-bottom:15px">'; 9 echo '<h2>Category:' . $val['Catforum']['title'] . '</h2>'; 10 echo '<b>Description</b>: <i>' . $val['Catforum']['description'] . '</i><br />'; 7 echo '<div style="border:1px dotted gray;padding:4px;margin-bottom:15px">'; 8 echo '<h2>Category:' . $val['Catforum']['title'] . '</h2>'; 9 echo '<b>Description</b>: <i>' . $val['Catforum']['description'] . '</i><br />'; 11 10 12 foreach ( $val['Forum'] as $v)13 { 11 foreach ( $val['Forum'] as $v ): 12 14 13 echo '<div style="vertical-align:middle;padding:6px;margin:10px 10px 10px 20px;border:1px solid orange;">'; 15 14 echo $html->link( … … 20 19 null, null, false) . ' '; 21 20 22 echo $html->link($v['title'], '/forums/display/'.$v['id'], array('style'=>'font-weight:bold')) 23 .' '.$v['description'].'<br />'; 21 echo $html->link($v['title'], '/forums/display/'.$v['id'], array('style'=>'font-weight:bold')).' '.$v['description'].'<br />'; 24 22 echo '</div>'; 25 } 26 echo '</div>'; 27 } 23 24 endforeach; 25 echo '</div>'; 26 endforeach; 28 27 ?>
