Changeset 349
- Timestamp:
- 03/26/08 12:41:46 (10 months ago)
- Location:
- trunk/app
- Files:
-
- 4 modified
-
controllers/podcasts_controller.php (modified) (2 diffs)
-
views/newsletters/display.ctp (modified) (2 diffs)
-
views/newsletters/subscribe.ctp (modified) (2 diffs)
-
views/podcasts/display.ctp (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/app/controllers/podcasts_controller.php
r328 r349 3 3 * Karamelo E-Learning Platform 4 4 * Manuel Montoya 2002-2008 5 * GPLv3 manuel<a t>mononeurona<punto>org5 * GPLv3 manuel<arroba>mononeurona<punto>org 6 6 */ 7 7 … … 13 13 public $helpers = array('Javascript', 'Ajax', 'User', 'Gags'); 14 14 15 public $components = array('Portal', 'Edublog'); 16 17 public function beforeFilter() 18 { 19 $this->Auth->allow(array('display', 'rss', 'show')); 20 parent::beforeFilter(); 21 } 22 23 public function isAuthorized() 24 { 25 if (isset( $this->params[Configure::read('Routing.admin')] )) 26 { 27 if ($this->Auth->user('group_id') == 1 || $this->Auth->user('group_id') == 2 ) // admin and teachers 28 { 29 return true; 30 } 31 } 32 return false; // go away !! 33 } 34 35 public function display() 36 { 37 $this->Portal->statics(); 38 39 $this->layout = 'portal'; 40 41 $this->pageTitle = 'Podcasts'; 42 43 $conditions = array("Podcast.status"=>1); 44 45 $fields = array("id", "title", "description", "created", "filename", "length", "duration"); 46 47 $order = 'Podcast.id DESC'; 48 49 $limit = 20; 50 51 $this->set('data', $this->Podcast->findAll($conditions, $fields, $order, $limit)); 52 } 15 53 public function rss($username) 16 54 { -
trunk/app/views/newsletters/display.ctp
r278 r349 1 < div class="title_section">Newsletters</div>1 <?php 2 2 3 <?php 3 echo $html->div('title_section', 'Newsletters'); 4 4 5 if ( count($data) == 0) 5 6 { 6 echo '<div style="font-weigth:bold;font-size:14pt;padding:15px;">Newsletter not yet done</div>';7 echo $html->div('notice', 'Newsletter not yet done'); 7 8 } 8 9 //die(var_dump($data)); … … 10 11 foreach ($data as $val) 11 12 { 12 echo '<div class="wrapnew">';13 echo '<div class="news_title">'. $val['Newsletter']['title'] . "</div>";14 echo '<div class="news_date">' . $val['Newsletter']['created'] . "</div>";15 echo '<div class="news_body">' . $val['Newsletter']['body'] . "</div>"; 16 echo "</div>";13 $tmp = $html->div('news_title', $val['Newsletter']['title']); 14 $tmp .= $html->div('news_date', $val['Newsletter']['created']); 15 $tmp .= $html->div('news_body', $val['Newsletter']['body']); 16 17 echo $html->div('wrapnew', $tmp); 17 18 } 18 19 19 20 if ( isset( $cU['User']['id'] )) 20 21 { 21 echo $html->para(null, $html->link('Subscribe to newsletter', '/newsletter /subscribe'));22 echo $html->para(null, $html->link('Subscribe to newsletter', '/newsletters/subscribe')); 22 23 } 23 24 ?> -
trunk/app/views/newsletters/subscribe.ctp
r278 r349 1 <h1>Su sbscribe Newsletters </h1>1 <h1>Subscribe Newsletters </h1> 2 2 3 3 <p>Keep informed about our activities</p> … … 14 14 echo $ajax->div('updater'); 15 15 16 echo $ajax->form( null, 'post');16 echo $ajax->form(); 17 17 ?> 18 18 <fieldset> -
trunk/app/views/podcasts/display.ctp
r272 r349 1 2 <div style="font-size:18pt;padding:5px;boder:1px solid #c0c0c0"> <?php echo $blog["User"]["username"]; ?>'s Podcasts</div>3 4 1 <?php 5 2 //die(var_dump($data)); 6 3 7 foreach ($data as $val) 8 { 9 echo '<div style="padding:4px;border:1px dotted gray;margin:5px;">'; 10 echo "<h2>". $val['Podcast']['title'] . "</h2>"; 11 echo '<p style="font-size:7pt;">' . $val['Podcast']['created'] . '</p>'; 12 echo '<p>' . $val['Podcast']['description'] . '</p>'; 13 echo '<p>' . $html->link($html->image('static/dec_mp3.gif', array("alt"=>"Download Podcast to Mp3 player", "alt"=>"Download Podcast to Mp3 player")), '/files/podcasts/'.$val['Podcast']['filename'], null, false, false) . '</p>'; 14 15 echo '</div>'; 4 echo $html->div('title_section', 'Last Podcasts'); 5 6 foreach ($data as $val) 7 { 8 $tmp = $html->div('news_title', $val['Podcasts']['title']); 9 $tmp .= $html->div('news_date', $val['Podcasts']['created']); 10 $tmp .= $html->div('news_body', $val['Podcasts']['description']); 11 echo $html->div('wrapnew', $tmp); 16 12 } 17 13 ?> 18 14 15 16 17
