Show
Ignore:
Timestamp:
09/03/2007 08:49:02 PM (15 months ago)
Author:
Shadowhand
Message:

A few small changes:

  • Added html::script() and html::stylesheet()
  • Updated Kohana::lang() to use foo.bar syntax, like Event and Config
  • Fixed the View class' output callback handling
  • Removed AJAX spinner
  • Updated User Guide effects to use an easing for animations, and call prettyPrint() only when there are elements to be highlighted
  • Updated User Guide layout to remove AJAX-related styles
  • Updated User Guide template to be i18n compatible, the same template can be used for every language
  • Removed User Guide menu template, in favor of building the menu in the template
  • Added i18n directory for the User Guide, for localized strings (title, copyright, menu)
Files:
1 modified

Legend:

Unmodified
Added
Removed
  • trunk/modules/user_guide/views/user_guide/en/template.php

    r479 r486  
    1 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> 
    2 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> 
     1<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//<?php echo strtoupper(Config::item('core.locale')) ?>" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> 
     2<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="<?php echo Config::item('core.locale') ?>" lang="<?php echo Config::item('core.locale') ?>"> 
    33<head> 
    44<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/> 
    55 
    6 <title>Kohana User Guide</title> 
     6<title><?php echo Kohana::lang('user_guide.title') ?></title> 
    77 
    8 <link type="text/css" rel="stylesheet" href="<?php echo url::base(TRUE) ?>user_guide/css/layout.css" /> 
    9 <link type="text/css" rel="stylesheet" href="<?php echo url::base(TRUE) ?>user_guide/css/prettify.css" /> 
     8<?php 
    109 
    11 <script type="text/javascript" src="<?php echo url::base(TRUE) ?>user_guide/js/jquery.js"></script> 
    12 <script type="text/javascript" src="<?php echo url::base(TRUE) ?>user_guide/js/plugins.js"></script> 
    13 <script type="text/javascript" src="<?php echo url::base(TRUE) ?>user_guide/js/prettify.js"></script> 
    14 <script type="text/javascript" src="<?php echo url::base(TRUE) ?>user_guide/js/effects.js"></script> 
     10echo html::stylesheet(array 
     11( 
     12        'user_guide/css/layout', 
     13        'user_guide/css/prettify' 
     14), TRUE) 
     15 
     16?> 
     17 
     18<?php 
     19 
     20echo html::script(array 
     21( 
     22        'user_guide/js/jquery', 
     23        'user_guide/js/plugins', 
     24        'user_guide/js/prettify', 
     25        'user_guide/js/effects' 
     26), TRUE) 
     27 
     28?> 
    1529 
    1630</head> 
     
    1832<div id="container"> 
    1933 
     34<!-- @start Menu --> 
    2035<div id="menu"> 
    21 <?php echo $menu ?> 
     36<ul> 
     37<?php 
     38 
     39foreach(Kohana::lang('user_guide.menu') as $category => $menu): 
     40 
     41        $active = (strtolower($category) == $active_category) ? ' active' : ''; 
     42 
     43?> 
     44<li class="first<?php echo $active ?>"><span><?php echo $category ?></span><ul> 
     45<?php 
     46 
     47        foreach($menu as $section): 
     48 
     49                $active = (strtolower($section) == $active_section) ? 'lite' : ''; 
     50 
     51?> 
     52<li class="<?php echo $active ?>"><?php echo html::anchor(strtolower('user_guide/'.$category.'/'.$section), $section) ?></li> 
     53<?php 
     54 
     55        endforeach; 
     56 
     57?> 
     58</ul></li> 
     59<?php 
     60 
     61endforeach; 
     62 
     63?> 
     64</ul> 
    2265</div> 
    23  
     66<!-- @end Menu --> 
    2467<!-- @start Body --> 
    2568<div id="body"> 
     
    2770</div> 
    2871<!-- @end Body --> 
    29  
    3072<!-- @start Footer --> 
    31 <div id="footer"> 
    32 <p id="copyright">copyright (c) <?php echo date('Y') ?> Kohana Team :: All rights reserved :: Rendered in {execution_time} seconds using {memory_usage}MB of memory</p> 
    33 </div> 
     73<div id="footer"><p id="copyright"><?php echo sprintf(Kohana::lang('user_guide.copyright'), date('Y')) ?></p></div> 
    3474<!-- @end Footer --> 
    3575