Exemple #1
0
	static function anchorGlobal($context)
	{
		if (is_object($context))
		{
			$title= cms::admin();
			$context= $context->context;
		}
		$context[]= array('label'=>'Logout', 'icon'=>'lock', 'url'=>cms::loginUrl('logout'));

		$html= '';
		$html.= '<dfn class="cms-anchor" id="cms-anchor-global"';
		if ($title) $html.= ' title="'.$title.'"';
		$html.= '>';
		$html.= '<code>'.json_encode($context).'</code>';
		$html.= '</dfn>';
		return $html;
	}
Exemple #2
0
<html>
	<head>
		<meta http-equiv="content-type" content="text/html; charset=utf-8">
		<?php 
echo core::prepend('head');
?>
	</head>
	<body>
		<?
			$c= cms::context();
			$c-> label('Test if  data files writable') -> icon('offline_pin') -> popup(core::url('test-files'));
			$c-> label('To ConKit project page') -> icon('cloud') -> url("https://github.com/stanpro/conkit");
			echo cms::anchorGlobal($c);
		?>
		<fieldset>
			<legend>Header (see head.tpl.php)</legend>
			<div>
				<img src="logo.png" style="width:100px; vertical-align:middle; margin-right:2em; margin-left:3em;">
				<a href="<?php 
echo cms::loginUrl();
?>
">Login</a>
			</div>
		</fieldset>
		
		<fieldset style="padding:3em;">
			<legend>Body template (see <?php 
echo core::moduleName();
?>
.tpl.php)</legend>