From dfe9409200939fdd75f0aded88abe871681c2c93 Mon Sep 17 00:00:00 2001
From: vgilc <noreply@pandorafms.org>
Date: Thu, 26 Apr 2012 08:17:37 +0000
Subject: [PATCH] 2012-04-26  Vanessa Gil  <vanessa.gil@artica.es>

	* godmode/reporting/reporting_builder.list_items.php: Added sort column.


git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@6178 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
---
 pandora_console/ChangeLog                         |  4 ++++
 .../reporting/reporting_builder.list_items.php    | 15 ++++++++++-----
 2 files changed, 14 insertions(+), 5 deletions(-)

diff --git a/pandora_console/ChangeLog b/pandora_console/ChangeLog
index 34d900d1bb..0f6180f3f7 100644
--- a/pandora_console/ChangeLog
+++ b/pandora_console/ChangeLog
@@ -1,3 +1,7 @@
+2012-04-26  Vanessa Gil  <vanessa.gil@artica.es>
+	
+	* godmode/reporting/reporting_builder.list_items.php: Added sort column.
+
 2012-04-26  Junichi Satoh  <junichi@rworks.jp>
 
 	* general/pandora_help.php: Added meta tag to avoid mistake of
diff --git a/pandora_console/godmode/reporting/reporting_builder.list_items.php b/pandora_console/godmode/reporting/reporting_builder.list_items.php
index 289ebd555e..1f24065601 100644
--- a/pandora_console/godmode/reporting/reporting_builder.list_items.php
+++ b/pandora_console/godmode/reporting/reporting_builder.list_items.php
@@ -205,7 +205,8 @@ if ($items) {
 	$table->size[0] = '5px';
 	$table->size[1] = '15%';
 	$table->size[4] = '8%';
-	$table->size[6] = '65px';
+	$table->size[6] = '50px';
+	$table->size[7] = '30px';
 	
 	$table->head[0] = '<span title="' . __('Position') . '">' . __('P.') . '</span>';
 	$table->head[1] = __('Type');
@@ -226,8 +227,10 @@ if ($items) {
 	$table->head[4] = __('Period');
 	$table->head[5] = __('Description');
 	$table->head[6] = '<span title="' . __('Options') . '">' . __('Op.') . '</span>';
+	$table->head[7] = __('Sort');
 
 	$table->align[6] = 'center';
+	$table->align[7] = 'center';
 } else {
 	echo '<br><br><div class="nf">'. __('No items') . '</div>';
 }
@@ -314,14 +317,16 @@ foreach ($items as $item) {
 	}
 	
 	$row[6] = '';
-	//You can sort the items if the filter is not enable.
-	if (!$filterEnable) {
-		$row[6] .= html_print_checkbox_extended('sorted_items[]', $item['id_rc'], false, false, '', 'class="selected_check"', true);
-	}
+	
 	$row[6] .= '<a href="index.php?sec=reporting&sec2=godmode/reporting/reporting_builder&tab=item_editor&action=edit&id_report=' . $idReport . '&id_item=' . $item['id_rc'] . '">' . html_print_image("images/wrench_orange.png", true, array("title" => __('Edit'))) . '</a>';
 	$row[6] .= '&nbsp;&nbsp;';
 	$row[6] .= '<a  onClick="if (!confirm (\'Are you sure?\')) return false" href="index.php?sec=reporting&sec2=godmode/reporting/reporting_builder&tab=list_items&action=delete&id_report=' . $idReport . '&id_item=' . $item['id_rc'] . $urlFilter . '">' . html_print_image("images/cross.png", true, array("title" => __('Delete'))) .'</a>';
 	
+	$row[7] = '';
+	//You can sort the items if the filter is not enable.
+	if (!$filterEnable) {
+		$row[7] .= html_print_checkbox_extended('sorted_items[]', $item['id_rc'], false, false, '', 'class="selected_check"', true);
+	}
 	$table->data[] = $row;
 	$count++;
 	//Restore db connection