Changeset 278

Show
Ignore:
Timestamp:
02/23/08 18:14:56 (11 months ago)
Author:
aarkerio
Message:

Upgrade to 1.2

Location:
trunk/app
Files:
1 removed
5 modified

Legend:

Unmodified
Added
Removed
  • trunk/app/app_controller.php

    r246 r278  
    2020     $this->Auth->loginError = 'Invalid e-mail / password combination. Please try again'; 
    2121     $this->Auth->authorize = 'controller';   
    22      $this->Auth->allow( array('display', 'view', 'register', 'recover', 'sendmail') ); 
     22     $this->Auth->allow( array('view', 'display', 'subscribe', 'recover') ); 
    2323 
    2424     $this->set('cU', $this->Auth->user());  // $cU current user array to use in the views if user logged 
  • trunk/app/controllers/newsletters_controller.php

    r276 r278  
    1717  public function beforeFiler() 
    1818  { 
    19     $this->Auth->allow('subscribe'); 
     19    $this->Auth->allow(array('subscribe')); 
    2020    parent::beforeFilter();    
    2121  } 
    22    
     22  
    2323  public function isAuthorized() 
    2424  { 
     
    3232   return true; 
    3333  } 
    34                                                             
     34                                                            
    3535  public function subscribe() 
    3636  { 
    3737         $this->layout = 'portal'; 
    38          $this->set('Element', $this->Portal->statics()); // Charge Portal components aka Sidebars 
     38         $this->Portal->statics(); // Charge Portal components aka Sidebars 
    3939  } 
    4040 
     
    5050     $this->set('data', $this->Newsletter->findAll($conditions, $fields, $order, $limit)); 
    5151      
    52      $this->set('Element', $this->Portal->statics()); // Using Portal component 
     52     $this->Portal->statics(); // Using Portal component 
    5353  } 
    5454       
  • trunk/app/views/elements/menu_b.ctp

    r240 r278  
    44<ul> 
    55  <li><?php echo $html->link('Edublogs', '/users/bloggers/', array('title'=>'eduBlogs')); ?> </li> 
    6   <li><?php echo $html->link('Podcasts', '/podcasts/all', array('title'=>'Download and hear')); ?> </li> 
     6  <li><?php echo $html->link('Podcasts', '/podcasts/display', array('title'=>'Download and hear')); ?> </li> 
    77  <li><?php echo $html->link('Directory', '/users/directory/', array('title'=>'Staff')); ?> </li> 
    8   <li><?php echo $html->link('Newsletter', '/newsletters/subscribe/', array('title'=>'Keep in touch')); ?> </li> 
     8  <li><?php echo $html->link('Newsletter', '/newsletters/display/', array('title'=>'Keep in touch')); ?> </li> 
    99  <li><?php echo $html->link('Library', '/medias/display/', array('title'=>'Resources')); ?> </li> 
    1010 
  • trunk/app/views/newsletters/display.ctp

    r277 r278  
    1616   echo "</div>"; 
    1717 } 
     18 
     19 if ( isset( $cU['User']['id'] )) 
     20 { 
     21   echo $html->para(null, $html->link('Subscribe to newsletter', '/newsletter/subscribe')); 
     22 }  
    1823?> 
  • trunk/app/views/newsletters/subscribe.ctp

    r277 r278  
    77<?php  
    88 
    9 if ( !$othAuth->sessionValid() ) 
     9if ( !isset( $cU['User']['id'] ) ) 
    1010{ 
    11    echo '<p>'. $html->link('You must be logged to subscribe to newsletter', '/users/login') . '</p>'; 
     11   echo $html->para(null, $html->link('You must be logged to subscribe to newsletter', '/users/login')); 
    1212} 
    1313 
     
    1818<fieldset> 
    1919  <legend>Subscribe:</legend> 
    20      <?php echo $form->labelTag('Subscribers/email', 'Email:'); ?><br /> 
    21      <?php  
     20   <?php echo $ajax->form(); 
     21     
    2222     $options =  array("size"=>25, "maxlength"=>50); 
    2323 
    24      if ( !$othAuth->sessionValid() ) 
     24     if ( !isset( $cU['User']['id'] ) ) 
    2525     { 
    2626        $options["readonly"]="readonly";  //if user no logged, no subscription available 
    2727     } 
    2828      
    29      echo $html->input('Subscribers/email', $options); ?> 
     29     echo $form->input('Subscribers.email', $options); ?> 
    3030     <br /><br /> 
    3131     <?php  
     
    4444<?php 
    4545   echo $ajax->divEnd('updater'); 
    46    echo $html->link('View pass newsletters', '/newsletters/all'); 
     46   echo $html->link('View pass newsletters', '/newsletters/display'); 
    4747?> 
    4848<script type="text/javascript">