Major theme rework

This commit is contained in:
Deon George
2012-01-29 17:23:24 +11:00
parent 3d1c43687c
commit 89bb9004ed
49 changed files with 663 additions and 1320 deletions

View File

@@ -62,24 +62,26 @@ class lnApp_Breadcrumb extends HTMLRender {
* Render this Breadcrumb
*/
protected function render() {
// @todo Make this into a view
$output = '<table class="pagecontrol"><tr><td class="none">';
$output .= HTML::anchor('/',_('Home'));
$output = '<ul id="breadcrumb">';
$output .= '<li>'.HTML::anchor('/',_('Home')).'</li>';
$data = empty(static::$_data['path']) ? explode('/',preg_replace('/^\//','',Request::detect_uri())) : static::$_data['path'];
$c = count($data);
$i=0;
foreach ($data as $k => $v) {
$output .= static::$_spacer;
$i++;
$p = join('/',array_slice($data,0,$k+1));
$output .= $i==$c ? '<li id="active">' : '<li>';
$output .= HTML::anchor(
(empty(static::$_data['url'][$p]) ? $p : static::$_data['url'][$p]),
(empty(static::$_data['name'][$p]) ? ucfirst($v) : static::$_data['name'][$p])
);
$output .= '</li>';
}
$output .= '</td></tr></table>';
$output .= '</ul>';
return $output;
}
}