Changeset 313
- Timestamp:
- 03/06/08 12:30:15 (10 months ago)
- Location:
- trunk/app
- Files:
-
- 1 removed
- 8 modified
- 15 moved
-
controllers/catglossaries_controller.php (modified) (3 diffs)
-
controllers/podcasts_controller.php (modified) (5 diffs)
-
views/acquaintances/admin_edit.ctp (modified) (1 diff)
-
views/acquaintances/admin_listing.ctp (modified) (2 diffs)
-
views/catglossaries/admin_add.ctp (modified) (1 diff)
-
views/catglossaries/admin_listing.ctp (modified) (1 diff)
-
views/covers (deleted)
-
views/elements/acquaintances.ctp (moved) (moved from trunk/app/views/elements/acquaintances.thtml)
-
views/elements/catfaqs.ctp (moved) (moved from trunk/app/views/elements/catfaqs.thtml)
-
views/elements/catforums.ctp (moved) (moved from trunk/app/views/elements/catforums.thtml)
-
views/elements/faqs.ctp (moved) (moved from trunk/app/views/elements/faqs.thtml)
-
views/elements/podcast.ctp (moved) (moved from trunk/app/views/elements/podcast.thtml)
-
views/elements/subjects.ctp (moved) (moved from trunk/app/views/elements/subjects.thtml)
-
views/errors/error404.ctp (moved) (moved from trunk/app/views/errors/error404.thtml)
-
views/glossaries/admin_listing.ctp (modified) (1 diff)
-
views/layouts/rss.ctp (moved) (moved from trunk/app/views/layouts/rss.thtml)
-
views/news/all.ctp (moved) (moved from trunk/app/views/news/all.thtml)
-
views/news/single.ctp (moved) (moved from trunk/app/views/news/single.thtml)
-
views/podcasts/admin_listing.ctp (modified) (1 diff)
-
views/subjects/admin_add.ctp (moved) (moved from trunk/app/views/subjects/admin_add.thtml)
-
views/subjects/admin_listing.ctp (moved) (moved from trunk/app/views/subjects/admin_listing.thtml)
-
views/subjects/qs.ctp (moved) (moved from trunk/app/views/subjects/qs.thtml)
-
views/subjects/show.ctp (moved) (moved from trunk/app/views/subjects/show.thtml)
-
views/subjects/view.ctp (moved) (moved from trunk/app/views/subjects/view.thtml)
Legend:
- Unmodified
- Added
- Removed
-
trunk/app/controllers/catglossaries_controller.php
r302 r313 13 13 14 14 public $components = array('Edublog'); 15 16 public function isAuthorized() 17 { 18 if (isset($this->params[Configure::read('Routing.admin')])) 19 { 20 if ($this->Auth->user('group_id') == 1 || $this->Auth->user('group_id') == 2) 21 { 22 return true; 23 } 24 } 25 return false; 26 } 15 27 16 public function isAuthorized()17 {18 if ($this->action == 'delete')19 {20 if ($this->Auth->user('group_id') == 1 || $this->Auth->user('group_id') == 2 )21 {22 return true;23 }24 }25 26 return false;27 }28 29 28 public function display($username) 30 29 { … … 83 82 } 84 83 84 public function admin_items($id) 85 { 86 $this->layout = 'admin'; 87 88 $this->pageTitle = 'Glossaries'; 89 90 $conditions = array("Catglossary.user_id" => $this->Auth->user('id'), "Catglossary.id" => $id); 91 92 $this->set('data', $this->Catglossary->find($conditions)); 93 } 94 85 95 public function admin_add() 86 96 { … … 92 102 $this->Sanitize = new Sanitize; 93 103 94 $this->Sanitize->clean Array($this->data["Catglossary"]); //Hopefully this is enough104 $this->Sanitize->clean($this->data["Catglossary"]); 95 105 96 106 $this->data["Catglossary"]["user_id"] = $this->Auth->user('id'); -
trunk/app/controllers/podcasts_controller.php
r247 r313 5 5 * GPLv3 manuel<arroba>mononeurona<punto>org 6 6 */ 7 Vendor('CMP3File'); 7 8 App::import('Vendor', 'CMP3File'); 8 9 uses('sanitize'); 9 10 … … 16 17 public function isAuthorized() 17 18 { 18 if (isset($this->params[Configure::read('Routing.admin')]))19 {20 if ($this->Auth->user('group_id') != 1)21 {22 return false;23 }24 }25 return true;19 if (isset($this->params[Configure::read('Routing.admin')])) 20 { 21 if ($this->Auth->user('group_id') == 1 || $this->Auth->user('group_id') == 2) 22 { 23 return true; 24 } 25 } 26 return false; 26 27 } 27 28 … … 143 144 public function admin_listing() 144 145 { 145 $this->pageTitle = $this-> othAuth->user('username') . '\'s Podcasts';146 $this->pageTitle = $this->Auth->user('username') . '\'s Podcasts'; 146 147 147 148 $this->layout = 'admin'; 148 149 149 $conditions = array("Podcast.user_id"=>$this-> othAuth->user('id'));150 $conditions = array("Podcast.user_id"=>$this->Auth->user('id')); 150 151 $fields = array("id", "title", "description", "created", "length", "status", "filename"); 151 152 $order = "Podcast.id DESC"; … … 216 217 $field = "id"; 217 218 218 $conditions = array("user_id" => $this-> othAuth->user('id'));219 $conditions = array("user_id" => $this->Auth->user('id')); 219 220 220 221 $order = "Podcast.id DESC"; … … 231 232 } 232 233 233 $Name = $this-> othAuth->user('username') . "_" . $next_id . '.'. $extension;234 $Name = $this->Auth->user('username') . "_" . $next_id . '.'. $extension; 234 235 235 236 /** setup final file location and name */ -
trunk/app/views/acquaintances/admin_edit.ctp
r307 r313 4 4 echo $html->getCrumbs(' / '); 5 5 6 echo $form->create('Acquaintance', array(' action'=>'admin_edit'));6 echo $form->create('Acquaintance', array('onsubmit'=>'check()')); 7 7 echo $form->hidden('Acquaintance.id'); 8 8 9 ?> 9 10 -
trunk/app/views/acquaintances/admin_listing.ctp
r307 r313 29 29 <legend>New Acquaintance</legend> 30 30 <?php 31 echo $form->label('Acquaintance.name', 'Site:') . '<br />';32 31 echo $form->input('Acquaintance.name', array("size" => 30, "maxlength"=>50)); 33 32 echo $form->error('Acquaintance.name', 'A name is required.'); … … 41 40 </p> 42 41 <?php 43 echo $form->label('Acquaintance.url', 'URL:') . '<br />';44 42 echo $form->input('Acquaintance.url', array("size" => 60, "maxlength"=>300, "value"=>"http://")); 45 43 echo $form->error('Acquaintance.url', 'An author is required.'); -
trunk/app/views/catglossaries/admin_add.ctp
r270 r313 1 <div> 2 <?php echo $html->addCrumb('Control Tools', '/admin/entries/start'); ?> 3 <?php echo $html->getCrumbs(' / '); ?> 4 </div> 5 <div class="title_section">Add new Glossary Category</div> 1 <?php 2 echo $html->div(null, $html->addCrumb('Control Tools', '/admin/entries/start'). $html->getCrumbs(' / ')); 3 echo $html->div('title_section', 'Add new Glossary Category'); 4 ?> 6 5 7 6 <div class="spaced"> 8 7 9 <?php echo $ html->formTag('/admin/catglossaries/add','post'); ?>8 <?php echo $form->create('Catglossary', array('action'=>'admin_add')); ?> 10 9 <fieldset> 11 10 <legend>New Category</legend> 12 11 <?php 13 echo $form->labelTag( 'Catglossary/title', 'Title:' ); 14 echo $html->input('Catglossary/title', array("size" => 30, "maxlength" => 90, "value"=>"Example: American history")); 15 echo $html->tagErrorMsg('Catglossary/title', 'A FAQ title is required.'); 12 echo $form->input('Catglossary.title', array("size" => 30, "maxlength" => 90, "value"=>"Example: Brazilian history")); 13 echo $form->error('Catglossary.title', 'A Glossary title is required.'); 16 14 17 echo $form->labelTag('Catglossary/description', 'Description:' );18 echo $ html->textarea('Catglossary/description', array("cols" => 40, "row" => 20));19 echo $ html->tagErrorMsg('Catglossary/description', 'A category description is required.');15 echo $form->label('Catglossary.description', 'Description:' ); 16 echo $form->textarea('Catglossary.description', array("cols" => 40, "row" => 20)); 17 echo $form->error('Catglossary.description', 'A category description is required.'); 20 18 ?> 21 19 <br /><br /> 22 20 <div style="clear:both"></div> 23 <?php echo $form->label Tag( 'Catglossary/status', 'Activate Category Glossary:' );?><br />24 <?php echo $ html->checkbox('Catglossary/status'); ?><br />21 <?php echo $form->label('Catglossary.status', 'Activate Category Glossary:' );?><br /> 22 <?php echo $form->checkbox('Catglossary.status'); ?><br /> 25 23 <br /><br /> 26 24 <div style="clear:both"></div> 27 <br /> 28 <?php echo $html->submit('Save') ?> 29 </fieldset> 30 </form> 25 <br /></fieldset> 26 <?php echo $form->end('Save'); ?> 31 27 </div> -
trunk/app/views/catglossaries/admin_listing.ctp
r270 r313 10 10 <?php 11 11 //exit(print_r($data)); 12 foreach ($data as $val) 13 {14 echo '<div style="padding:6px;margin:5px;border:1px dotted gray;">';15 echo $gags->sendEdit($val['Catglossary']['id'], 'catglossaries') . '<br />';12 foreach ($data as $val) 13 { 14 echo '<div style="padding:6px;margin:5px;border:1px dotted gray;">'; 15 echo $gags->sendEdit($val['Catglossary']['id'], 'catglossaries') . '<br />'; 16 16 17 echo $html->link($val['Catglossary']['title'], '/admin/glossaries/listing/'.$val['Catglossary']['id'], array("class"=>"largelink")) . '<br />';18 echo $val['Catglossary']['description'] . '<br />';17 echo $html->link($val['Catglossary']['title'], '/admin/catglossaries/items/'.$val['Catglossary']['id'], array("class"=>"largelink")) . '<br />'; 18 echo $val['Catglossary']['description'] . '<br />'; 19 19 20 //echo count($val['Glossary']) . ' <b>items</b><br />'; 21 echo '<p style="font-size:7pt">Status: '. $gags->setStatus($val['Catglossary']['status']) . '</p>'; 22 echo $gags->confirmDel($val['Catglossary']['id'], 'catglossaries'); 23 24 echo '</div>'; 25 } 20 //echo count($val['Glossary']) . ' <b>items</b><br />'; 21 echo '<p style="font-size:7pt">Status: '. $gags->setStatus($val['Catglossary']['status']) . '</p>'; 22 echo $gags->confirmDel($val['Catglossary']['id'], 'catglossaries'); 23 echo '</div>'; 24 } 26 25 ?> -
trunk/app/views/glossaries/admin_listing.ctp
r310 r313 1 <?php2 //exit(print_r($data));3 4 if ( isset($javascript) ):5 echo $html->charsetTag('UTF-8');6 echo $javascript->link('prototype');7 echo $javascript->link('scriptaculous.js?load=effects');8 endif;9 ?>10 1 <script type="text/javascript"> 11 2 window.onload = timedMsg; -
trunk/app/views/podcasts/admin_listing.ctp
r272 r313 3 3 <?php echo $html->getCrumbs(' / '); ?> 4 4 5 <div class="title_section"> <?php echo $ othAuth->user('username')?>'s Podcasts </div>5 <div class="title_section"> <?php echo $cU['User']['username']; ?>'s Podcasts </div> 6 6 7 <p> 8 <?php echo $html->link($html->image('actions/new.png', array("alt"=>"Add podcast", "title"=>"Add podcast")), '/admin/podcasts/add', null, false, false); ?> 9 </p> 7 <?php echo $html->para(null, $html->link($html->image('actions/new.png', array("alt"=>"Add podcast", "title"=>"Add podcast")), '/admin/podcasts/add', null, false, false)); ?> 8 10 9 11 10 <table class="tbadmin">
