Ticket #480: patch-480-496.diff
| File patch-480-496.diff, 8.5 kB (added by bastnic, 5 months ago) |
|---|
-
build/manifests/jelix-dev.mn
old new 116 116 command.class.php 117 117 utils.lib.php 118 118 cd lib/jelix-scripts/templates 119 main.tpl.tpl 120 myHtmlResponse.class.php.tpl 119 121 module.xml.tpl 120 122 dao.xml.tpl 121 123 form.xml.tpl -
build/manifests/jelix-lib.mn
old new 214 214 crud_list.tpl 215 215 crud_edit.tpl 216 216 crud_view.tpl 217 check.tpl 218 cd lib/jelix/core-modules/jelix/zones 219 check.zone.php 217 220 218 221 cd lib/jelix/dao 219 222 jDaoRecordBase.class.php -
lib/jelix-scripts/commands/createapp.cmd.php
old new 91 91 $this->createFile(JELIX_APP_CONFIG_PATH.'dbprofils.ini.php','var/config/dbprofils.ini.php.tpl',$param); 92 92 $this->createFile(JELIX_APP_CONFIG_PATH.'index/config.ini.php','var/config/index/config.ini.php.tpl',$param); 93 93 94 $this->createFile(JELIX_APP_PATH.'responses/myHtmlResponse.class.php','myHtmlResponse.class.php.tpl',$param); 95 94 96 $param['rp_temp']= jxs_getRelativePath(JELIX_APP_PATH, JELIX_APP_TEMP_PATH, true); 95 97 $param['rp_var'] = jxs_getRelativePath(JELIX_APP_PATH, JELIX_APP_VAR_PATH, true); 96 98 $param['rp_log'] = jxs_getRelativePath(JELIX_APP_PATH, JELIX_APP_LOG_PATH, true); … … 111 113 $cmd = jxs_load_command('createmodule'); 112 114 $cmd->init(array(),array('module'=>$GLOBALS['APPNAME'])); 113 115 $cmd->run(); 116 $this->createFile(JELIX_APP_PATH.'modules/'.$GLOBALS['APPNAME'].'/templates/main.tpl', 'main.tpl.tpl',$param); 114 117 } 115 118 116 119 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 2 require_once (JELIX_LIB_RESPONSE_PATH.'jResponseHtml.class.php'); 3 4 class 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/controller.tpl
old new 14 14 */ 15 15 function {$method}() { 16 16 $rep = $this->getResponse('html'); 17 17 $rep->body->assignZone('MAIN', 'jelix~check'); 18 18 return $rep; 19 19 } 20 20 } -
lib/jelix-scripts/templates/var/config/defaultconfig.ini.php.tpl
old new 25 25 ;nom = nom_fichier_ini 26 26 27 27 [responses] 28 html=myHtmlResponse 28 29 29 30 30 [error_handling] 31 31 messageLogFormat = "%date%\t[%code%]\t%msg%\t%file%\t%line%\n" 32 32 logFile = error.log -
lib/jelix/core-modules/jelix/templates/check.tpl
old new -
lib/jelix/core-modules/jelix/zones/check.zone.php
old new 1 <?php 2 3 include (JELIX_LIB_CORE_PATH.'jInstallChecker.class.php'); 4 5 /** 6 * an HTML reporter for jInstallChecker 7 * @package jelix 8 */ 9 class jHtmlInstallChecker 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 } 53 } 54 55 class jInstallCheckReturn extends jInstallCheck { 56 function run(){ 57 parent::run(); 58 return $this->reporter->trace; 59 } 60 } 61 62 class checkZone extends jZone { 63 64 protected $_tplname='check'; 65 66 protected function _prepareTpl() { 67 $check = new jInstallCheckReturn(new jHtmlInstallChecker); 68 $this->_tpl->assign('check',$check->run()); 69 70 $GLOBALS['gJCoord']->response->addCSSLink('/jelix-www/design/jelix.css'); 71 } 72 } -
lib/jelix/controllers/jControllerDaoCrud.class.php
old new 190 190 protected function _index($resp, $tpl) { 191 191 192 192 } 193 194 /** 195 * overload this method if you wan to do additionnal conditions to the index's select 196 * during the index action. 197 * @param jDaoFactoryBase $dao the dao 198 * @param jDaoConditions $cond the conditions 199 */ 200 protected function _indexSetConditions($cond) { 201 foreach ($this->propertiesForRecordsOrder as $p=>$order) { 202 $cond->addItemOrder($p, $order); 203 } 204 } 193 205 194 206 /** 195 207 * overload this method if you wan to do additionnal conditions to the index's select -
lib/jelix-www/design/jelix.css
old new 2 2 font-family: Arial, Helvetica, sans-serif; 3 3 font-size: 0.7em; 4 4 } 5 6 7 ul.checkresults { 8 border:3px solid black; 9 margin: 2em; 10 padding:1em; 11 list-style-type:none; 12 } 13 ul.checkresults li { margin:0; padding:5px; border-top:1px solid black; } 14 li.checkerror { background-color:#ff6666;} 15 li.checkok { background-color:#a4ffa9;} 16 li.checkwarning { background-color:#ffbc8f;}
