Changeset 276
- Timestamp:
- 02/23/08 17:16:49 (11 months ago)
- Location:
- trunk/app
- Files:
-
- 5 removed
- 6 modified
-
config/routes.php (modified) (1 diff)
-
controllers/newsletters_controller.php (modified) (2 diffs)
-
controllers/users_controller.php (modified) (3 diffs)
-
views/elements/login_hide.ctp (modified) (1 diff)
-
views/entries/admin_listing.ctp (modified) (2 diffs)
-
views/helpers/gags.php (modified) (2 diffs)
-
views/newsletters/admin_add.thtml (deleted)
-
views/newsletters/admin_listing.thtml (deleted)
-
views/newsletters/admin_send.thtml (deleted)
-
views/newsletters/all.thtml (deleted)
-
views/newsletters/subscribe.thtml (deleted)
Legend:
- Unmodified
- Added
- Removed
-
trunk/app/config/routes.php
r238 r276 7 7 Router::connect('/', array('controller' => 'news', 'action' => 'display', 'home')); 8 8 /** 9 * ...and connect the rest of ' Pages' controller's urls.9 * ...and connect the rest of 'blog' controller's urls. 10 10 */ 11 Router::connect('/ pages/*', array('controller' => 'pages', 'action' => 'display'));11 Router::connect('/blog/*', array('controller' => 'users', 'action' => 'blog')); 12 12 /** 13 13 * Then we connect url '/test' to our test controller. This is helpfull in -
trunk/app/controllers/newsletters_controller.php
r247 r276 14 14 15 15 public $components = array('Portal', 'Email'); 16 17 public function beforeFiler() 18 { 19 $this->Auth->allow('subscribe'); 20 parent::beforeFilter(); 21 } 16 22 17 23 public function isAuthorized() … … 32 38 $this->set('Element', $this->Portal->statics()); // Charge Portal components aka Sidebars 33 39 } 34 public function all($page=1) 40 41 public function display($page=1) 35 42 { 36 43 $this->layout = 'portal'; -
trunk/app/controllers/users_controller.php
r274 r276 14 14 15 15 public $components = array('Edublog', 'Portal', 'Email', 'Adds'); 16 16 17 public function beforeFiler() 17 18 { 18 $this->Auth->allow( array('entry', 'about' ) );19 $this->Auth->allow( array('entry', 'about', 'bloggers', 'blog', 'recover', 'directory') ); 19 20 parent::beforeFilter(); 20 21 } … … 58 59 $this->layout = $this->Edublog->layout($user_id); 59 60 60 //$this->Edublog->blog($user_id);61 $this->Edublog->blog($user_id); 61 62 } 62 63 … … 292 293 $this->set('data', $this->User->findAll($conditions, $fields, $order, $limit)); 293 294 294 $this-> set('Element', $this->Portal->statics()); // Using Portal component295 $this->Portal->statics(); // Using Portal component 295 296 } 296 297 -
trunk/app/views/elements/login_hide.ctp
r246 r276 19 19 <legend>Login</legend> 20 20 <?php 21 echo $form->label('User.username', 'Username:') . "<br />"; 22 echo $form->input('User.username', array('size' => 15, 'maxlength'=>30)) . "<br />"; 23 21 echo $form->input('User.username', array('size' => 15, 'maxlength'=>30, 'between' => ': <br />')) . "<br />"; 24 22 25 23 echo $form->label('User.pwd', 'Password:') . "<br />"; -
trunk/app/views/entries/admin_listing.ctp
r258 r276 4 4 <?php $session->flash(); ?> 5 5 6 <?php echo $html->addCrumb('Control Tools', '/admin/entries/start'); ?> 7 8 <?php echo $html->getCrumbs(' / '); ?> 6 <?php 7 echo $html->addCrumb('Control Tools', '/admin/entries/start'); 8 echo $html->getCrumbs(' / '); 9 ?> 9 10 10 11 <div class="title_section">Entries </div> … … 41 42 </table> 42 43 43 <?php echo $pagination; ?> 44 <?php 45 //echo $pagination; 46 ?> -
trunk/app/views/helpers/gags.php
r187 r276 10 10 11 11 public $initialized = false; 12 public $helpers = array('Html', 'Ajax' );12 public $helpers = array('Html', 'Ajax', 'Form'); 13 13 14 14 public function confirmDel($id, $controller) 15 15 { 16 16 17 $strB = $this->Html->formTag('/admin/'.$controller.'/delete/'.$id.'/', 'post', array("onsubmit"=>"return confirm('Are you sure to delete?')")); 18 $strB .= $this->Html->submit('Delete'); 19 $strB .= "</form>"; 17 $strB = $this->Form->create(null, array('action'=>'/admin/'.$controller.'/delete/'.$id, "onsubmit"=>"return confirm('Are you sure to delete?')")); 18 $strB .= $this->Form->end('Delete'); 20 19 21 20 return $strB; … … 25 24 { 26 25 27 $strB = $this->Html->formTag('/admin/'.$controller.'/edit/'.$id, 'post'); 28 $strB .= $this->Html->submit('Edit'); 29 $strB .= "</form>"; 26 $strB = $this->Form->create(null, array('action'=>'/admin/'.$controller.'/edit/'.$id)); 27 $strB .= $this->Form->end('Edit'); 30 28 31 29 return $strB;
