Changeset 604
- Timestamp:
- 06/13/08 11:17:49 (4 months ago)
- Location:
- trunk/app
- Files:
-
- 6 modified
-
controllers/messages_controller.php (modified) (2 diffs)
-
views/layouts/portal.ctp (modified) (1 diff)
-
views/messages/admin_display.ctp (modified) (3 diffs)
-
views/news/display.ctp (modified) (1 diff)
-
views/news/view.ctp (modified) (1 diff)
-
webroot/css/portal/portal.css (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/app/controllers/messages_controller.php
r566 r604 431 431 public function admin_display($message_id) 432 432 { 433 $this->pageTitle = ' Message';433 $this->pageTitle = 'View Message'; 434 434 435 435 $this->layout = 'admin'; … … 437 437 $conditions = array("Message.id"=>$message_id, "Message.user_id"=>$this->Auth->user('id')); 438 438 439 $fields = array("Message.id", "Message.user_id", "Message.title", "Message.created", "Message.body", "Message.sender _id", "Message.status", "User.username");439 $fields = array("Message.id", "Message.user_id", "Message.title", "Message.created", "Message.body", "Message.sender", "Message.status", "User.username"); 440 440 441 441 $data = $this->Message->find($conditions, $fields); 442 442 443 if ( $data['Message']["status"] == 0 ) // change from new to readed 444 { 445 $this->change($data['Message']["id"], 1); 446 } 443 if ( $data['Message']['status'] == 0 ): // change from new to readed 444 $this->Message->change($data['Message']['id'], 1); 445 endif; 447 446 448 447 //var_dump($data); -
trunk/app/views/layouts/portal.ctp
r587 r604 19 19 ?> 20 20 <link rel="alternate" type="application/rss+xml" title="RSS 2.0" href="/news/rss/" /> 21 <link rel="shortcut icon" href="/ img/static/favicon.ico" />21 <link rel="shortcut icon" href="/favicon.ico" /> 22 22 <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> 23 23 </head> -
trunk/app/views/messages/admin_display.ctp
r330 r604 4 4 echo $html->addCrumb('Messages', '/admin/messages/listing'); 5 5 echo $html->getCrumbs(' / '); 6 echo $html->para(null, $html->link($html->image('admin/compose_on.gif', array("alt"=>'Add new page','title'=>"Add new page")), '/admin/messages/add', null, false, false)); 6 7 ?> 7 8 <p><?php echo $html->link($html->image('admin/compose_on.gif', array("alt"=>"Add new page", "title"=>"Add new page")), '/admin/messages/add', null, false, false) ?></p>9 8 10 9 <div id="charging" style="display:none;"><?php echo $html->image('static/loading.gif', array("alt"=>"Loading")); ?></div> 11 10 12 11 <div style="border:1px dotted gray;padding:5px;margin:0 auto 0 auto;"> 13 <h1> Message</h1>12 <h1><?php __('Message'); ?></h1> 14 13 <?php 15 14 //exit(print_r($data)); … … 23 22 echo '<input type="button" value="Reply" onclick="hU()" />'; 24 23 25 echo $ajax->div( "delbutton", array("style"=>"text-align:right"));24 echo $ajax->div('delbutton', array('style'=>'text-align:right')); 26 25 echo $gags->confirmDel($data['Message']['id'], 'messages'); 27 26 echo $ajax->divEnd("delbutton"); … … 33 32 <?php 34 33 echo $ajax->form(); 35 echo $ html->hidden('Message/username', array("value"=>$othAuth->user('username')));36 echo $ html->hidden('Message/sender_id', array("value"=>$othAuth->user('id')));37 echo $ html->hidden('Message/message_id', array("value"=> $data["Message"]["id"]));38 echo $ html->hidden('Message/user_id', array("value"=> $data["Message"]["sender_id"])); // the change was made on admin_display.thtml34 echo $form->hidden('Message.username', array('value'=>$session->read('Auth.User.username'))); 35 echo $form->hidden('Message.sender_id', array('value'=>$session->read('Auth.User.id'))); 36 echo $form->hidden('Message.message_id', array('value'=> $data['Message']['id'])); 37 echo $form->hidden('Message.user_id', array('value'=> $data['Message']['sender'])); // the change was made on admin_display.thtml 39 38 ?> 40 39 <fieldset> 41 40 <legend>Reply</legend> 42 41 <?php 43 echo $ othAuth->user('username') . " writes: <br />";44 echo $form->label Tag( 'Message/title', 'Asunto:' ) . "<br />";45 echo $ html->input('Message/title', array("size" => 35, "maxlength" => 50, "value"=> 'Re: ' . $data["Message"]["title"])) . "<br />";46 echo $ html->tagErrorMsg('Message/title', 'Asunto is required.');42 echo $session->read('Auth.User.username') . __('write', true) .': <br />'; 43 echo $form->label('Message.title', 'Asunto:' ) . "<br />"; 44 echo $form->input('Message.title', array("size" => 35, "maxlength" => 50, "value"=> 'Re: ' . $data["Message"]["title"])) . "<br />"; 45 echo $form->error('Message.title', 'Asunto is required.'); 47 46 ?> 48 47 </p> 49 48 <br /> 50 <?php echo $form->label Tag('Message/body', 'Message:' );?><br />51 <?php echo $ html->textarea('Message/body', array("cols"=>50, "rows"=>10, "value"=>$data["User"]["username"] . ' wrote: ' . $data["Message"]["body"])); ?>52 <?php echo $fck->load('Message /body', 'Basic', 600, 160); ?>53 <?php echo $ html->tagErrorMsg('Message/body', 'Message is required.'); ?>49 <?php echo $form->label('Message.body', 'Message:' );?><br /> 50 <?php echo $form->textarea('Message.body', array("cols"=>50, "rows"=>10, "value"=>$data["User"]["username"] . ' wrote: ' . $data["Message"]["body"])); ?> 51 <?php echo $fck->load('Message.body', 'Basic', 600, 160); ?> 52 <?php echo $form->error('Message.body', 'Message is required.'); ?> 54 53 <br /> 55 54 </p> -
trunk/app/views/news/display.ctp
r591 r604 9 9 10 10 echo $html->div('news_title', $html->link($val['News']['title'], '/news/view/'. $val['News']['id'])); 11 echo $html->div(' news_date', $val['News']['created']);12 echo $html->div(' news_body',11 echo $html->div('redaccion', __('from_dep', true).'<i> '.$val['Theme']['theme'].'</i>, posted by '.$html->link($val['User']['username'], '/users/about/'.$val['User']['username']).' on '. $val['News']['created']); 12 echo $html->div('bodynew', 13 13 $html->div('img_new', $html->link( 14 14 $html->image('themes/'.$val['Theme']['img'], -
trunk/app/views/news/view.ctp
r587 r604 3 3 echo $html->div('titnew', $data['News']['title']); 4 4 5 echo $html->div('redaccion', __('from_dep', true).'<i> '.$data['Theme']['theme'].'</i>, posted by '.$html->link($data['User']['username'], '/users/ blogger/'.$data['User']['username']).' on '. $data['News']['created']);5 echo $html->div('redaccion', __('from_dep', true).'<i> '.$data['Theme']['theme'].'</i>, posted by '.$html->link($data['User']['username'], '/users/about/'.$data['User']['username']).' on '. $data['News']['created']); 6 6 ?> 7 7 -
trunk/app/webroot/css/portal/portal.css
r492 r604 318 318 padding:3px; 319 319 margin:2px; 320 font-size:8pt; 320 321 } 322 323 .wrapnew p { 324 font-size:8pt; 325 } 326 327 .bodynew { 328 font-size:8pt; 329 } 321 330 322 331 .titnew {
