Changeset 461 for trunk/app/views/forums

Show
Ignore:
Timestamp:
05/08/08 11:43:23 (7 months ago)
Author:
aarkerio
Message:

Forums and topics improveds

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

Legend:

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

    r321 r461  
    1212?> 
    1313<br /> 
     14<?php 
     15  echo $form->label('Forum.vclassroom_id', 'Class:'); 
     16  echo $form->select('Forum.vclassroom_id', $vclassrooms, null, null, false); 
     17?> 
    1418<br /> 
    1519<?php  
  • trunk/app/views/forums/display.ctp

    r333 r461  
    77               ); 
    88 
    9     echo  $html->div('titentry', $data["Forum"]["title"]); 
    10     echo  $html->para(null, $data["Forum"]["description"]); 
     9 echo  $html->div('titentry', $data["Forum"]["title"]); 
     10 echo  $html->para(null, $data["Forum"]["description"]); 
    1111 
    12     echo $html->div(null,  
    13                     $html->link($html->image('static/new_post.gif', array("alt"=>"Add new topic", "title"=>"Add new topic")),  
    14                       '/topics/add/'.$blog["User"]["username"].'/'.$data["Forum"]["id"],  
    15                       null, null, false) 
    16               ); 
     12  $tmp = $ajax->link($html->image("static/new_post.gif", array("alt"=>"New Topic", "title"=>"New Topic")), '/topics/add/'.$data['Vclassroom']['id'].'/'.$data['Forum']['id'], 
     13                                array("update" => "qn", 
     14                              "loading"=>"Element.show('loading3');", 
     15                          "complete"=>"Element.hide('loading3');Effect.Appear('qn')"), 
     16                               null, 
     17                               false 
     18                               ); 
     19    
     20 $tmp .= '<div id="loading3" style="display: none;">'.$html->image("static/loading.gif", array("alt"=>"Loading")).'</div>'; 
     21                 
     22 $tmp .= $ajax->div('qn', array("style"=>"padding:3px")) . $ajax->divEnd('qn'); 
     23                   
     24 echo $html->div(null, $tmp); 
    1725   
    1826    //Topics 
    1927    echo '<table style="border-collapse:collapse;width:100%">'; 
    20      if ( count($data["Topic"]) == 0) 
    21      { 
     28     if ( count($data["Topic"]) == 0): 
    2229                 echo '<tr><td colspan="6"><br /><h4>There is not topic on this forum yet</h4></td></tr>'; 
    23      } 
    24      else 
    25      { 
    26                 $th = array('Read', 'Topics', 'Replies', 'Author', 'Views', 'Last Post'); 
    27                 echo $html->tableHeaders($th); 
    28       } 
     30     else: 
     31                $th = array('Read', 'Topics', 'Replies', 'Author', 'Views', 'Last Post'); echo $html->tableHeaders($th); 
     32     endif; 
    2933      //die(print_r($data["Topic"])); 
    3034