Changeset 2692
- Timestamp:
- 11/15/06 22:03:55 (3 years ago)
- Files:
-
- trunk/data/modules/default/actions/actions.class.php (modified) (1 diff)
- trunk/data/modules/default/templates/defaultLayout.php (added)
- trunk/data/modules/default/templates/disabledSuccess.php (modified) (1 diff)
- trunk/data/modules/default/templates/error404Success.php (modified) (1 diff)
- trunk/data/modules/default/templates/indexSuccess.php (modified) (1 diff)
- trunk/data/modules/default/templates/loginSuccess.php (modified) (1 diff)
- trunk/data/modules/default/templates/moduleSuccess.php (added)
- trunk/data/modules/default/templates/secureSuccess.php (modified) (1 diff)
- trunk/data/modules/default/templates/unavailableSuccess.php (modified) (1 diff)
- trunk/data/skeleton/module/module/actions/actions.class.php (modified) (1 diff)
- trunk/data/skeleton/module/module/templates/indexSuccess.php (modified) (1 diff)
- trunk/data/skeleton/module/test/actionsTest.php (modified) (1 diff)
- trunk/data/skeleton/project/web/error.php (deleted)
- trunk/data/skeleton/project/web/error500.html (deleted)
- trunk/data/skeleton/project/web/unavailable.html (deleted)
- trunk/data/web/error500.php (added)
- trunk/data/web/sf/sf_default (added)
- trunk/data/web/sf/sf_default/css (added)
- trunk/data/web/sf/sf_default/css/ie.css (added)
- trunk/data/web/sf/sf_default/css/pngfix.htc (added)
- trunk/data/web/sf/sf_default/css/screen.css (added)
- trunk/data/web/sf/sf_default/images (added)
- trunk/data/web/sf/sf_default/images/bg_body.jpg (added)
- trunk/data/web/sf/sf_default/images/bg_sfTAlert.jpg (added)
- trunk/data/web/sf/sf_default/images/bg_sfTLock.jpg (added)
- trunk/data/web/sf/sf_default/images/bg_sfTMessage.jpg (added)
- trunk/data/web/sf/sf_default/images/icons (added)
- trunk/data/web/sf/sf_default/images/icons/cancel48.png (added)
- trunk/data/web/sf/sf_default/images/icons/colour16.png (added)
- trunk/data/web/sf/sf_default/images/icons/db16.png (added)
- trunk/data/web/sf/sf_default/images/icons/disabled48.png (added)
- trunk/data/web/sf/sf_default/images/icons/edit16.png (added)
- trunk/data/web/sf/sf_default/images/icons/folder16.png (added)
- trunk/data/web/sf/sf_default/images/icons/linkOut16.png (added)
- trunk/data/web/sf/sf_default/images/icons/lock48.png (added)
- trunk/data/web/sf/sf_default/images/icons/ok48.png (added)
- trunk/data/web/sf/sf_default/images/icons/reload16.png (added)
- trunk/data/web/sf/sf_default/images/icons/tools48.png (added)
- trunk/data/web/sf/sf_default/images/sfTLogo.png (added)
- trunk/data/web/unavailable.php (added)
- trunk/lib/exception/sfException.class.php (modified) (1 diff)
- trunk/lib/util/sfCore.class.php (modified) (1 diff)
- trunk/test/functional/genericTest.php (modified) (1 diff)
- trunk/test/other/fixtures/test/functional/result-harness.txt (modified) (1 diff)
- trunk/test/other/fixtures/test/functional/result.txt (modified) (1 diff)
- trunk/test/other/fixtures/test/result-harness.txt (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/data/modules/default/actions/actions.class.php
r1415 r2692 19 19 class defaultActions extends sfActions 20 20 { 21 public function preExecute() 22 { 23 $this->setLayout(sfLoader::getTemplateDir('default', 'defaultLayout.php').'/defaultLayout'); 24 $this->getResponse()->addStylesheet('/sf/sf_default/css/screen.css', 'last'); 25 } 26 27 /** 28 * Congratulations page for creating an application 29 * 30 */ 31 public function executeIndex() 32 { 33 } 34 35 /** 36 * Congratulations page for creating a module 37 * 38 */ 39 public function executeModule() 40 { 41 } 42 43 /** 44 * Error page for page not found (404) error 45 * 46 */ 47 public function executeError404() 48 { 49 } 50 51 /** 52 * Warning page for restricted area - requires login 53 * 54 */ 55 public function executeSecure() 56 { 57 } 58 59 /** 60 * Warning page for restricted area - requires credentials 61 * 62 */ 63 public function executeLogin() 64 { 65 } 66 67 /** 68 * Website temporarily unavailable 69 * 70 */ 21 71 public function executeUnavailable() 22 72 { 23 73 } 24 74 25 public function executeIndex() 26 { 27 } 28 29 public function executeError404() 30 { 31 } 32 33 public function executeLogin() 34 { 35 } 36 75 /** 76 * Website disabled by the site administrator (in settings.yml) 77 * 78 */ 37 79 public function executeDisabled() 38 80 { 39 81 } 40 41 public function executeSecure()42 {43 }44 82 } trunk/data/modules/default/templates/disabledSuccess.php
r500 r2692 1 <p>This module is unavailable.</p> 1 <div class="sfTMessageContainer sfTAlert"> 2 <?php echo image_tag('/sf/sf_default/images/icons/disabled48.png', array('alt' => 'module disabled', 'class' => 'sfTMessageIcon', 'size' => '48x48')) ?> 3 <div class="sfTMessageWrap"> 4 <h1>This Module is Unavailable</h1> 5 <h5>This module has been disabled by a site administrator.</h5> 6 </div> 7 </div> 8 <dl class="sfTMessageInfo"> 9 10 <dt>What's next</dt> 11 <dd> 12 <ul class="sfTIconList"> 13 <li class="sfTLinkMessage"><a href="javascript:history.go(-1)">Back to previous page</a></li> 14 <li class="sfTLinkMessage"><?php echo link_to('Go to Homepage', '@homepage') ?></li> 15 </ul> 16 </dd> 17 </dl> trunk/data/modules/default/templates/error404Success.php
r500 r2692 1 <h1>Oops! We couldn't find this page for you.</h1> 1 <div class="sfTMessageContainer sfTAlert"> 2 <?php echo image_tag('/sf/sf_default/images/icons/cancel48.png', array('alt' => 'page not found', 'class' => 'sfTMessageIcon', 'size' => '48x48')) ?> 3 <div class="sfTMessageWrap"> 4 <h1>Oops! Page Not Found</h1> 5 <h5>The server returned a 404 response.</h5> 6 </div> 7 </div> 8 <dl class="sfTMessageInfo"> 9 <dt>Did you type the URL?</dt> 10 <dd>You may have typed the address (URL) incorrectly. Check it to make sure you've got the exact right spelling, capitalization, etc.</dd> 2 11 3 <h2>Did you type the URL?</h2>4 <p>You may have typed the address (URL) incorrectly. Check it to make sure you've got the exact right spelling, capitalization, etc.</p>12 <dt>Did you follow a link from somewhere else at this site?</dt> 13 <dd>If you reached this page from another part of this site, please email us at <?php echo mail_to('[email]') ?> so we can correct our mistake.</dd> 5 14 6 <h2>Did you follow a link from somewhere else at this site?</h2>7 <p>If you reached this page from another part of this site, please email us at [email] so we can correct our mistake.</p>15 <dt>Did you follow a link from another site?</dt> 16 <dd>Links from other sites can sometimes be outdated or misspelled. Email us at <?php echo mail_to('[email]') ?> where you came from and we can try to contact the other site in order to fix the problem.</dd> 8 17 9 <h2>Did you follow a link from another site?</h2> 10 <p>Links from other sites can sometimes be outdated or misspelled. Email us at [email] where you came from and we can try to contact the other site in order to fix the problem.</p> 11 <br /> 12 <p> 13 <a href="javascript:history.go(-1)">Go back a page</a><br /> 14 <!-- <a href="#">Search the site</a><br /> --> 15 <a href="/">Visit the home page</a> 16 </p> 17 <br /> 18 <p><em>404 Error : page not found</em></p> 18 <dt>What's next</dt> 19 <dd> 20 <ul class="sfTIconList"> 21 <li class="sfTLinkMessage"><a href="javascript:history.go(-1)">Back to previous page</a></li> 22 <li class="sfTLinkMessage"><?php echo link_to('Go to Homepage', '@homepage') ?></li> 23 </ul> 24 </dd> 25 </dl> trunk/data/modules/default/templates/indexSuccess.php
r500 r2692 1 <h1>Congratulations!</h1> 1 <div class="sfTMessageContainer sfTMessage"> 2 <?php echo image_tag('/sf/sf_default/images/icons/ok48.png', array('alt' => 'ok', 'class' => 'sfTMessageIcon', 'size' => '48x48')) ?> 3 <div class="sfTMessageWrap"> 4 <h1>Symfony Project Created</h1> 5 <h5>Congratulations! You have successfully created your symfony project.</h5> 6 </div> 7 </div> 8 <dl class="sfTMessageInfo"> 9 <dt>Project setup successful</dt> 10 <dd>This project uses the symfony libraries. If you see no image in this page, you may need to configure your web server so that it gains access to the <code>symfony_data/web/sf/</code> directory.</dd> 2 11 3 <p>If you see this page, it means that the creation of your symfony project on this system was successful.</p> 12 <dt>This is a temporary page</dt> 13 <dd>This page is part of the symfony <code>default</code> module. It will disappear as soon as you define a <code>homepage</code> route in your <code>routing.yml</code>.</dd> 4 14 5 <p>You can now create your model and customize default templates.</p> 6 7 <hr /> 8 9 <p>© 2004-2005 <?php echo link_to('symfony project', 'http://www.symfony-project.org/') ?></p> 15 <dt>What's next</dt> 16 <dd> 17 <ul class="sfTIconList"> 18 <li class="sfTDatabaseMessage">Create your data model</li> 19 <li class="sfTColorMessage">Customize the layout of the generated templates</li> 20 <li class="sfTLinkMessage"><?php echo link_to('Learn more from the online documentation', 'http://www.symfony-project.com/content/documentation.html') ?></li> 21 </ul> 22 </dd> 23 </dl> trunk/data/modules/default/templates/loginSuccess.php
r2047 r2692 1 <p>You must enter your credentials to access this page.</p> 1 <div class="sfTMessageContainer sfTLock"> 2 <?php echo image_tag('/sf/sf_default/images/icons/lock48.png', array('alt' => 'credentials required', 'class' => 'sfTMessageIcon', 'size' => '48x48')) ?> 3 <div class="sfTMessageWrap"> 4 <h1>Credentials Required</h1> 5 <h5>This page is in a restricted area.</h5> 6 </div> 7 </div> 8 <dl class="sfTMessageInfo"> 9 <dt>You do not have the proper credentials to access this page</dt> 10 <dd>Even though you are already logged in, this page requires special credentials that you currently don't have. </dd> 11 12 <dt>How to access this page</dt> 13 <dd>You must ask a site administrator to grant you some special credentials.</dd> 14 15 <dt>What's next</dt> 16 <dd> 17 <ul class="sfTIconList"> 18 <li class="sfTLinkMessage"><a href="javascript:history.go(-1)">Back to previous page</a></li> 19 </ul> 20 </dd> 21 </dl> trunk/data/modules/default/templates/secureSuccess.php
r500 r2692 1 <p>You cannot access this page.</p> 1 <div class="sfTMessageContainer sfTLock"> 2 <?php echo image_tag('/sf/sf_default/images/icons/lock48.png', array('alt' => 'login required', 'class' => 'sfTMessageIcon', 'size' => '48x48')) ?> 3 <div class="sfTMessageWrap"> 4 <h1>Login Required</h1> 5 <h5>This page is not public.</h5> 6 </div> 7 </div> 8 <dl class="sfTMessageInfo"> 9 <dt>How to access this page</dt> 10 <dd>You must proceed to the login page and enter your id and password.</dd> 11 12 <dt>What's Next</dt> 13 <dd> 14 <ul class="sfTIconList"> 15 <li class="sfTLinkMessage"><?php echo link_to('Proceed to login', sfConfig::get('sf_login_module').'/'.sfConfig::get('sf_login_action')) ?></li> 16 <li class="sfTLinkMessage"><a href="javascript:history.go(-1)">Back to previous page</a></li> 17 </ul> 18 </dd> 19 </dl> trunk/data/modules/default/templates/unavailableSuccess.php
r500 r2692 1 <p>This website is unavailable.</p> 1 <div class="sfTMessageContainer sfTAlert"> 2 <?php echo image_tag('/sf/sf_default/images/icons/tools48.png', array('alt' => 'website unavailable', 'class' => 'sfTMessageIcon', 'size' => '48x48')) ?> 3 <div class="sfTMessageWrap"> 4 <h1>Website Currently Unavailable</h1> 5 <h5>This website has been temporarily disabled. Please try again later.</h5> 6 </div> 7 </div> trunk/data/skeleton/module/module/actions/actions.class.php
r1814 r2692 17 17 public function executeIndex() 18 18 { 19 $this->forward('default', 'module'); 19 20 } 20 21 } trunk/data/skeleton/module/module/templates/indexSuccess.php
r500 r2692 1 <h1>Module ##MODULE_NAME##</h1>2 3 <p>Congratulations!</p>trunk/data/skeleton/module/test/actionsTest.php
r2275 r2692 12 12 isRequestParameter('module', '##MODULE_NAME##')-> 13 13 isRequestParameter('action', 'index')-> 14 checkResponseElement('body', ' /##MODULE_NAME##/')14 checkResponseElement('body', '!/This is a temporary page/') 15 15 ; trunk/lib/exception/sfException.class.php
r2664 r2692 105 105 if (!sfConfig::get('sf_debug')) 106 106 { 107 error_log($exception->getMessage()); 108 107 109 $file = sfConfig::get('sf_web_dir').'/error500.html'; 108 error_log($exception->getMessage()); 109 if (is_readable($file)) 110 { 111 include($file); 112 } 113 else 114 { 115 echo 'internal server error'; 116 } 110 include(is_readable($file) ? $file : sfConfig::get('sf_symfony_data_dir').'/web/error500.php'); 117 111 118 112 if (!sfConfig::get('sf_test')) trunk/lib/util/sfCore.class.php
r2369 r2692 93 93 { 94 94 // application is not available 95 include(sfConfig::get('sf_web_dir').'/unavailable.html'); 95 $file = sfConfig::get('sf_web_dir').'/unavailable.html'; 96 include(is_readable($file) ? $file : sfConfig::get('sf_symfony_data_dir').'/web/unavailable.php'); 97 96 98 die(1); 97 99 } trunk/test/functional/genericTest.php
r2277 r2692 65 65 get('/configSecurityIsSecure')-> 66 66 isStatusCode(200)-> 67 checkResponseElement('body', '/ You must enter your credentials to access this page/i')->67 checkResponseElement('body', '/Credentials Required/i')-> 68 68 checkResponseElement('body', 1) // check that there is no double output caused by the forwarding in a filter 69 69 ; trunk/test/other/fixtures/test/functional/result-harness.txt
r2275 r2692 1 1 articleInitCrudActionsTest...........................................ok 2 fooActionsTest.......................................................ok 3 All tests successful. 4 Files=2, Tests=8 2 fooActionsTest.......................................................not ok 3 Failed tests: 4 4 Failed Test Stat Total Fail List of Failed 5 ------------------------------------------------------------------ 6 fooActionsTest 0 1 1 4 7 Failed 1/2 test scripts, 50.00% okay. 1/8 subtests failed, 87.50% okay. trunk/test/other/fixtures/test/functional/result.txt
r2275 r2692 3 3 ok 2 - request parameter module is articleInitCrud 4 4 ok 3 - request parameter action is index 5 ok 4 - response selector body matches regex /articleInitCrud/5 ok 4 - response selector body does not match regex /This is a temporary page/ 6 6 1..4 trunk/test/other/fixtures/test/result-harness.txt
r2275 r2692 1 1 functional/frontend/articleInitCrudActionsTest.......................ok 2 functional/frontend/fooActionsTest...................................ok 2 functional/frontend/fooActionsTest...................................not ok 3 Failed tests: 4 3 4 unit/testTest........................................................ok 4 All tests successful. 5 Files=3, Tests=9 5 Failed Test Stat Total Fail List of Failed 6 ------------------------------------------------------------------ 7 tional/frontend/fooActionsTest 0 1 1 4 8 Failed 1/3 test scripts, 66.67% okay. 1/9 subtests failed, 88.89% okay.

