Changeset 541 for trunk/app/views/newsletters
- Timestamp:
- 05/21/08 15:27:00 (6 months ago)
- Location:
- trunk/app/views/newsletters
- Files:
-
- 2 modified
-
display.ctp (modified) (2 diffs)
-
subscribe.ctp (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/app/views/newsletters/display.ctp
r349 r541 3 3 echo $html->div('title_section', 'Newsletters'); 4 4 5 if ( count($data) == 0) 6 { 7 echo $html->div('notice', 'Newsletter not yet done'); 8 } 5 if ( count($data) == 0): 6 echo $html->div('notice', 'Newsletter not yet done'); 7 endif; 9 8 //die(var_dump($data)); 10 9 11 foreach ($data as $val) 12 { 10 foreach ($data as $val): 13 11 $tmp = $html->div('news_title', $val['Newsletter']['title']); 14 12 $tmp .= $html->div('news_date', $val['Newsletter']['created']); … … 16 14 17 15 echo $html->div('wrapnew', $tmp); 18 }16 endforeach; 19 17 20 if ( isset( $cU['User']['id'] )) 21 { 22 echo $html->para(null, $html->link('Subscribe to newsletter', '/newsletters/subscribe')); 23 } 18 if ( $session->check('Auth.User') ): 19 echo $html->para(null, $html->link('Subscribe to newsletter', '/newsletters/subscribe')); 20 endif; 24 21 ?> -
trunk/app/views/newsletters/subscribe.ctp
r349 r541 7 7 <?php 8 8 9 if ( ! isset( $cU['User']['id']) )9 if ( !$session->check('Auth.User') ) 10 10 { 11 11 echo $html->para(null, $html->link('You must be logged to subscribe to newsletter', '/users/login')); … … 22 22 $options = array("size"=>25, "maxlength"=>50); 23 23 24 if ( !isset( $cU['User']['id']) )24 if ( $session->check('Auth.User') ) 25 25 { 26 26 $options["readonly"]="readonly"; //if user no logged, no subscription available
