Changeset 4289 for sandbox

Show
Ignore:
Timestamp:
06/17/2008 11:16:49 AM (3 months ago)
Author:
zero
Message:

관리자 페이지의 왼쪽 메뉴의 선택된 모듈 표시 방식을 각 모듈별 action값과 정확히 매치되는 것을 대상으로 하도록 변경

Location:
sandbox/modules/admin
Files:
2 modified

Legend:

Unmodified
Added
Removed
  • sandbox/modules/admin/admin.admin.view.php

    r4184 r4289  
    2828            $oModuleModel = &getModel('module'); 
    2929            $installed_module_list = $oModuleModel->getModulesXmlInfo(); 
     30            foreach($installed_module_list as $key => $val) { 
     31                $action_spec = $oModuleModel->getModuleActionXml($val->module); 
     32                $actions = array(); 
     33                if($action_spec->default_index_act) $actions[] = $action_spec->default_index_act; 
     34                if($action_spec->admin_index_act) $actions[] = $action_spec->admin_index_act; 
     35                if($action_spec->action) foreach($action_spec->action as $k => $v) $actions[] = $k; 
     36                $installed_module_list[$key]->actions = $actions; 
     37            } 
    3038            Context::set('installed_module_list', $installed_module_list); 
    31  
    32             // 현재 실행중인 모듈을 구해 놓음 
    33             $running_module = strtolower(preg_replace('/([a-z]+)([A-Z]+)([a-z0-9]+)(.*)/', '\\2\\3', $this->act)); 
    34             Context::set('running_module', $running_module); 
    3539 
    3640            $db_info = Context::getDBInfo(); 
  • sandbox/modules/admin/tpl/layout.html

    r3029 r4289  
    3333                <!--@if($v->category == $key)--> 
    3434                    <!--@if($v->admin_index_act)--> 
    35                     <li <!--@if($running_module==$v->module)-->class="on"<!--@end--> onclick="location.href='{getUrl('','module','admin','act',$v->admin_index_act)}'; return false;"> 
     35                    <li <!--@if(in_array($act, $v->actions))-->class="on"<!--@end--> onclick="location.href='{getUrl('','module','admin','act',$v->admin_index_act)}'; return false;"> 
    3636                            <a href="{getUrl('','module','admin','act',$v->admin_index_act)}">{$v->title}</a> 
    3737                    </li>