Ticket #496: patch-496-2.diff

File patch-496-2.diff, 3.0 kB (added by bastnic, 6 months ago)
  • lib/jelix-scripts/commands/createapp.cmd.php

    old new  
    9090       $this->createFile(JELIX_APP_CONFIG_PATH.'dbprofils.ini.php','var/config/dbprofils.ini.php.tpl',$param); 
    9191       $this->createFile(JELIX_APP_CONFIG_PATH.'index/config.ini.php','var/config/index/config.ini.php.tpl',$param); 
    9292 
     93       $this->createFile(JELIX_APP_PATH.'responses/myHtmlResponse.class.php','myHtmlResponse.class.php.tpl',$param); 
     94 
    9395       $param['rp_temp']= jxs_getRelativePath(JELIX_APP_PATH, JELIX_APP_TEMP_PATH, true); 
    9496       $param['rp_var'] = jxs_getRelativePath(JELIX_APP_PATH, JELIX_APP_VAR_PATH,  true); 
    9597       $param['rp_log'] = jxs_getRelativePath(JELIX_APP_PATH, JELIX_APP_LOG_PATH,  true); 
     
    110112            $cmd = jxs_load_command('createmodule'); 
    111113            $cmd->init(array(),array('module'=>$GLOBALS['APPNAME'])); 
    112114            $cmd->run(); 
     115            $this->createFile(JELIX_APP_PATH.'modules/'.$GLOBALS['APPNAME'].'/templates/main.tpl', 'main.tpl.tpl',$param); 
    113116       } 
    114117 
    115118       if ($this->getOption('-withcmdline')) { 
  • lib/jelix-scripts/templates/main.tpl.tpl

    old new  
     1<h1>Bienvenue dans votre nouvelle application Jelix : {$appname}</h1> 
     2 
     3{{$MAIN}$MAIN} 
  • lib/jelix-scripts/templates/myHtmlResponse.class.php.tpl

    old new  
     1<?php  
     2require_once (JELIX_LIB_RESPONSE_PATH.'jResponseHtml.class.php'); 
     3 
     4class myHtmlResponse extends jResponseHtml { 
     5 
     6        protected function _commonProcess() { 
     7                $this->bodyTpl = '{$appname}~main'; 
     8                $this->body->assignIfNone('MAIN','<p>no content</p>'); 
     9                 
     10        } 
     11} 
     12?> 
  • lib/jelix-scripts/templates/var/config/defaultconfig.ini.php.tpl

    old new  
    2525;nom = nom_fichier_ini 
    2626 
    2727[responses] 
     28html=myHtmlResponse 
    2829 
    29  
    3030[error_handling] 
    3131messageLogFormat = "%date%\t[%code%]\t%msg%\t%file%\t%line%\n" 
    3232logFile = error.log 
  • build/manifests/jelix-dev.mn

    old new  
    116116  command.class.php 
    117117  utils.lib.php 
    118118cd lib/jelix-scripts/templates 
     119  main.tpl.tpl 
     120  myHtmlResponse.class.php.tpl 
    119121  module.xml.tpl 
    120122  dao.xml.tpl 
    121123  form.xml.tpl 
Download in other formats: Original Format