Changeset 459

Show
Ignore:
Timestamp:
05/07/08 18:55:47 (8 months ago)
Author:
aarkerio
Message:

I improved layouts and users display

Location:
trunk/app
Files:
1 added
8 modified

Legend:

Unmodified
Added
Removed
  • trunk/app/controllers/confirms_controller.php

    r394 r459  
    5454     if ($this->User->save($this->data) && $this->Confirm->delete($data['Confirm']['id'])) 
    5555     { 
    56                  $this->flash('Your account has been activated', '/users/login', 2); 
     56                 $this->flash('Your account has been activated', '/users/login', 1); 
    5757     } 
    5858     else 
  • trunk/app/controllers/users_controller.php

    r458 r459  
    125125        $this->pageTitle = 'About ' . $username; 
    126126         
    127         $user_id = $this->User->field("id", array("username"=>$username)); 
    128          
    129         $this->layout    = $this->Edublog->layout($user_id); 
    130          
    131         $this->Edublog->blog($user_id); // blogger elements 
    132          
    133         $conditions      = array("User.id"=>$user_id); 
    134          
    135         $this->set('data', $this->User->findAll($conditions));         
    136  } 
    137  
    138   public function alumni() 
    139   { 
     127        $this->layout    = 'portal'; 
     128 
     129        $this->Portal->statics(); // Using Portal component 
     130    
     131        $conditions      = array("User.username"=>trim($username)); 
     132 
     133        $this->set('data', $this->User->find($conditions));         
     134 } 
     135 
     136 public function alumni() 
     137 { 
    140138        $this->layout    = 'portal'; 
    141139         
  • trunk/app/controllers/vclassrooms_controller.php

    r458 r459  
    2020 public function beforeFilter() 
    2121 { 
    22       $this->Auth->allow(array('show', 'jointoclass', 'display', 'participation')); 
     22      $this->Auth->allow(array('show', 'jointoclass', 'aboutme', 'display', 'participation')); 
    2323      parent::beforeFilter(); 
    2424 } 
     
    5555      } 
    5656 } 
    57                                                      
     57 
     58 public function aboutme($username)  
     59 { 
     60      $conditions = array('User.username'=>trim($username)); 
     61       
     62      $this->Vclassroom->User->unbindModel(array('hasMany'=>array('Vclassroom', 'Lesson', 'Faq', 'Acquaintance', 'Entry', 'Category'), 'belongsTo'=>array('Group'))); 
     63 
     64      $data = $this->Vclassroom->User->find($conditions); 
     65       
     66      $this->pageTitle = 'About me  '. $data['User']['name']; 
     67      $this->layout    = $this->Edublog->layout($data['User']['id']); 
     68      $this->Edublog->blog($data['User']['id']); 
     69       
     70      $this->set('data', $data); 
     71 } 
     72 
    5873 public function show($user_id, $id)  
    5974 { 
  • trunk/app/views/layouts/admin.ctp

    r396 r459  
    2929 
    3030<div id="header"> 
    31  
    32 <h1><?php echo $html->link('Karamelo: Control Panel', '/admin/entries/start'); ?></h1> 
     31<h1><?php echo $html->link('Karamelo: Control Panel', '/admin/entries/start'); ?></h1> e-Learning platform 
    3332<?php  
    34   echo $html->para(null, 'e-Learning platform');  
    3533  echo $html->link($cU['User']['username'] . '\'s blog',  '/blog/'. $cU['User']['username'],  array("style"=>"color:white;text-decoration:none;font-weight:bold;"));  
    3634?> 
     35Logged in as <strong><?php echo $cU['User']['username']; ?></strong> | 
     36    <?php echo $html->link($_SERVER['SERVER_NAME'], '/').' '. $html->link('My Account', '/admin/users/edit') .' | '. $html->link('Logout', '/users/logout'); ?> 
    3737</div><!-- header ends--> 
    38   <p> 
    39      Logged in as <strong><?php echo $cU['User']['username']; ?></strong> | 
    40      <strong><a href="/"><?php  echo $_SERVER['SERVER_NAME']; ?></a></strong>     
    41        <?php echo $html->link('My Account', '/admin/users/edit'); ?> | 
    42        <?php echo $html->link('Logout', '/users/logout'); ?> 
    43  </p> 
    4438<div style="clear:both;"></div> 
    4539<?php echo $this->renderElement('admin_menu'); ?> 
    4640 
    47 <div style="float:left;border:1px solid white;width:600px;margin:10px 300px;text-align:left;"> 
     41<div style="float:left;border:1px solid white;width:900px;margin:15px 10px 10px 100px;text-align:left;"> 
    4842                      <?php echo $content_for_layout ?> 
    4943</div> 
    5044<div style="clear:both;"></div> 
    5145 
    52    <div id="footer"> 
    53           <p>Powered by the <a href="http://www.chipotle-software.com/" rel="external">Karamelo Project &copy; 2002-2008 GPLv3</a> </p> 
    54    </div> 
     46<?php echo $html->div('footer', 'Powered by the '. $html->link('Karamelo Project &copy; 2002-2008 GPLv3', 'http://www.chipotle-software.com/', null, false, false)); ?> 
    5547 
    5648<div style="position:absolute;top:15px;left:800px"><!-- help button--> 
  • trunk/app/views/layouts/rubyx.ctp

    r431 r459  
    5353              echo $form->create("Entry", array("action"=>"search", "onsubmit"=>"return chkSearch()")); 
    5454              echo $form->hidden('Entry.user_id', array("value"=>$blog['User']['id'])); 
    55                 echo '<fieldset><legend>Search</legend>';  
     55              echo '<fieldset><legend>Search</legend>';  
    5656              echo $form->label('Entry.terms', 'Find:', array("class"=>"noscreen")); 
    57                echo '<span id="search-input-out">'; 
     57          echo '<span id="search-input-out">'; 
    5858              echo $form->input('Entry.terms', array("size"=>"30", "id"=>"search-input-out"));  
    5959              echo '</span>'; 
     
    8080                      
    8181                    <?php echo ($url == 'users/abou') ? '<li id="active">' : '<li>'; ?> 
    82                     <a href="/users/about/<?php echo $blog['User']['username'] ?>">About Me<span class="tab-l"></span><span class="tab-r"></span></a></li>  
     82                    <a href="/vclassrooms/aboutme/<?php echo $blog['User']['username'] ?>">About Me<span class="tab-l"></span><span class="tab-r"></span></a></li>  
    8383                          
    8484                    <?php echo ($url == 'messages/c') ? '<li id="active">' : '<li>'; ?>  
  • trunk/app/views/users/about.ctp

    r245 r459  
    44<?php 
    55//die( var_dump($blog) ); 
    6     echo  "<div class=\"title_section\">Classrooms</div>"; 
    7     echo  $data[0]['User']['name']    . " <br />"; 
    8     echo  $data[0]['User']['cv']    . " <br />"; 
    9     echo  $html->image('avatars/'.$data[0]['User']['avatar'], array("alt" => $data[0]['User']['name'], "title" =>$data[0]['User']['name'])) . " "; 
    10      
     6    echo  $data['User']['name']    . " <br />"; 
     7    echo  $data['User']['cv']      . " <br />"; 
     8    echo  $html->image('avatars/'.$data['User']['avatar'], array("alt" => $data['User']['name'], "title" =>$data['User']['name'])) . " "; 
    119?>  
    1210</div> 
  • trunk/app/webroot/css/cpanel/cpanel.css

    r396 r459  
    1515    display: block; 
    1616    margin: 0 auto; 
    17     padding: 0 0 0 100px; 
     17    padding: 6px; 
    1818    text-align: left; 
    1919    font-size: smaller; 
     
    4040#header h1 { 
    4141    margin: 0; 
    42     padding-top: 20px; 
     42    padding-top: 7px; 
    4343    color: #fff; 
    4444    font-weight: bold; 
     
    4949    color: #fff; 
    5050    text-decoration: none; 
    51      font-size: smaller; 
     51    font-size: smaller; 
    5252} 
    5353.title_section{  
     
    7777 
    7878/* Footer */ 
    79 #footer { 
     79.footer { 
    8080    letter-spacing: 1px; 
    8181    border-top: 1px dotted #babdb6; 
     
    8383    color: #888a85; 
    8484    padding: 10px; 
    85 } 
    86  
    87 #footer a, #footer a:hover { 
     85    font-size:7pt; 
     86} 
     87 
     88.footer a, #footer a:hover { 
    8889    text-decoration: none; 
    89 } 
    90  
    91 #footer p { 
    92     font-size: smaller; 
    93     margin: 0 0 10px 0; 
    94 } 
     90    font-size:7pt; 
     91} 
     92 
    9593/* End Footer */ 
    9694