2010-08-26 Raul Mateos <raulofpandora@gmail.com>

* godmode/reporting/reporting_builder.list_items.php: Added code to
	show text if no items found, instead the table header.

git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@3182 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
This commit is contained in:
raulmateos 2010-08-26 14:26:14 +00:00
parent 77a86c6f42
commit bebe19af13
2 changed files with 42 additions and 34 deletions

View File

@ -1,3 +1,8 @@
2010-08-26 Raúl Mateos <raulofpandora@gmail.com>
* godmode/reporting/reporting_builder.list_items.php: Added code to
show text if no items found, instead the table header.
2010-08-25 Sergio Martin <sergio.martin@artica.es> 2010-08-25 Sergio Martin <sergio.martin@artica.es>
* pandoradb.sql * pandoradb.sql

View File

@ -122,12 +122,9 @@ if($moduleFilter != 0) {
$items = get_db_all_rows_sql('SELECT * FROM treport_content WHERE ' . $where . ' AND id_report = ' . $idReport . ' ORDER BY `order` LIMIT ' . $offset . ', ' . $config["block_size"]); $items = get_db_all_rows_sql('SELECT * FROM treport_content WHERE ' . $where . ' AND id_report = ' . $idReport . ' ORDER BY `order` LIMIT ' . $offset . ', ' . $config["block_size"]);
$countItems = get_db_sql('SELECT COUNT(id_rc) FROM treport_content WHERE ' . $where . ' AND id_report = ' . $idReport); $countItems = get_db_sql('SELECT COUNT(id_rc) FROM treport_content WHERE ' . $where . ' AND id_report = ' . $idReport);
if ($items === false) {
$items = array();
}
$table = null; $table = null;
if ($items){
$table->width = '100%'; $table->width = '100%';
$table->head[0] = '<span title="' . __('Sort') . '">' . __('S.') . '</span>'; $table->head[0] = '<span title="' . __('Sort') . '">' . __('S.') . '</span>';
$table->head[1] = __('Type'); $table->head[1] = __('Type');
@ -150,7 +147,9 @@ $table->head[5] = __('Description');
$table->head[6] = '<span title="' . __('Options') . '">' . __('O.') . '</span>'; $table->head[6] = '<span title="' . __('Options') . '">' . __('O.') . '</span>';
$table->align[6] = 'center'; $table->align[6] = 'center';
} else {
echo '<br><br><div class="nf">'. __('No items') . '</div>';
}
$lastPage = true; $lastPage = true;
if (((($offset == 0) && ($config["block_size"] > $countItems)) || if (((($offset == 0) && ($config["block_size"] > $countItems)) ||
($countItems >= ($config["block_size"] + $offset))) && ($countItems >= ($config["block_size"] + $offset))) &&
@ -161,6 +160,10 @@ if (((($offset == 0) && ($config["block_size"] > $countItems)) ||
$count = 0; $count = 0;
$rowPair = true; $rowPair = true;
if ($items === false) {
$items = array();
}
foreach ($items as $item) { foreach ($items as $item) {
if ($rowPair) if ($rowPair)
$table->rowclass[$count] = 'rowPair'; $table->rowclass[$count] = 'rowPair';