Changeset 699 for trunk/app/views

Show
Ignore:
Timestamp:
08/06/08 17:10:36 (4 months ago)
Author:
aarkerio
Message:

New validate arrays

Location:
trunk/app/views
Files:
1 added
4 modified

Legend:

Unmodified
Added
Removed
  • trunk/app/views/catglossaries/display.ctp

    r541 r699  
    1 <h1>Glossaries</h1> 
     1<h1><?php __('Glossaries'); ?></h1> 
    22<?php 
    33//exit(print_r($data)); 
    44foreach ($data as $val): 
    55  echo '<div style="padding:8px;margin:8px;">'; 
    6      echo $html->link($val["Catglossary"]["title"], '/catglossaries/view/'.$blog["User"]["username"] .'/' .$val["Catglossary"]["id"]) . '<br />'; 
     6     echo $html->link($val['Catglossary']['title'], '/catglossaries/view/'.$blog["User"]["username"] .'/' .$val["Catglossary"]["id"], aa('style', 'font-size:14pt')) . '<br />'; 
    77     echo $val["Catglossary"]["description"]; 
    88  echo '</div>'; 
  • trunk/app/views/catglossaries/view.ctp

    r541 r699  
    1 <h1>Glossary: <?php echo $data['Catglossary']['title'] ?></h1> 
     1<h1><?php echo $data['Catglossary']['title']; ?></h1> 
    22<?php 
    3 //exit(print_r($data)); 
     3//exit(debug($data)); 
     4if ( count($data['Glossary']) < 1): 
     5     echo $html->para(null, '<b>'.__('No items yet', true).'</b>'); 
     6endif; 
     7 
    48foreach ($data['Glossary'] as $v): 
    5   echo '<div style="padding:8px;margin:8px;">'; 
    6      echo '<b>'. $v["item"].'</b><br />'; 
    7      echo $v["definition"]; 
    8   echo '</div>'; 
     9    echo $html->div(null, '<b>'. $v['item'].'</b><br /><br />'. $v['definition'], aa('style','border:1px dotted gray;padding:8px;margin:8px;')); 
    910endforeach; 
    1011?> 
  • trunk/app/views/elements/podcast.ctp

    r651 r699  
    66endforeach; 
    77 
    8 echo $html->para(null, $html->link(__('View all podcast', true), '/podcasts/display/'.$val['user_id'], aa('class', 'petit')))'; 
     8echo $html->para(null, $html->link(__('View all podcast', true), '/podcasts/display/'.$val['user_id'], aa('class', 'petit'))); 
    99 
    1010?> 
    11  
  • trunk/app/views/messages/message.ctp

    r673 r699  
    22 
    33if ( $session->check('Auth.User') ):  
     4      $username =  $session->read('Auth.User.username'); 
     5      $anonym   = 0;   
     6      $url      = '/messages/deliver/'; 
     7else: 
     8      $username = 'Anonymous'; 
     9      $anonym   = 1; 
     10      $url      = '/messages/fromoutside/'; 
     11endif; 
    412 
    513echo $javascript->link('fckeditor/fckeditor'); 
     
    1119<div id="charging" style="display:none;"><?php echo $html->image('static/loading.gif', array("alt"=>"Loading")); ?></div> 
    1220 
    13 <div id="updater"> 
    1421<?php  
     22echo $ajax->div('updater'); 
    1523  echo $ajax->form(); 
    1624  echo $form->hidden('Message.user_id', array('value'=>$blog['User']['id'])); 
     
    1826?> 
    1927<fieldset> 
    20   <legend>Message to teacher from <?php echo $session->read('Auth.User.username'); ?>:</legend> 
    21      <?php  
    22         echo $form->input('Message.title', array('size' => 30, 'maxlength' => 50, 'label'=>__('Title', true), 'between'=>': '));  
    23         echo $form->error('Message.title', 'Title is required.');  
    24          
    25         echo $form->textarea('Message.body', array('cols'=>30, 'rows'=>35)); 
    26         echo $fck->load('MessageBody', 'Basic', 350, 150);  
    27         echo $form->error('Message.body', 'Body is required.');  
    28             echo $ajax->submit(__('Send', true), array("url" => "/messages/deliver/",  
     28  <legend><?php echo __('Message to teacher from', true) .' '.$username; ?>:</legend> 
     29  <?php  
     30   echo $form->input('Message.title', array('size' => 30, 'maxlength' => 50, 'label'=>__('Title', true),'between'=>':<br />'));  
     31 
     32   if ( !$session->check('Auth.User') ): 
     33       echo $form->input('Message.email', array('size' => 20, 'maxlength' => 80, 'label'=>__('Email', true),'between'=>':<br />')); 
     34   endif; 
     35   echo $form->textarea('Message.body', array('cols'=>30, 'rows'=>35)); 
     36   echo $fck->load('MessageBody', 'Basic', 350, 150);  
     37 
     38   echo $ajax->submit(__('Send', true), array("url" => $url,  
    2939                                         "update"=>"updater", 
    3040                                         "before" => "MyFCKObject.UpdateEditorFormValue();", 
    3141                                         "loading" => "Element.show('charging');Element.hide('updater')", 
    3242                                         "complete" => "Element.hide('charging');Effect.Appear('updater')" 
    33         ));  
    34    ?> 
     43            ));  
     44  ?> 
    3545</fieldset> 
    3646</form> 
    37 </div> 
    38  
    39 <?php else: ?> 
    40  
    41 <div id="updater">Sorry, only students and teachers logged can send messages to teachers.<br /> 
    42     <?php  echo "Please ". $html->link('login', '/users/login/') . " or  " .  $html->link('register', '/users/login/'); ?> 
    43 </div> 
    44  
    45 <?php  
    46 endif;  
    47  
    48 echo $fck->fckAjax(); 
    49  
     47<?php 
     48  echo $ajax->divEnd('updater');  
     49  echo $fck->fckAjax(); 
    5050?>