Changeset 14937 for events/phpframework

Show
Ignore:
Timestamp:
06/30/08 23:55:04 (5 years ago)
Author:
kumatch
Message:

Changed architecture of a layout.

Location:
events/phpframework/piece_framework/trunk
Files:
3 modified

Legend:

Unmodified
Added
Removed
  • events/phpframework/piece_framework/trunk/libs/Phwittr/Interceptor/LayoutSetter.php

    r14268 r14937  
    6161    public function invoke() 
    6262    { 
    63         $config = $this->_context->getConfiguration(); 
     63        $viewElement = $this->_context->getViewElement(); 
     64        $service = new Piece_Unity_Service_Authentication(); 
    6465 
    65         $service = new Piece_Unity_Service_Authentication(); 
    6666        if ($service->isAuthenticated()) { 
    67             $config->setConfiguration('Renderer_Runemaster', 
    68                                       'layoutView', 'Layout_User' 
    69                                       ); 
     67            $viewElement->setElement('isAuthenticated', true); 
     68        } else { 
     69            $viewElement->setElement('isAuthenticated', false); 
    7070        } 
    7171 
  • events/phpframework/piece_framework/trunk/web/frontend/webapp/config/piece-unity-config.yaml

    r14871 r14937  
    9696    - name: layoutView 
    9797      type: configuration 
    98       value: Layout_Guest 
     98      value: Layout_Contents 
    9999    - name: templateDir 
    100100      type: configuration 
  • events/phpframework/piece_framework/trunk/web/frontend/webapp/templates/Layout/Contents.html

    r14935 r14937  
    2727  <div id="header"> 
    2828    <h1><img src="/img/share/phwittr_logo.gif" alt="phwittr" /></h1> 
    29     <ul id="guideNav"> 
     29    <ul id="guideNav" if="isAuthenticated"> 
     30      <li><a href="/home">ホーム</a></li> 
     31      <li><a href="/account/settings">設定</a></li> 
     32      <li><a href="/logout">ログアウト</a></li> 
     33    </ul> 
     34    <ul id="guideNav" if="!isAuthenticated"> 
    3035      <li><a href="/login">ログイン</a></li> 
    3136      <li><a href="/signup">ユーザ登録</a></li>