Changeset 4eeed6a2da34092e5eb880e4ce010dd3a3cc9aa7

Show
Ignore:
Timestamp:
12/24/11 00:48:31 (5 months ago)
Author:
Xemle <xemle@phtagr.org>
Children:
eef9918730bae1b54e09d333f0ab462bbf2ab293
Parents:
85cfa522ac1546dd201b563c46a55f14ca508f4f
git-author:
Xemle <xemle@phtagr.org> / 2011-12-23T18:29:13Z+0100
git-committer:
Xemle <xemle@phtagr.org> / 2011-12-24T00:48:31Z+0100
Message:

Add username to top nav

Files:
3 modified

Legend:

Unmodified
Added
Removed
  • app_controller.php

    rb4d232a r4eeed6a  
    6969      } 
    7070    } else { 
     71      $user = $this->getUser(); 
     72      $this->Menu->addItem(sprintf(__('Howdy, %s!', true), $user['User']['username']), false); 
    7173      $this->Menu->addItem(__('Logout', true), array('controller' => 'users', 'action' => 'logout')); 
    7274      $this->Menu->addItem(__('Dashboard', true), array('controller' => 'options')); 
  • views/helpers/menu.php

    r9d6c599 r4eeed6a  
    8888      } 
    8989 
    90       if ($item['link'] == 'false' && $item['type'] == false) 
     90      if ($item['link'] == 'false' && $item['type'] == false) { 
    9191        $item['type'] == 'text'; 
     92      } 
    9293 
    9394      $out .= "<li"; 
     
    172173        $linkOptions['class'] = 'active'; 
    173174      }  
    174       if (!$item['url']) { 
     175      if (!isset($item['url'])) { 
    175176        $item['url'] = array('controller' => $item['controller'], 'action' => $item['action'], 'admin' => $item['admin']); 
    176177      } 
    177       $item = $this->Html->link($item['title'], $item['url'], $linkOptions); 
     178      if ($item['url'] === false) { 
     179        $item = $item['title']; 
     180      } else { 
     181        $item = $this->Html->link($item['title'], $item['url'], $linkOptions); 
     182      } 
     183      Logger::debug($item); 
    178184      $items[] = $this->Html->tag('li', $item . $submenu, $attrs); 
    179185    } 
  • webroot/css/default/_layout.sass

    ra151cad r4eeed6a  
    3636      > li 
    3737        float: left 
    38         padding: 5px 
     38        padding: 5px 2px 
    3939        > a 
     40          padding: 5px 7px 
    4041          color: darken(white, 50%) 
    4142          +text-shadow(black, 1px, 0px, 0) 
    42         &:hover 
    43           +border-radius(5px) 
    44           background-color: darken($headerBackgroundColor, 25%) 
    45           border-color: darken($headerBackgroundColor, 35%) 
    46           > a 
     43          &:hover 
     44            +border-radius(5px) 
     45            background-color: darken($headerBackgroundColor, 25%) 
     46            border-color: darken($headerBackgroundColor, 35%) 
    4747            color: white 
    4848