<?php 
/**
 * This file is (c) Copyright 2010 by Sabri LABBENE, Institut
 * TELECOM
 *
 * This program is free software; you can redistribute it and/or
 * modify it under the terms of the GNU General Public License
 * as published by the Free Software Foundation; either version 2
 * of the License, or (at your option) any later version.
 * 
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 * 
 * You should have received a copy of the GNU General Public License
 * along with this program; if not, write to the Free Software
 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
 *
 * This program has been developed in the frame of the HELIOS
 * project with financial support of its funders.
 *
 */
$user_real_name = $this->user->getRealName();
$user_name = $this->user->getUnixName();
$user_id = $this->user->getID();
$user_uri = $this->serverUrl().'/users/'.$user_name;
$user_title = $this->user->getTitle();
$title = ($user_title ? $user_title .' ' :''). $user_real_name;

// invoke user_logo hook
$logo_params = array('user_id' => $user_id, 'size' => 'm', 'content' => '');
plugin_hook_by_reference('user_logo', $logo_params);
        
if ($logo_params['content']) {
	$logo = $logo_params['content'];
}
else {
	$logo = '';
}
?>
<html>
<head>
<title>User: <?php echo $user_real_name;?> (Identifier: <?php echo $user_id;?>)</title>
</head>
<body>
<table>
<tr>
<td>
<?php echo $logo;?>
</td>
<td>
<table>
<tr>
	<td colspan="2"><i>Compact User Preview</i></td>
</tr>
<tr>
<!-- TODO : use  user_logo hook here -->
	<td rowspan="5"><img src="/plugins/oslc/images/userTooltip/oslc.png" /> </td>
	<td><b>User Name:</b> <?php echo $title;?></td>
</tr>
<tr>
	<td><b>Login Name:</b> <?php echo $user_name;?></td>
</tr>
<tr>
	<td><b>Identifier:</b>  <?php echo $user_id;?></td>
</tr>
<tr>
	<td><b>Member since:</b> <?php print date(_('Y-m-d H:i'), $this->user->getAddDate()); ?></td>
</tr>
<tr>
	<td><small><b>URI:</b> <a href="<?php echo $user_uri;?>"><?php echo $user_uri;?></a></small></td>
</tr>
</table>
</td>
</tr>
</table>
<!-- 
<b>User Name:</b> <?php echo $title;?><br/>
<b>Login Name:</b> <?php echo $user_name;?> <br/>
<b>Identifier:</b>  <?php echo $user_id;?> <br/>
<b>Member since:</b> <?php print date(_('Y-m-d H:i'), $this->user->getAddDate()); ?><br/>
<small><b>URI:</b> <?php echo $user_uri;?></small><br/>
</table>
-->
</body>
</html>
