Index: /branches/2.2/filemanager/setup/phpgw_pt-br.lang
===================================================================
--- /branches/2.2/filemanager/setup/phpgw_pt-br.lang	(revision 3879)
+++ /branches/2.2/filemanager/setup/phpgw_pt-br.lang	(revision 3885)
@@ -91,4 +91,5 @@
 files	filemanager	pt-br	Arquivos
 File(s)	filemanager	pt-br	Arquivo(s)
+File history	filemanager	pt-br	Histórico do arquivo
 files in this directory	filemanager	pt-br	Arquivos nesse diretório
 folder	filemanager	pt-br	Pasta
Index: /branches/2.2/filemanager/tp/expressowindow/xsl/historyFile.xsl
===================================================================
--- /branches/2.2/filemanager/tp/expressowindow/xsl/historyFile.xsl	(revision 3885)
+++ /branches/2.2/filemanager/tp/expressowindow/xsl/historyFile.xsl	(revision 3885)
@@ -0,0 +1,42 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
+	<xsl:output method="html" omit-xml-declaration="yes"/>
+	
+	<xsl:param name="lang_created" />
+	<xsl:param name="lang_history" />
+	<xsl:param name="lang_operation" />
+	<xsl:param name="lang_version" />
+	<xsl:param name="lang_who" />
+	<xsl:param name="height" />
+	<xsl:param name="path_filemanager" />
+	<xsl:param name="width" />
+	
+	<xsl:template match="file">
+		
+		<div style="font-size:10pt; margin: 6px;">
+			<img src="{$path_filemanager}templates/default/images/button_info.png" style="margin-right: 5px;"/>
+			<label style="font-size:12px;font-weight:bold;"> <xsl:value-of select="$lang_history" /></label>
+		</div>
+		
+		<div style='margin:6px; width:{($width)-20}px ; height:{($height)-40}px; overflow-y: auto; text-align: left;'>
+			<xsl:for-each select="info">
+				<div style="margin-bottom:10px;">
+					<label style="font-weight:bold; margin-right:5px"><xsl:value-of select="$lang_created" />.:</label>
+					<xsl:value-of select="created" />
+					<br/>
+					<label style="font-weight:bold; margin-right:5px"><xsl:value-of select="$lang_version" />.:</label>			
+					<xsl:value-of select="version" />
+					<br/>
+					<label style="font-weight:bold; margin-right:5px"><xsl:value-of select="$lang_who" />.:</label>
+					<xsl:value-of select="who" />
+					<br/>
+					<label style="font-weight:bold; margin-right:5px"><xsl:value-of select="$lang_operation" />.: </label>
+					<xsl:value-of select="operation" />
+				</div>		
+
+			</xsl:for-each>
+		</div>
+
+	</xsl:template>
+	
+</xsl:stylesheet>
Index: /branches/2.2/filemanager/inc/class.uifilemanager.inc.php
===================================================================
--- /branches/2.2/filemanager/inc/class.uifilemanager.inc.php	(revision 3879)
+++ /branches/2.2/filemanager/inc/class.uifilemanager.inc.php	(revision 3885)
@@ -930,48 +930,35 @@
 	}
 
-	function history() {
-		if ($this->file) { // FIXME this-file is never defined
+	function history() 
+	{
+		if ( $this->file)
+		{ 
+			// FIXME this-file is never defined
 			$journal_array = $this->bo->vfs->get_journal(array(
 							'string' => $this->file, //FIXME
 							'relatives' => array(RELATIVE_ALL)
-					  ));
-
-			if (is_array($journal_array)) {
-				$this->html_table_begin();
-				$this->html_table_row_begin();
-				$this->html_table_col_begin();
-				echo lang('Date');
-				$this->html_table_col_end();
-				$this->html_table_col_begin();
-				echo lang('Version');
-				$this->html_table_col_end();
-				$this->html_table_col_begin();
-				echo lang('Who');
-				$this->html_table_col_end();
-				$this->html_table_col_begin();
-				echo lang('Operation');
-				$this->html_table_col_end();
-				$this->html_table_row_end();
-
-				while (list($num, $journal_entry) = each($journal_array)) {
-					$this->html_table_row_begin();
-					$this->html_table_col_begin();
-					$this->bo->html_text($journal_entry['created'] . '&nbsp;&nbsp;&nbsp;');
-					$this->html_table_col_end();
-					$this->html_table_col_begin();
-					$this->bo->html_text($journal_entry['version'] . '&nbsp;&nbsp;&nbsp;');
-					$this->html_table_col_end();
-					$this->html_table_col_begin();
-					$this->bo->html_text($GLOBALS['phpgw']->accounts->id2name($journal_entry['owner_id']) . '&nbsp;&nbsp;&nbsp;');
-					$this->html_table_col_end();
-					$this->html_table_col_begin();
-					$this->bo->html_text($journal_entry['comment']);
-					$this->html_table_col_end();
+		
+			 ));
+
+			if ( is_array($journal_array) ) 
+			{
+				$historyFile = array();
+
+				while ( list($num, $journal_entry) = each($journal_array) ) 
+				{
+					$historyFile[] = array(
+											"created"	=> $journal_entry['created'],
+											"version"	=> $journal_entry['version'],
+											"who"		=> $GLOBALS['phpgw']->accounts->id2name($journal_entry['owner_id']),
+											"operation"	=> 	$journal_entry['comment']
+					);
 				}
-
-				$this->html_table_end();
+				
+			echo serialize( $historyFile );
 				$GLOBALS['phpgw']->common->phpgw_footer();
 				$GLOBALS['phpgw']->common->phpgw_exit();
-			} else {
+			} 
+			else
+			{
 				echo lang('No version history for this file/directory');
 			}
Index: /branches/2.2/filemanager/js/draw_api.js
===================================================================
--- /branches/2.2/filemanager/js/draw_api.js	(revision 3879)
+++ /branches/2.2/filemanager/js/draw_api.js	(revision 3885)
@@ -15,6 +15,54 @@
 }
 
-function loadHistory(filename){
-	cExecute_('./index.php?menuaction=filemanager.uifilemanager.history&file='+base64_encode(filename)+"&path="+base64_encode(currentPath),draw_window);
+function loadHistory(filename)
+{
+	var handlerLoadHistory = function(data)
+	{
+		loadXtools();
+
+		var response =  unserialize(data);
+		var _xml		= Xtools.xml('file');
+		var _historyFile	= _xml.documentElement; 
+
+		for( var i = 0; i < response.length; i++ )
+		{
+			var _info = _historyFile.appendChild(  _xml.createElement("info") );
+			
+			var	_created = _xml.createElement('created'); 
+				_created.appendChild( _xml.createTextNode(response[i]['created']) );
+				_info.appendChild( _created );
+			
+			var	_version = _xml.createElement('version');
+				_version.appendChild( _xml.createTextNode(response[i]['version']) );
+				_info.appendChild(_version);
+			
+			var	_who = _xml.createElement('who');
+				_who.appendChild( _xml.createTextNode(response[i]['who']) );
+				_info.appendChild( _who );
+			
+			var _operation	= _xml.createElement('operation');
+				_operation.appendChild( _xml.createTextNode( response[i]['operation']) );
+				_info.appendChild( _operation );
+		}
+
+		var pArgs = 
+		{
+			'lang_created'	: get_lang("Created"),
+			'lang_operation'	: get_lang("Operation"),
+			'lang_version'	: get_lang("Version"),
+			'lang_who'		: get_lang("Who"),
+			'lang_history'	: get_lang("File history"),
+			'height'				: 300,
+			'path_filemanager'	: path_filemanager,
+			'width'				: 450			
+		};
+		
+		var code = Xtools.parse( _historyFile, "historyFile.xsl", pArgs );
+		
+		draw_window( code , 450, 300 );
+	};
+	
+	cExecute_('./index.php?menuaction=filemanager.uifilemanager.history&file='
+				+ base64_encode(filename)+"&path="+base64_encode(currentPath), handlerLoadHistory );
 }
 
