Changeset 118
- Timestamp:
- 07/19/07 10:16:35 (1 year ago)
- Files:
-
- branch/app_controller.php (modified) (1 diff)
- branch/app_model.php (modified) (1 diff)
- branch/controllers/pages_controller.php (modified) (1 diff)
- branch/controllers/posts_controller.php (modified) (1 diff)
- branch/models/page.php (modified) (1 diff)
- branch/models/post.php (modified) (1 diff)
- branch/models/user.php (modified) (2 diffs)
- branch/models/video.php (modified) (2 diffs)
- branch/views/events/admin_index.ctp (modified) (1 diff)
- branch/views/helpers/webrocket.php (added)
- branch/views/pages/add.ctp (modified) (1 diff)
- branch/views/pages/admin_add.ctp (modified) (1 diff)
- branch/views/pages/admin_edit.ctp (modified) (2 diffs)
- branch/views/pages/admin_index.ctp (modified) (2 diffs)
- branch/views/pages/admin_view.ctp (modified) (1 diff)
- branch/views/pages/edit.ctp (modified) (1 diff)
- branch/views/pages/index.ctp (modified) (1 diff)
- branch/views/pages/view.ctp (modified) (1 diff)
- branch/views/posts/admin_index.ctp (modified) (2 diffs)
- branch/views/users/admin_add.ctp (modified) (1 diff)
- branch/views/users/admin_edit.ctp (modified) (1 diff)
- branch/views/users/admin_index.ctp (modified) (1 diff)
- branch/views/videos/admin_add.ctp (modified) (1 diff)
- branch/webroot/css/default.css (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
branch/app_controller.php
r117 r118 39 39 class AppController extends Controller { 40 40 41 var $helpers = array('othAuth','Cache','Form','Html','Javascript','Text','Number','Time','Tree' );41 var $helpers = array('othAuth','Cache','Form','Html','Javascript','Text','Number','Time','Tree','Webrocket'); 42 42 var $components = array('othAuth','Conf','RequestHandler','Session','Nav'); 43 43 var $othAuthRestrictions = array('add','edit','delete',CAKE_ADMIN); branch/app_model.php
r71 r118 285 285 } 286 286 } 287 288 function publish($id) 289 { 290 $this->id = $id; 291 $this->$this->name->savefield('published', 1); 292 } 293 294 function unpublish($id) 295 { 296 $this->id = $id; 297 $this->$this->name->savefield('published', 0); 298 } 287 299 } 288 300 ?> branch/controllers/pages_controller.php
r60 r118 10 10 } 11 11 12 function view($ id= null) {13 if(!$ id) {12 function view($slug = null) { 13 if(!$slug) { 14 14 $this->Session->setFlash('Invalid Page.'); 15 15 $this->redirect(array('action'=>'index'), null, true); 16 16 } 17 $this->set('page', $this->Page->findByS tub($id));17 $this->set('page', $this->Page->findBySlug($slug)); 18 18 } 19 19 branch/controllers/posts_controller.php
r111 r118 39 39 // The view function finds by Stub instead of ID for SEO. 40 40 function view($slug = null) { 41 if(!$ id) {41 if(!$slug) { 42 42 $this->Session->setFlash('Invalid Post.'); 43 43 $this->redirect(array('action'=>'index'), null, true); branch/models/page.php
r69 r118 49 49 function beforeSave() 50 50 { 51 $this->data[$this->name]['stub'] = $this->getUniqueUrl($this->data[$this->name]['title'], 'stub'); 52 51 $this->data[$this->name]['slug'] = $this->getUniqueUrl($this->data[$this->name]['title'], 'slug'); 53 52 return true; 54 53 } branch/models/post.php
r109 r118 48 48 return true; 49 49 } 50 51 function publish($id)52 {53 $this->id = $id;54 $this->savefield('published', 1);55 }56 57 function unpublish($id)58 {59 $this->id = $id;60 $this->savefield('published', 0);61 }62 50 63 51 function postCount() branch/models/user.php
r69 r118 23 23 //The Associations below have been created with all possible keys, those that are not needed can be removed 24 24 var $belongsTo = array( 25 'Group' => array('className' => 'Group', 26 'foreignKey' => 'group_id', 27 'conditions' => '', 28 'fields' => '', 29 'order' => '', 30 'counterCache' => ''), 25 'Group' => array('className' => 'Group'), 31 26 ); 32 27 33 28 var $hasOne = array( 34 'Profile' => array('className' => 'Profile', 35 'foreignKey' => 'user_id', 36 'conditions' => '', 37 'fields' => '', 38 'order' => '', 39 'dependent' => ''), 29 'Profile' => array('className' => 'Profile'), 40 30 ); 41 31 42 32 var $hasMany = array( 43 'Comment' => array('className' => 'Comment', 44 'foreignKey' => 'user_id', 45 'conditions' => '', 46 'fields' => '', 47 'order' => '', 48 'limit' => '', 49 'offset' => '', 50 'dependent' => '', 51 'exclusive' => '', 52 'finderQuery' => '', 53 'counterQuery' => ''), 54 'Event' => array('className' => 'Event', 55 'foreignKey' => 'user_id', 56 'conditions' => '', 57 'fields' => '', 58 'order' => '', 59 'limit' => '', 60 'offset' => '', 61 'dependent' => '', 62 'exclusive' => '', 63 'finderQuery' => '', 64 'counterQuery' => ''), 65 'Image' => array('className' => 'Image', 66 'foreignKey' => 'user_id', 67 'conditions' => '', 68 'fields' => '', 69 'order' => '', 70 'limit' => '', 71 'offset' => '', 72 'dependent' => '', 73 'exclusive' => '', 74 'finderQuery' => '', 75 'counterQuery' => ''), 76 'Page' => array('className' => 'Page', 77 'foreignKey' => 'user_id', 78 'conditions' => '', 79 'fields' => '', 80 'order' => '', 81 'limit' => '', 82 'offset' => '', 83 'dependent' => '', 84 'exclusive' => '', 85 'finderQuery' => '', 86 'counterQuery' => ''), 87 'Post' => array('className' => 'Post', 88 'foreignKey' => 'user_id', 89 'conditions' => '', 90 'fields' => '', 91 'order' => '', 92 'limit' => '', 93 'offset' => '', 94 'dependent' => '', 95 'exclusive' => '', 96 'finderQuery' => '', 97 'counterQuery' => ''), 98 'Video' => array('className' => 'Video', 99 'foreignKey' => 'user_id', 100 'conditions' => '', 101 'fields' => '', 102 'order' => '', 103 'limit' => '', 104 'offset' => '', 105 'dependent' => '', 106 'exclusive' => '', 107 'finderQuery' => '', 108 'counterQuery' => ''), 33 'Comment' => array('className' => 'Comment'), 34 'Event' => array('className' => 'Event'), 35 'Image' => array('className' => 'Image'), 36 'Page' => array('className' => 'Page'), 37 'Post' => array('className' => 'Post'), 38 'Video' => array('className' => 'Video'), 109 39 ); 110 40 … … 114 44 'foreignKey' => 'user_id', 115 45 'associationForeignKey' => 'tag_id', 116 'conditions' => '', 117 'fields' => '', 118 'order' => '', 119 'limit' => '', 120 'offset' => '', 121 'unique' => '', 122 'finderQuery' => '', 123 'deleteQuery' => '', 124 'insertQuery' => ''), 46 'order' => 'Tag.tag ASC', 47 'unique' => true), 125 48 ); 49 50 126 51 127 52 } branch/models/video.php
r73 r118 10 10 //The Associations below have been created with all possible keys, those that are not needed can be removed 11 11 var $belongsTo = array( 12 'User' => array('className' => 'User', 13 'foreignKey' => 'user_id', 14 'conditions' => '', 15 'fields' => '', 16 'order' => '', 17 'counterCache' => ''), 18 'Subject' => array('className' => 'Subject', 19 'foreignKey' => 'subject_id', 20 'conditions' => '', 21 'fields' => '', 22 'order' => '', 23 'counterCache' => ''), 12 'User' => array('className' => 'User'), 13 'Subject' => array('className' => 'Subject'), 14 'Copyright' => array('className' => 'Copyright'), 24 15 ); 25 16 … … 29 20 'foreignKey' => 'video_id', 30 21 'associationForeignKey' => 'tag_id', 31 'conditions' => '', 32 'fields' => '', 33 'order' => '', 34 'limit' => '', 35 'offset' => '', 36 'unique' => '', 37 'finderQuery' => '', 38 'deleteQuery' => '', 39 'insertQuery' => ''), 22 'order' => 'Tag.tag ASC', 23 'unique' => true), 40 24 ); 41 25 branch/views/events/admin_index.ctp
r113 r118 70 70 </td> 71 71 <td> 72 <?php e cho $event['Event']['published']?>72 <?php e($webrocket->showPubStatus($event['Event']['published'])); ?> 73 73 </td> 74 74 <td> branch/views/pages/add.ctp
r60 r118 2 2 <h2>New Page</h2> 3 3 <?php echo $form->create('Page');?> 4 <?php echo $form->input('url', array('class' => 'required'));?> 5 <?php echo $form->input('title', array('class' => 'required'));?> 6 <?php echo $form->input('body', array('class' => 'required'));?> 7 <?php echo $form->input('published', array('class' => 'required'));?> 8 <?php echo $form->input('user_id', array('class' => 'required', 'options' => $users));?> 9 <?php echo $form->input('subject_id', array('class' => 'required', 'options' => $subjects));?> 10 <?php echo $form->input('tags', array('class' => 'required'));?> 11 <?php echo $form->input('Tag/Tag', array('options' => $tags, 'multiple' => 'multiple'));?> 12 <?php echo $form->submit('Add');?> 4 <fieldset id="main-content"> 5 <legend>Main Content</legend> 6 <?php echo $form->input('title', array('class' => 'required'));?> 7 <?php echo $form->input('body', array('class' => 'wymeditor'));?> 8 </fieldset> 9 10 <fieldset id="meta-content"> 11 <legend>Meta Data</legend> 12 <?php echo $form->input('subject_id', array('class' => 'required', 'options' => $subjects));?> 13 <?php echo $form->input('tags', array('class' => 'tags', 'type'=>'text'));?> 14 </fieldset> 15 16 <fieldset id="publishing-options"> 17 <legend>Publishing Options</legend> 18 <?php echo $form->input('published', array('class' => 'required'));?> 19 <?php echo $form->input('access_level', array('class' => 'required', 'options'=>$access_levels));?> 20 </fielset> 21 22 <?php echo $form->end('Add', array('class'=>'wymupdate'));?> 13 23 </form> 14 24 </div> 15 <div class="actions">16 <ul>17 <li><?php echo $html->link('List Pages', array('action'=>'index')); ?></li>18 <li><?php echo $html->link('View Users', array('controller'=> 'users', 'action'=>'view'));?></li>19 <li><?php echo $html->link('Add Users', array('controller'=> 'users', 'action'=>'add')); ?></li>20 <li><?php echo $html->link('View Subjects', array('controller'=> 'subjects', 'action'=>'view'));?></li>21 <li><?php echo $html->link('Add Subjects', array('controller'=> 'subjects', 'action'=>'add')); ?></li>22 </ul>23 </div>branch/views/pages/admin_add.ctp
r68 r118 20 20 </fielset> 21 21 22 <?php echo $form-> submit('Add', array('class'=>'wymupdate'));?>22 <?php echo $form->end('Add', array('class'=>'wymupdate'));?> 23 23 </form> 24 24 </div> branch/views/pages/admin_edit.ctp
r68 r118 1 1 <div class="page"> 2 <h2> EditPage</h2>2 <h2>New Page</h2> 3 3 <?php echo $form->create('Page');?> 4 4 <fieldset id="main-content"> … … 21 21 </fielset> 22 22 23 <?php echo $form->submit('Add', array('class'=>'wymupdate'));?> 24 <?php echo $html->link('Delete', array('action'=>'delete', $html->tagValue('Page/id')), null, 'Are you sure you want to delete #' . $html->tagValue('Page/id')); ?> 23 <?php echo $form->end('Update', array('class'=>'wymupdate'));?> 25 24 </form> 26 25 </div> branch/views/pages/admin_index.ctp
r60 r118 4 4 5 5 <table cellpadding="0" cellspacing="0"> 6 <thead> 6 7 <tr> 7 8 <th><?php echo $paginator->sort('id');?></th> 8 9 <th><?php echo $paginator->sort('title');?></th> 9 <th><?php echo $paginator->sort('published');?></th>10 <th><?php echo $paginator->sort('user_id');?></th>11 10 <th><?php echo $paginator->sort('subject_id');?></th> 12 11 <th><?php echo $paginator->sort('tags');?></th> 12 <th><?php echo $paginator->sort('user_id');?></th> 13 <th><?php echo $paginator->sort('published');?></th> 13 14 <th>Actions</th> 14 15 </tr> 16 </thead> 17 <tbody> 15 18 <?php foreach ($pages as $page): ?> 16 19 <tr> 17 20 <td><?php echo $page['Page']['id']; ?></td> 18 21 <td><?php echo $page['Page']['title']; ?></td> 19 <td><?php echo $page['Page']['published']; ?></td>20 <td><?php echo $html->link($page['User']['name'], array('controller'=> 'users', 'action'=>'view', $page['User']['id'])); ?></td>21 22 <td><?php echo $html->link($page['Subject']['title'], array('controller'=> 'subjects', 'action'=>'view', $page['Subject']['id'])); ?></td> 22 23 <td><?php echo $page['Page']['tags']; ?></td> 24 <td><?php echo $html->link($page['User']['name'], array('controller'=> 'users', 'action'=>'view', $page['User']['id'])); ?></td> 25 <td><?php e($webrocket->showPubStatus($page['Page']['published'])); ?></td> 23 26 <td class="actions"> 24 27 <?php echo $html->link('View', array('action'=>'view', $page['Page']['id'])); ?> … … 28 31 </tr> 29 32 <?php endforeach; ?> 33 </tbody> 30 34 </table> 31 35 32 36 </div> 33 37 <div class="paging"> 34 <?php echo $paginator->prev('<< previous', array(), null, array('class'=>'previousdisabled'));?>35 | 36 <?php echo $paginator->next( 'next >>', array(), null, array('class'=>'nextdisabled'));?>38 <?php echo $paginator->prev('<< '.__('previous', true), array(), null, array('class'=>'disabled'));?> 39 | <?php echo $paginator->numbers();?> 40 <?php echo $paginator->next(__('next', true).' >>', array(), null, array('class'=>'disabled'));?> 37 41 </div> 38 42 <?php } else { ?> branch/views/pages/admin_view.ctp
r60 r118 1 <div class="page"> 2 <h2>View Page</h2> 3 4 <dl> 5 <dt>Id</dt> 6 <dd> <?php echo $page['Page']['id']?></dd> 7 <dt>Url</dt> 8 <dd> <?php echo $page['Page']['url']?></dd> 9 <dt>Title</dt> 10 <dd> <?php echo $page['Page']['title']?></dd> 11 <dt>Body</dt> 12 <dd> <?php echo $page['Page']['body']?></dd> 13 <dt>Published</dt> 14 <dd> <?php echo $page['Page']['published']?></dd> 15 <dt>User</dt> 16 <dd> <?php echo $html->link($page['User']['name'], array('controller'=> 'users', 'action'=>'view', $page['User']['id'])); ?></dd> 17 <dt>Subject</dt> 18 <dd> <?php echo $html->link($page['Subject']['title'], array('controller'=> 'subjects', 'action'=>'view', $page['Subject']['id'])); ?></dd> 19 <dt>Tags</dt> 20 <dd> <?php echo $page['Page']['tags']?></dd> 21 </dl> 1 <div class="hentry"> 2 <h2 class="entry-title"><?php e($html->link($page['Page']['title'], array('controller'=>'posts', 'action'=>'view', $page['Page']['slug']))); ?></h2> 3 <?php echo $html->link('Edit', array('action'=>'edit', $page['Page']['id'])); ?> 4 <abbr class="updated" title=""><?php echo $page['Page']['modified']; ?></abbr> 5 <span class="vcard author"><?php echo $html->link($page['User']['username'], array('controller'=> 'users', 'action'=>'view', $page['User']['id'])); ?></span> 6 <div class="entry-content"> 7 <?php echo $page['Page']['body']; ?> 8 </div> 9 <div class="meta"> 10 Comments: <?php echo $page['Page']['comments_count']; ?><br /> 11 Tags: <?php foreach ($page['Tag'] as $tag) : 12 e($html->link($tag['tag'], 'http://technorati.com/tag/' . $tag['tag'], array('rel'=>'tag', 'class'=>'tag'))); 13 endforeach; 14 ?> 15 </div> 16 <span class="version" style="display: none;">0.3</span> 22 17 </div> 23 <div class="actions">24 <ul>25 <li><?php echo $html->link('Edit Page', array('action'=>'edit', $page['Page']['id'])); ?> </li>26 <li><?php echo $html->link('Delete Page', array('action'=>'delete', $page['Page']['id']), null, 'Are you sure you want to delete #' . $page['Page']['id'] . '?'); ?> </li>27 <li><?php echo $html->link('List Pages', array('action'=>'index')); ?> </li>28 <li><?php echo $html->link('New Page', array('action'=>'add')); ?> </li>29 <li><?php echo $html->link('List User', array('controller'=> 'users', 'action'=>'index')); ?> </li>30 <li><?php echo $html->link('New Users', array('controller'=> 'users', 'action'=>'add')); ?> </li>31 <li><?php echo $html->link('List Subject', array('controller'=> 'subjects', 'action'=>'index')); ?> </li>32 <li><?php echo $html->link('New Subjects', array('controller'=> 'subjects', 'action'=>'add')); ?> </li>33 </ul>34 35 </div>36 <div class="related">37 <h3>Related Tags</h3>38 <?php if(!empty($page['Tag'])):?>39 <table cellpadding="0" cellspacing="0">40 <tr>41 <th>Id</th>42 <th>Tag</th>43 <th>Actions</th>44 </tr>45 <?php foreach($page['Tag'] as $tag):?>46 <tr>47 <td><?php echo $tag['id'];?></td>48 <td><?php echo $tag['tag'];?></td>49 <td class="actions">50 <?php echo $html->link('View', array('controller'=> 'tags', 'action'=>'view', $tag['id'])); ?>51 <?php echo $html->link('Edit', array('controller'=> 'tags', 'action'=>'edit', $tag['id'])); ?>52 <?php echo $html->link('Delete', array('controller'=> 'tags', 'action'=>'delete', $tag['id']), null, 'Are you sure you want to delete #' . $tag['id'] . '?'); ?>53 </td>54 </tr>55 <?php endforeach; ?>56 </table>57 <?php endif; ?>58 59 <div class="actions">60 <ul>61 <li><?php echo $html->link('New Tag', array('controller'=> 'tags', 'action'=>'add'));?> </li>62 </ul>63 </div>64 </div>branch/views/pages/edit.ctp
r60 r118 1 1 <div class="page"> 2 <h2> EditPage</h2>2 <h2>New Page</h2> 3 3 <?php echo $form->create('Page');?> 4 <?php echo $form->input('id');?> 5 <?php echo $form->input('url', array('class' => 'required'));?> 6 <?php echo $form->input('title', array('class' => 'required'));?> 7 <?php echo $form->input('body', array('class' => 'required'));?> 8 <?php echo $form->input('published', array('class' => 'required'));?> 9 <?php echo $form->input('user_id', array('class' => 'required', 'options' => $users));?> 10 <?php echo $form->input('subject_id', array('class' => 'required', 'options' => $subjects));?> 11 <?php echo $form->input('tags', array('class' => 'required'));?> 12 <?php echo $form->input('Tag/Tag', array('options' => $tags, 'multiple' => 'multiple'));?> 13 <?php echo $form->submit('Update');?> 4 <fieldset id="main-content"> 5 <legend>Main Content</legend> 6 <?php echo $form->input('id');?> 7 <?php echo $form->input('title', array('class' => 'required'));?> 8 <?php echo $form->input('body', array('class' => 'wymeditor'));?> 9 </fieldset> 10 11 <fieldset id="meta-content"> 12 <legend>Meta Data</legend> 13 <?php echo $form->input('subject_id', array('class' => 'required', 'options' => $subjects));?> 14 <?php echo $form->input('tags', array('class' => 'tags', 'type'=>'text'));?> 15 </fieldset> 16 17 <fieldset id="publishing-options"> 18 <legend>Publishing Options</legend> 19 <?php echo $form->input('published', array('class' => 'required'));?> 20 <?php echo $form->input('access_level', array('class' => 'required', 'options'=>$access_levels));?> 21 </fielset> 22 23 <?php echo $form->end('Update', array('class'=>'wymupdate'));?> 14 24 </form> 15 25 </div> 16 <div class="actions">17 <ul>18 <li><?php echo $html->link('Delete', array('action'=>'delete', $html->tagValue('Page/id')), null, 'Are you sure you want to delete #' . $html->tagValue('Page/id')); ?>19 <li><?php echo $html->link('List Pages', array('action'=>'index')); ?></li>20 <li><?php echo $html->link('View Users', array('controller'=> 'users', 'action'=>'view')); ?></li>21 <li><?php echo $html->link('Add Users', array('controller'=> 'users', 'action'=>'add')); ?></li>22 <li><?php echo $html->link('View Subjects', array('controller'=> 'subjects', 'action'=>'view')); ?></li>23 <li><?php echo $html->link('Add Subjects', array('controller'=> 'subjects', 'action'=>'add')); ?></li>24 </ul>25 </div>branch/views/pages/index.ctp
r60 r118 1 <div class="pages"> 2 <h2>List Pages</h2> 3 4 <table cellpadding="0" cellspacing="0"> 5 <tr> 6 <th><?php echo $paginator->sort('id');?></th> 7 <th><?php echo $paginator->sort('url');?></th> 8 <th><?php echo $paginator->sort('title');?></th> 9 <th><?php echo $paginator->sort('body');?></th> 10 <th><?php echo $paginator->sort('published');?></th> 11 <th><?php echo $paginator->sort('user_id');?></th> 12 <th><?php echo $paginator->sort('subject_id');?></th> 13 <th><?php echo $paginator->sort('tags');?></th> 14 <th>Actions</th> 15 </tr> 16 <?php foreach ($pages as $page): ?> 17 <tr> 18 <td><?php echo $page['Page']['id']; ?></td> 19 <td><?php echo $page['Page']['url']; ?></td> 20 <td><?php echo $page['Page']['title']; ?></td> 21 <td><?php echo $page['Page']['body']; ?></td> 22 <td><?php echo $page['Page']['published']; ?></td> 23 <td><?php echo $html->link($page['User']['name'], array('controller'=> 'users', 'action'=>'view', $page['User']['id'])); ?></td> 24 <td><?php echo $html->link($page['Subject']['title'], array('controller'=> 'subjects', 'action'=>'view', $page['Subject']['id'])); ?></td> 25 <td><?php echo $page['Page']['tags']; ?></td> 26 <td class="actions"> 27 <?php echo $html->link('View', array('action'=>'view', $page['Page']['id'])); ?> 28 <?php echo $html->link('Edit', array('action'=>'edit', $page['Page']['id'])); ?> 29 <?php echo $html->link('Delete', array('action'=>'delete', $page['Page']['id']), null, 'Are you sure you want to delete #' . $page['Page']['id']); ?> 30 </td> 31 </tr> 32 <?php endforeach; ?> 33 </table> 34 35 </div> 36 <div class="paging"> 37 <?php echo $paginator->prev('<< previous', array(), null, array('class'=>'disabled'));?> 38 | 39 <?php echo $paginator->next('next >>', array(), null, array('class'=>'disabled'));?> 40 </div> 1 <?php if ($pages) { ?> 2 <div class="pages"> 3 <h2>List Pages</h2> 4 5 <table cellpadding="0" cellspacing="0"> 6 <thead> 7 <tr> 8 <th><?php echo $paginator->sort('id');?></th> 9 <th><?php echo $paginator->sort('title');?></th> 10 <th><?php echo $paginator->sort('subject_id');?></th> 11 <th><?php echo $paginator->sort('tags');?></th> 12 <th><?php echo $paginator->sort('user_id');?></th> 13 <th><?php echo $paginator->sort('published');?></th> 14 <th>Actions</th> 15 </tr> 16 </thead> 17 <tbody> 18 <?php foreach ($pages as $page): ?> 19 <tr> 20 <td><?php echo $page['Page']['id']; ?></td> 21 <td><?php echo $page['Page']['title']; ?></td> 22 <td><?php echo $html->link($page['Subject']['title'], array('controller'=> 'subjects', 'action'=>'view', $page['Subject']['id'])); ?></td> 23 <td><?php echo $page['Page']['tags']; ?></td> 24 <td><?php echo $html->link($page['User']['name'], array('controller'=> 'users', 'action'=>'view', $page['User']['id'])); ?></td> 25 <td><?php e($webrocket->showPubStatus($page['Page']['published'])); ?></td> 26 <td class="actions"> 27 <?php echo $html->link('View', array('action'=>'view', $page['Page']['id'])); ?> 28 <?php echo $html->link('Edit', array('action'=>'edit', $page['Page']['id'])); ?> 29 <?php echo $html->link('Delete', array('action'=>'delete', $page['Page']['id']), null, 'Are you sure you want to delete #' . $page['Page']['id']); ?> 30 </td> 31 </tr> 32 <?php endforeach; ?> 33 </tbody> 34 </table> 35 36 </div> 37 <div class="paging"> 38 <?php echo $paginator->prev('<< '.__('previous', true), array(), null, array('class'=>'disabled'));?> 39 | <?php echo $paginator->numbers();?> 40 <?php echo $paginator->next(__('next', true).' >>', array(), null, array('class'=>'disabled'));?> 41 </div> 42 <?php } else { ?> 43 <h2>There are currently no pages. Click <?php echo $html->link('here', array('action'=>'add')); ?> to create one.</h2> 44 <?php } ?> 41 45 <div class="actions"> 42 46 <ul> branch/views/pages/view.ctp
r60 r118 1 <?php pr($page);?> 2 1 3 <div class="hentry"> 2 <h2 class="entry-title"><?php e($html->link($page['Page']['title'], array('controller'=>'posts', 'action'=>'view', $page['Page']['stub']))); ?></h2> 3 <?php echo $html->link('Edit', array('action'=>'edit', $page['Page']['id'])); ?> 4 <abbr class="updated" title=""><?php echo $page['Page']['modified']; ?></abbr> 5 <span class="vcard author"><?php echo $html->link($page['User']['username'], array('controller'=> 'users', 'action'=>'view', $page['User']['id'])); ?></span> 6 <div class="entry-content"> 7 <?php echo $page['Page']['body']; ?> 8 </div> 9 10 <div class="meta"> 11 Comments: <?php echo $