Ignore:
Timestamp:
2010/12/14 17:37:25 (15 years ago)
Author:
nanasess
bzr:base-revision:
[email protected]
bzr:committer:
Kentaro Ohkouchi <[email protected]>
bzr:file-ids:

data/Smarty/templates/admin/design/bloc.tpl 15732@1e3b908f-19a9-db11-a64c-001125224ba8:branches%2Ffeature-module-update%2Fdata%2FSmarty%2Ftemplates%2Fdefault%2Fadmin%2Fdesign%2Fbloc.tpl
data/Smarty/templates/admin/design/css.tpl 15732@1e3b908f-19a9-db11-a64c-001125224ba8:branches%2Ffeature-module-update%2Fdata%2FSmarty%2Ftemplates%2Fdefault%2Fadmin%2Fdesign%2Fcss.tpl
data/Smarty/templates/admin/design/header.tpl 15732@1e3b908f-19a9-db11-a64c-001125224ba8:branches%2Ffeature-module-update%2Fdata%2FSmarty%2Ftemplates%2Fdefault%2Fadmin%2Fdesign%2Fheader.tpl
data/Smarty/templates/admin/design/index.tpl 15732@1e3b908f-19a9-db11-a64c-001125224ba8:branches%2Ffeature-module-update%2Fdata%2FSmarty%2Ftemplates%2Fdefault%2Fadmin%2Fdesign%2Findex.tpl
data/Smarty/templates/admin/design/main_edit.tpl 15732@1e3b908f-19a9-db11-a64c-001125224ba8:branches%2Ffeature-module-update%2Fdata%2FSmarty%2Ftemplates%2Fdefault%2Fadmin%2Fdesign%2Fmain_edit.tpl
data/Smarty/templates/admin/design/template.tpl 15732@1e3b908f-19a9-db11-a64c-001125224ba8:branches%2Ffeature-module-update%2Fdata%2FSmarty%2Ftemplates%2Fdefault%2Fadmin%2Fdesign%2Ftemplate.tpl
data/Smarty/templates/admin/design/up_down.tpl 16677@1e3b908f-19a9-db11-a64c-001125224ba8:branches%2Ffeature-module-update%2Fdata%2FSmarty%2Ftemplates%2Fdefault%2Fadmin%2Fdesign%2Fup_down.tpl
data/class/helper/SC_Helper_PageLayout.php 15078@1e3b908f-19a9-db11-a64c-001125224ba8:branches%2Ffeature-module-update%2Fdata%2Fclass%2Fhelper%2FSC_Helper_PageLayout.php
data/class/pages/LC_Page_Index.php 15078@1e3b908f-19a9-db11-a64c-001125224ba8:branches%2Ffeature-module-update%2Fdata%2Fclass%2Fpages%2FLC_Page_Index.php
data/class/pages/admin/design/LC_Page_Admin_Design.php 15680@1e3b908f-19a9-db11-a64c-001125224ba8:branches%2Ffeature-module-update%2Fdata%2Fclass%2Fpages%2Fadmin%2Fdesign%2FLC_Page_Admin_Design.php
data/class/pages/admin/design/LC_Page_Admin_Design_Bloc.php 15687@1e3b908f-19a9-db11-a64c-001125224ba8:branches%2Ffeature-module-update%2Fdata%2Fclass%2Fpages%2Fadmin%2Fdesign%2FLC_Page_Admin_Design_Bloc.php
data/class/pages/admin/design/LC_Page_Admin_Design_CSS.php 15689@1e3b908f-19a9-db11-a64c-001125224ba8:branches%2Ffeature-module-update%2Fdata%2Fclass%2Fpages%2Fadmin%2Fdesign%2FLC_Page_Admin_Design_CSS.php
data/class/pages/admin/design/LC_Page_Admin_Design_Header.php 15688@1e3b908f-19a9-db11-a64c-001125224ba8:branches%2Ffeature-module-update%2Fdata%2Fclass%2Fpages%2Fadmin%2Fdesign%2FLC_Page_Admin_Design_Header.php
data/class/pages/admin/design/LC_Page_Admin_Design_MainEdit.php 15682@1e3b908f-19a9-db11-a64c-001125224ba8:branches%2Ffeature-module-update%2Fdata%2Fclass%2Fpages%2Fadmin%2Fdesign%2FLC_Page_Admin_Design_MainEdit.php
data/class/pages/admin/design/LC_Page_Admin_Design_Template.php 16430@1e3b908f-19a9-db11-a64c-001125224ba8:branches%2Ffeature-module-update%2Fdata%2Fclass%2Fpages%2Fadmin%2Fdesign%2FLC_Page_Admin_Design_Template.php
data/class/pages/admin/design/LC_Page_Admin_Design_Up_Down.php 16677@1e3b908f-19a9-db11-a64c-001125224ba8:branches%2Ffeature-module-update%2Fdata%2Fclass%2Fpages%2Fadmin%2Fdesign%2FLC_Page_Admin_Design_Up_Down.php
html/mobile/user_data/packages packages-20101214083119-2dp9jrcb0559zf59-1
bzr:mapping-version:
v4
bzr:merge:

[email protected]
bzr:repository-uuid:
1e3b908f-19a9-db11-a64c-001125224ba8
bzr:revision-id:
[email protected]
bzr:revno:
2451
bzr:revprop:branch-nick:
branches/version-2_5-dev
bzr:root:
branches/version-2_5-dev
bzr:text-revisions:

data/Smarty/templates/admin/design/bloc.tpl [email protected]
data/Smarty/templates/admin/design/css.tpl [email protected]
data/Smarty/templates/admin/design/header.tpl [email protected]
data/Smarty/templates/admin/design/index.tpl [email protected]
data/Smarty/templates/admin/design/main_edit.tpl [email protected]
data/Smarty/templates/admin/design/template.tpl [email protected]
data/Smarty/templates/admin/design/up_down.tpl [email protected]
data/class/helper/SC_Helper_PageLayout.php [email protected]
data/class/pages/LC_Page_Index.php [email protected]
data/class/pages/admin/design/LC_Page_Admin_Design.php [email protected]
data/class/pages/admin/design/LC_Page_Admin_Design_Bloc.php [email protected]
data/class/pages/admin/design/LC_Page_Admin_Design_CSS.php [email protected]
data/class/pages/admin/design/LC_Page_Admin_Design_Header.php [email protected]
data/class/pages/admin/design/LC_Page_Admin_Design_MainEdit.php [email protected]
data/class/pages/admin/design/LC_Page_Admin_Design_Template.php [email protected]
data/class/pages/admin/design/LC_Page_Admin_Design_Up_Down.php [email protected]
html/mobile/user_data/packages [email protected]
bzr:timestamp:
2010-12-14 17:37:18.494999886 +0900
bzr:user-agent:
bzr2.2.1+bzr-svn1.0.4
svn:original-date:
2010-12-14T08:37:18.495000Z
Message:

#748(モバイル/スマートフォンのデザイン管理)

  • tpl ファイルの取得方法を修正
File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/version-2_5-dev/data/class/helper/SC_Helper_PageLayout.php

    r19713 r19722  
    6464        $arrPageLayout = $arrPageData[0]; 
    6565 
    66         // tpl_mainpageの設定なし、又はトップページの場合 
    67         if (!isset($objPage->tpl_mainpage) || $url == "index.php") { 
    68             // ユーザテンプレートのパスを取得 
    69             $user_tpl =  $this->getTemplatePath($device_type_id, true) 
     66        // ユーザテンプレートのパスを取得 
     67        $user_tpl =  $this->getTemplatePath($device_type_id, true) 
     68            . $arrPageLayout['filename'] . ".tpl"; 
     69 
     70        // ユーザテンプレートの存在チェック 
     71        if (is_file($user_tpl)) { 
     72            $objPage->tpl_mainpage = $user_tpl; 
     73        } 
     74        // 存在しない場合は指定テンプレートを使用 
     75        else { 
     76            $objPage->tpl_mainpage = $this->getTemplatePath($device_type_id) 
    7077                . $arrPageLayout['filename'] . ".tpl"; 
    71  
    72             // ユーザテンプレートの存在チェック 
    73             if (is_file($user_tpl)) { 
    74                 $objPage->tpl_mainpage = $user_tpl; 
    75             } 
    76             // 存在しない場合は指定テンプレートを使用 
    77             else { 
    78                 $objPage->tpl_mainpage = $this->getTemplatePath($device_type_id) 
    79                     . $arrPageLayout['filename'] . ".tpl"; 
    80             } 
    8178        } 
    8279 
     
    268265        case DEVICE_TYPE_MOBILE: 
    269266            $dir = MOBILE_TEMPLATE_DIR; 
     267            $userPath = HTML_PATH . MOBILE_DIR . USER_DIR; 
    270268            $templateName = MOBILE_TEMPLATE_NAME; 
    271269            break; 
     
    273271        case DEVICE_TYPE_SMARTPHONE: 
    274272            $dir = SMARTPHONE_TEMPLATE_DIR; 
     273            $userPath = HTML_PATH . SMARTPHONE_DIR . USER_DIR; 
    275274            $templateName = SMARTPHONE_TEMPLATE_NAME; 
    276275            break; 
     
    279278        default: 
    280279            $dir = TEMPLATE_DIR; 
     280            $userPath = USER_PATH; 
    281281            $templateName = TEMPLATE_NAME; 
    282282        } 
    283283        if ($isUser) { 
    284             $dir = USER_TEMPLATE_DIR . $templateName . "/"; 
     284            $dir = $userPath . USER_PACKAGE_DIR . $templateName . "/"; 
    285285        } 
    286286        return $dir; 
     287    } 
     288 
     289    /** 
     290     * user_data の絶対パスを返す. 
     291     * 
     292     * @param integer $device_type_id 端末種別ID 
     293     * @return string 端末に応じた user_data の絶対パス 
     294     */ 
     295    function getUserPath($device_type_id = DEVICE_TYPE_PC) { 
     296        switch ($device_type_id) { 
     297        case DEVICE_TYPE_MOBILE: 
     298            return HTML_PATH . MOBILE_DIR . USER_DIR; 
     299            break; 
     300 
     301        case DEVICE_TYPE_SMARTPHONE: 
     302            return HTML_PATH . SMARTPHONE_DIR . USER_DIR; 
     303            break; 
     304 
     305        case DEVICE_TYPE_PC: 
     306        default: 
     307        } 
     308        return USER_PATH; 
     309    } 
     310 
     311    /** 
     312     * DocumentRoot から user_data のパスを取得する. 
     313     * 
     314     * @param integer $device_type_id 端末種別ID 
     315     * @return string 端末に応じた DocumentRoot から user_data までのパス 
     316     */ 
     317    function getUserDir($device_type_id = DEVICE_TYPE_PC) { 
     318        switch ($device_type_id) { 
     319        case DEVICE_TYPE_MOBILE: 
     320            $userDir = URL_DIR . MOBILE_DIR . USER_DIR; 
     321            $templateName = MOBILE_TEMPLATE_NAME; 
     322            break; 
     323 
     324        case DEVICE_TYPE_SMARTPHONE: 
     325            $userDir = URL_DIR . SMARTPHONE_DIR . USER_DIR; 
     326            break; 
     327 
     328        case DEVICE_TYPE_PC: 
     329        default: 
     330            $userDir = URL_DIR . USER_DIR; 
     331        } 
     332        return $userDir; 
    287333    } 
    288334} 
Note: See TracChangeset for help on using the changeset viewer.