Index: branches/2.2/workflow/js/userinterface/orgchartPrint.js
===================================================================
--- branches/2.2/workflow/js/userinterface/orgchartPrint.js	(revision 3167)
+++ branches/2.2/workflow/js/userinterface/orgchartPrint.js	(revision 6477)
@@ -9,4 +9,5 @@
 		$('tr.employees').hide();
 }
+
 
 /**
@@ -55,9 +56,23 @@
 }
 
+
+/**
+* Show / Hide all photo employees
+*/
+function togglePhotoVisibility()
+{
+	$('#employee_table').remove();
+
+	if ($('#groupByArea').attr('checked'))
+		showGroupedByArea();
+	else
+		showUngrouped();
+}
+
 /**
 * Centralize the creation of table rows for employees.
 * 'showAreaColumn' specifies whether the second column will be shown
 */
-function createEmployeeRow(area_id, user_id, showAreaColumn)
+function createEmployeeRow(area_id, user_id, showAreaColumn, showUserPhoto)
 {
 	/* set a special 'class' if the employee is a supervisor one */
@@ -67,15 +82,23 @@
 
 	/* creating the row. */
-	element = $('<tr></tr>')
-				/* name: first column */
-				.append(
-						$('<td></td>')
-							.append(
-								$('<span></span>')
-									.addClass(class_name)
-									.append(areas[area_id].employees[user_id].cn)
-							)
-							.css('width', '70%')
-						);
+	element = $('<tr></tr>');
+
+
+	/* photo: zero (optional) column */
+	if (showUserPhoto){
+		var content = '<img src="workflow/showUserPicture.php?userID=' + areas[area_id].employees[user_id].funcionario_id + '"/>';
+		element.append($('<td>' + content + '</td>').css('width', '8%'));
+	}
+
+	/* name: first column */
+	element.append(
+				$('<td></td>')
+					.append(
+						$('<span></span>')
+							.addClass(class_name)
+							.append(areas[area_id].employees[user_id].cn)
+						)
+							.css('width', '30%')
+			);
 
 	/* area: second (optional) column */
@@ -83,12 +106,32 @@
 		element.append(
 						$('<td>' + areas[area_id].sigla + '</td>')
-							.css('width', '15%')
+							.css('width', '10%')
 					);
 
+	/* login: show uid attribute */
+	element.append(
+					$('<td>' + areas[area_id].employees[user_id].uid + '</td>')
+						.css('width', '15%')
+					)
+					
+	
 	/* telephone: last column */
 	element.append(
 					$('<td>' + areas[area_id].employees[user_id].telephoneNumber + '</td>')
-						.css('width', '20%')
-					)
+						.css('width', '15%')
+					)
+					
+	/* VÃ­nculo: show cargo vÃ­nculo */
+	element.append(
+					$('<td>' + areas[area_id].employees[user_id].vinculo + '</td>')
+						.css('width', '15%')
+					)
+
+	/* Cargo: show cargo attribute */
+	element.append(
+					$('<td>' + areas[area_id].employees[user_id].cargo + '</td>')
+						.css('width', '15%')
+					)
+
 				.addClass('employees');
 
@@ -102,5 +145,10 @@
 {
 	var table = $('<table></table>').css('width', '90%').attr('id', 'employee_table');
-	var i, j;
+	var i, j, photo;
+
+	if ($('#photoVisibility').attr('checked'))
+	   photo = true;
+	else
+	   photo = false;
 
 	/* iterating over areas */
@@ -111,5 +159,6 @@
 				$('<tr></tr>')
 				.append(
-					$('<th></th>')
+					$('<td colspan="2"></td>')
+						.css('font-weight', 'bold')
 						.css('text-align', 'left')
 						.css('height', '30')
@@ -125,5 +174,5 @@
 		/* creating employee rows */
 		for (j=0; j < areas[i].employees.length; j++)
-			table.append(createEmployeeRow(i, j));
+			table.append(createEmployeeRow(i, j, false, photo));
 	}
 	$('#areas_content').append(table);
@@ -139,5 +188,10 @@
 {
 	var table = $('<table></table>').css('width', '90%').attr('id', 'employee_table');
-	var i, less, end;
+	var i, less, end, photo;
+
+	if ($('#photoVisibility').attr('checked'))
+	   photo = true;
+	else
+	   photo = false;
 
 	/* creating and reseting indexes */
@@ -172,5 +226,5 @@
 
 		/* inserting the row */
-		table.append(createEmployeeRow(less, areas[less].index, true));
+		table.append(createEmployeeRow(less, areas[less].index, true, photo));
 		areas[less].index++;
 	}
@@ -192,4 +246,5 @@
 {
 	$('#employeesVisibility').click(toggleEmployeesVisibility);
+	$('#photoVisibility').click(togglePhotoVisibility);
 	$('#groupByArea').click(toggleGroupByArea);
 	$('#highlightSupervisor').click(toggleHighlightSupervisor);
@@ -201,4 +256,5 @@
 {
 	toggleGroupByArea();
+	togglePhotoVisibility();
 	toggleEmployeesVisibility();
 	toggleHighlightSupervisor();
