Changeset 541 for trunk/app/views/images

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

New Try

Location:
trunk/app/views/images
Files:
2 modified

Legend:

Unmodified
Added
Removed
  • trunk/app/views/images/admin_listing.ctp

    r438 r541  
    5959 echo '<br />'; 
    6060   
    61  if ( $cU['User']['id'] == $val['Image']['user_id'] ) 
    62  { 
    63         echo  $form->create('Image', array('action'=>'admin_delete')); 
    64         echo $form->hidden('Image.return', array('value'=>'/admin/images/listing/'.$return));  
     61 if ( $session->read('Auth.User.id') == $val['Image']['user_id'] ): 
     62        echo  $form->create('Image', array('action'=>'delete')); 
     63        echo  $form->hidden('Image.return', array('value'=>'/admin/images/listing/'.$return));  
    6564        echo  $form->hidden('Image.id', array('value' => $val['Image']['id'])); 
    6665        echo  $form->end('Delete'); 
    67   } 
     66 endif; 
    6867?> 
    6968 </td> 
    7069<?php  
    71     if ( $counter == 5 ) 
    72     { 
     70    if ( $counter == 5 ): 
    7371        print "</tr>"; 
    7472        $counter = 0; //reset counter 
    75     } 
     73    endif; 
    7674  } 
    7775     
    78   if ( $counter < 5 ) 
    79   { 
     76 if ( $counter < 5 ): 
    8077       $colspan = (5 - $counter); 
    8178       print '<td colspan="'.$colspan.'">&nbsp;</td></tr>';  // fill the row with column 
    8279       
    83   } 
     80  endif; 
    8481?>  
    8582</table> 
  • trunk/app/views/images/admin_listview.ctp

    r346 r541  
    33  <td style="text-align:left;" colspan="5"> 
    44   
    5   <?php echo $html->formTag('/admin/images/add/','post', array("enctype"=>"multipart/form-data") ); ?> 
    6   <?php echo $html->hiddenTag('Image/return', '/admin/images/listview'); ?> 
     5  <?php echo $form->create('Images','post', array("enctype"=>"multipart/form-data") ); ?> 
     6  <?php echo $form->hidden('Image.return', '/admin/images/listview'); ?> 
    77  <fieldset> 
    88     <legend>Upload Image</legend> 
     
    4141 
    4242 <br /> 
    43    <?php  
    44    if ( $cU['User']['id'] == $val['Image']['user_id'] ) 
    45    { 
    46         echo $form->create('Image', array('action'=>'admin_delete')); 
     43<?php  
     44  if ( $session->read('Auth.User.id') == $val['Image']['user_id'] ): 
     45        echo $form->create('Image', array('action'=>'delete')); 
    4746        echo $form->hidden('Image.return', array('value'=>'/admin/images/listing')); 
    4847        echo $form->hidden('Image.id', array('value'=>$val['Image']['id'])); 
    4948    echo $form->end('Delete'); 
    50    } 
    51    ?> 
    52    </td> 
     49  endif; 
    5350 
    54 <?php  
    55     if ( $counter == 5 ) 
     51  echo '</td>'; 
     52  
     53  if ( $counter == 5 ) 
    5654    { 
    5755        print "</tr>";