Show
Ignore:
Timestamp:
05/21/08 15:27:00 (6 months ago)
Author:
aarkerio
Message:

New Try

Location:
trunk/app/views/catforums
Files:
3 modified

Legend:

Unmodified
Added
Removed
  • trunk/app/views/catforums/admin_edit.ctp

    r325 r541  
    1 <div class="spaced"> 
    21<?php  
    32    echo $form->create('Catforum');  
     
    65<fieldset> 
    76<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.');  
    810 
    9 <?php 
    10     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 <?php  
    1611   echo $form->input('Catforum.description', array("size" => 60, "maxlength" => 90)); 
    1712   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)); 
    1816?> 
    1917 
    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> 
    2719<?php echo $form->end('Update'); ?> 
    28  
    29 </div> 
    30  
     20</fieldset> 
  • trunk/app/views/catforums/admin_listing.ctp

    r393 r541  
    22 // exit(debug($data)); 
    33?> 
    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  
    204<?php  
    215 echo $html->div('title_section', 'Categories Forums'); 
     
    2711<tr style="text-align:left;display:none;border:1px dotted grey;padding:6px" id="trh"> 
    2812<td colspan="7"> 
    29   <?php echo $form->create('Catforum', array('action'=>'admin_add')); ?> 
     13  <?php echo $form->create('Catforum', array('action'=>'add', 'onsubmit'=>'return chkData()')); ?> 
    3014  <fieldset> 
    3115     <legend>Add new Category Forum</legend> 
     
    4428$th = array ('Edit', 'Add', 'Title', 'Description', 'Status', 'Delete', '&nbsp;'); 
    4529echo $html->tableHeaders($th);   
     30 
    4631foreach ($data as $val) 
    47  { 
     32{ 
    4833             
    4934       $tr = array (  
     
    6954?> 
    7055</table> 
     56 
     57<script type="text/javascript">  
     58<!--  
     59function 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  
    31<?php 
    42//die(print_r($data)); 
     3echo $html->div(null, $blog['User']['username'] .'\'s Forums', array('style'=>'font-size:18pt;padding:5px;boder:1px solid #c0c0c0')); 
     4  
     5foreach ($data as $val): 
    56 
    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 />'; 
    1110      
    12       foreach ( $val['Forum'] as $v) 
    13       { 
     11   foreach ( $val['Forum'] as $v ): 
     12 
    1413         echo '<div style="vertical-align:middle;padding:6px;margin:10px 10px 10px 20px;border:1px solid orange;">'; 
    1514            echo $html->link( 
     
    2019                             null, null, false) . '  '; 
    2120 
    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 />'; 
    2422        echo '</div>'; 
    25       } 
    26       echo '</div>'; 
    27  } 
     23 
     24   endforeach; 
     25   echo '</div>'; 
     26endforeach; 
    2827?>