Ticket #480: patch-480-496-3.diff

File patch-480-496-3.diff, 17.1 kB (added by bastnic, 10 months ago)
  • 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 
  • build/manifests/jelix-lib.mn

    old new  
    101101  auth.ISO-8859-1.properties 
    102102  auth.ISO-8859-15.properties 
    103103  auth.UTF-8.properties 
     104  check_install.UTF-8.properties 
    104105  common.ISO-8859-1.properties 
    105106  common.ISO-8859-15.properties 
    106107  common.UTF-8.properties 
     
    138139  auth.ISO-8859-1.properties 
    139140  auth.ISO-8859-15.properties 
    140141  auth.UTF-8.properties 
     142  check_install.UTF-8.properties 
    141143  common.ISO-8859-1.properties 
    142144  common.ISO-8859-15.properties 
    143145  common.UTF-8.properties 
     
    175177  auth.ISO-8859-1.properties 
    176178  auth.ISO-8859-15.properties 
    177179  auth.UTF-8.properties 
     180  check_install.UTF-8.properties 
    178181  common.ISO-8859-1.properties 
    179182  common.ISO-8859-15.properties 
    180183  common.UTF-8.properties 
     
    214217  crud_list.tpl 
    215218  crud_edit.tpl 
    216219  crud_view.tpl 
     220  check_install.tpl 
     221cd lib/jelix/core-modules/jelix/zones 
     222  check_install.zone.php 
    217223 
    218224cd lib/jelix/dao 
    219225  jDaoRecordBase.class.php 
  • lib/jelix-scripts/commands/createapp.cmd.php

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

    old new  
     1<h1 class="apptitle">{@jelix~jelix.newapp.h1@} : %%appname%%</h1> 
     2 
     3{$MAIN} 
  • lib/jelix-scripts/templates/controller.tpl

    old new  
    1414    */ 
    1515    function {$method}() { 
    1616        $rep = $this->getResponse('html'); 
    17          
     17 
     18                // this is a call for the 'welcome' zone after creating a new application 
     19                // remove this line 
     20        $rep->body->assignZone('MAIN', 'jelix~check_install');  
     21 
    1822        return $rep; 
    1923    } 
    2024} 
  • 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  
    11;<?php die(''); ?> 
    22;for security reasons , don't remove or modify the first line 
     3;this file doesn't list all possible properties. See lib/jelix/core/defaultconfig.ini.php for that 
    34 
    45locale = "fr_FR" 
    56charset = "UTF-8" 
     
    2526;nom = nom_fichier_ini 
    2627 
    2728[responses] 
     29html=myHtmlResponse 
    2830 
    29  
    3031[error_handling] 
    3132messageLogFormat = "%date%\t[%code%]\t%msg%\t%file%\t%line%\n" 
    3233logFile = error.log 
     
    5354; name of url engine :  "simple" or "significant" 
    5455engine        = simple 
    5556 
     57; this is the url path to the jelix-www content (you can found this content in lib/jelix-www/) 
     58; because the jelix-www directory is outside the yourapp/www/ directory, you should create a link to 
     59; jelix-www, or copy its content in yourapp/www/ (with a name like 'jelix' for example) 
     60; so you should indicate the relative path of this link/directory to the basePath, or an absolute path. 
     61jelixWWWPath = "jelix/" 
     62 
     63 
    5664; enable the parsing of the url. Set it to off if the url is already parsed by another program 
    5765; (like mod_rewrite in apache), if the rewrite of the url corresponds to a simple url, and if 
    5866; you use the significant engine. If you use the simple url engine, you can set to off. 
  • lib/jelix/checker.php

    old new  
    6262        }else{ 
    6363            echo '<p>',$checker->messages->get('conclusion.ok'),'</p>'; 
    6464        } 
     65        echo "</div>"; 
    6566    } 
    6667} 
    6768$check = new jInstallCheck(new jHtmlInstallChecker); 
  • lib/jelix/core-modules/jelix/locales/en_EN/check_install.UTF-8.properties

    old new  
     1nojelixwww.message=Si vous voyez ce message, c'est que vous n'avez pas rendu accessible les fichiers web (js et css) de Jelix. Deux solutions 
     2nojelixwww.sol1=vous pouvez configurer votre virtualhost et créer un alias monapp/www/jelix/ pointant vers lib/jelix-www/ 
     3nojelixwww.sol2=sinon copiez/collez le dossier lib/jelix-www/ dans le dossier www/ de votre application et renommez le en 'jelix' 
     4nojelixwww.rename=Si vous voulez utiliser un autre nom que jelix pour ce dossier, modifier le paramêtre jelixWWWPath dans defaultconfig.ini 
     5nojelixwww.moreinfo=Pour plus d'informations, consultez <a href="http://jelix.org/articles/manuel/installation/application\#configuration-du-serveur" title="documentation officielle">la documentation sur l'installation de Jelix</a> 
     6 
     7check.title=Votre configuration est-elle correcte ? 
     8 
     9temp.title=Ceci est une page temporaire 
     10temp.content=Cette page n'apparaît que parce que vous venez de créer votre application. Elle fait partie du module jelix non présent dans votre application. 
     11 
     12links.title=Que faire maintenant ? 
     13 
  • lib/jelix/core-modules/jelix/locales/en_EN/jelix.UTF-8.properties

    old new  
    11framework.name=Jelix 
    22framework.slogan=Jelix, a framework for PHP 
     3newapp.h1=Welcome in your new jelix application 
  • lib/jelix/core-modules/jelix/locales/en_US/check_install.UTF-8.properties

    old new  
     1nojelixwww.message=Si vous voyez ce message, c'est que vous n'avez pas rendu accessible les fichiers web (js et css) de Jelix. Deux solutions 
     2nojelixwww.sol1=vous pouvez configurer votre virtualhost et créer un alias monapp/www/jelix/ pointant vers lib/jelix-www/ 
     3nojelixwww.sol2=sinon copiez/collez le dossier lib/jelix-www/ dans le dossier www/ de votre application et renommez le en 'jelix' 
     4nojelixwww.rename=Si vous voulez utiliser un autre nom que jelix pour ce dossier, modifier le paramêtre jelixWWWPath dans defaultconfig.ini 
     5nojelixwww.moreinfo=Pour plus d'informations, consultez <a href="http://jelix.org/articles/manuel/installation/application\#configuration-du-serveur" title="documentation officielle">la documentation sur l'installation de Jelix</a> 
     6 
     7check.title=Votre configuration est-elle correcte ? 
     8 
     9temp.title=Ceci est une page temporaire 
     10temp.content=Cette page n'apparaît que parce que vous venez de créer votre application. Elle fait partie du module jelix non présent dans votre application. 
     11 
     12links.title=Que faire maintenant ? 
     13 
  • lib/jelix/core-modules/jelix/locales/en_US/jelix.UTF-8.properties

    old new  
    11framework.name=Jelix 
    22framework.slogan=Jelix, a framework for PHP 
     3newapp.h1=Welcome in your new jelix application 
  • lib/jelix/core-modules/jelix/locales/fr_FR/check_install.UTF-8.properties

    old new  
     1nojelixwww.message=Si vous voyez ce message, c'est que vous n'avez pas rendu accessible les fichiers web (js et css) de Jelix. Deux solutions 
     2nojelixwww.sol1=vous pouvez configurer votre virtualhost et créer un alias monapp/www/jelix/ pointant vers lib/jelix-www/ 
     3nojelixwww.sol2=sinon copiez/collez le dossier lib/jelix-www/ dans le dossier www/ de votre application et renommez le en 'jelix' 
     4nojelixwww.rename=Si vous voulez utiliser un autre nom que jelix pour ce dossier, modifier le paramêtre jelixWWWPath dans defaultconfig.ini 
     5nojelixwww.moreinfo=Pour plus d'informations, consultez <a href="http://jelix.org/articles/manuel/installation/application\#configuration-du-serveur" title="documentation officielle">la documentation sur l'installation de Jelix</a> 
     6 
     7check.title=Votre configuration est-elle correcte ? 
     8 
     9temp.title=Ceci est une page temporaire 
     10temp.content=Cette page n'apparaît que parce que vous venez de créer votre application. Elle fait partie du module jelix non présent dans votre application. 
     11 
     12links.title=Que faire maintenant ? 
     13 
  • lib/jelix/core-modules/jelix/locales/fr_FR/jelix.UTF-8.properties

    old new  
    11framework.name=Jelix 
    22framework.slogan=Jelix, framework pour PHP 
    3  
     3newapp.h1=Bienvenue dans votre nouvelle application Jelix 
  • lib/jelix/core-modules/jelix/templates/check_install.tpl

    old new  
     1{meta_html css $j_jelixwww.'design/jelix.css'} 
     2 
     3<div class="logo"></div> 
     4 
     5<div class="nocss"> 
     6        <hr /> 
     7        <p>{@jelix~check_install.nojelixwww.message@} :</p> 
     8        <ul> 
     9                <li>{@jelix~check_install.nojelixwww.sol1@}</li> 
     10                <li>{@jelix~check_install.nojelixwww.sol2@}</li> 
     11        </ul> 
     12        <p>{@jelix~check_install.nojelixwww.rename@}.</p> 
     13        <p>{@jelix~check_install.nojelixwww.moreinfo@}.</p> 
     14        <hr /> 
     15</div> 
     16 
     17<h2>{@jelix~check_install.check.title@}</h2> 
     18{$check} 
     19 
     20<h2>{@jelix~check_install.temp.title@}</h2> 
     21<p>{@jelix~check_install.temp.content@}</p> 
     22 
     23<h2>{@jelix~check_install.links.title@}</h2> 
     24<ul> 
     25        <li><a href="http://www.jelix.org" title="official Jelix's site">Official Jelix's site</li> 
     26        <li><a href="http://jelix.org/articles/manuel" title="Jelix's documenation">Jelix's documenation</li> 
     27        <li><a href="http://www.jelix.org" title="official jelix's site">Official Jelix's site</li> 
     28</ul> 
  • lib/jelix/core-modules/jelix/zones/check_install.zone.php

    old new  
     1<?php 
     2 
     3include (JELIX_LIB_CORE_PATH.'jInstallChecker.class.php'); 
     4 
     5/** 
     6 * an HTML reporter for jInstallChecker 
     7 * @package jelix 
     8 */ 
     9class checkZoneInstallReporter implements jIInstallCheckReporter { 
     10    public $trace = ''; 
     11     
     12    function start(){ 
     13        $this->trace .= '<ul class="checkresults">'; 
     14    } 
     15    function showError($message){ 
     16        $this->trace .= '<li class="checkerror">'.htmlspecialchars($message).'</li>'; 
     17    } 
     18    function showWarning($message){ 
     19        $this->trace .= '<li class="checkwarning">'.htmlspecialchars($message).'</li>'; 
     20 
     21    } 
     22    function showOk($message){ 
     23        // $this->trace .= '<li class="checkok">'.htmlspecialchars($message).'</li>'; 
     24 
     25    } 
     26    function showNotice($message){ 
     27        $this->trace .= '<li class="checknotice">'.htmlspecialchars($message).'</li>'; 
     28 
     29    } 
     30    function end($checker){ 
     31        $this->trace .= '</ul>'; 
     32        $this->trace .= '<div class="results">'; 
     33        if($checker->nbError){ 
     34            $this->trace .= ' '.$checker->nbError. $checker->messages->get( ($checker->nbError > 1?'number.errors':'number.error')); 
     35        } 
     36        if($checker->nbWarning){ 
     37            $this->trace .= ' '.$checker->nbWarning. $checker->messages->get(($checker->nbWarning > 1?'number.warnings':'number.warning')); 
     38        } 
     39        if($checker->nbNotice){ 
     40            $this->trace .= ' '.$checker->nbNotice. $checker->messages->get(($checker->nbNotice > 1?'number.notices':'number.notice')); 
     41        } 
     42 
     43        if($checker->nbError){ 
     44           $this->trace .= '<p>'.$checker->messages->get(($checker->nbError > 1?'conclusion.errors':'conclusion.error')).'</p>'; 
     45        }else  if($checker->nbWarning){ 
     46            $this->trace .= '<p>'.$checker->messages->get(($checker->nbWarning > 1?'conclusion.warnings':'conclusion.warning')).'</p>'; 
     47        }else  if($checker->nbNotice){ 
     48            $this->trace .= '<p>'.$checker->messages->get(($checker->nbNotice > 1?'conclusion.notices':'conclusion.notice')).'</p>'; 
     49        }else{ 
     50            $this->trace .= '<p>'.$checker->messages->get('conclusion.ok').'</p>'; 
     51        } 
     52        $this->trace .= "</div>"; 
     53    } 
     54} 
     55 
     56 
     57class check_installZone extends jZone { 
     58  
     59        protected $_tplname='check_install'; 
     60  
     61        protected function _prepareTpl() { 
     62            $reporter = new checkZoneInstallReporter(); 
     63        $check = new jInstallCheck($reporter); 
     64        $check->run(); 
     65        $this->_tpl->assign('check',$reporter->trace); 
     66   } 
     67} 
  • lib/jelix-www/design/jelix.css

    old new  
    1 body { 
    2     font-family: Arial, Helvetica, sans-serif; 
    3     font-size: 0.7em; 
     1/* 
     2 * Design and CSS file by Laurent Jouanneau for jelix.org 
     3 * Copyright (c) 2006-2007 by Laurent Jouanneau - adapted by Bastien Jaillot 
     4 * 
     5 * You cannot use this stylesheet on your own site without the permission of the author 
     6 * All right reserved 
     7 */ 
     8 
     9body {   
     10    font-family: Verdana, Arial, Sans;  
     11    font-size:0.8em; 
     12    margin:0; 
     13    background-color:#eff4f6; 
     14    padding-left:1em; 
     15    padding-right:1em; 
    416} 
     17 
     18.logo { 
     19    background: transparent url('images/logo_jelix_moyen.png') top left; 
     20    height: 60px; 
     21    width: 180px; 
     22    position: absolute; 
     23    top: 10px; 
     24    left: 10px; 
     25} 
     26 
     27a { color:#3f6f7a; text-decoration:underline; } 
     28a:visited {  color : #002830;} 
     29a:hover { color: #0f82af; background-color: #d7e7eb; } 
     30 
     31 
     32h1.apptitle { 
     33    margin: 32px 0 60px 200px; 
     34    font-size: 1.7em; 
     35    color: #002830; 
     36} 
     37 
     38/* 
     39 * checker 
     40 *********/ 
     41ul.checkresults { 
     42    border:3px solid black; 
     43    margin: 2em; 
     44    padding:1em; 
     45    list-style-type:none; 
     46} 
     47ul.checkresults li { margin:0; padding:5px; border-top:1px solid black; } 
     48li.checkerror   { background-color:#ff6666;} 
     49li.checkok      { background-color:#a4ffa9;} 
     50li.checkwarning { background-color:#ffbc8f;} 
     51 
     52.nocss { 
     53    display: none; 
     54} 
Download in other formats: Original Format