From 8268ec9719b6cd4265dc7346e74ac7c50c3086c5 Mon Sep 17 00:00:00 2001 From: Andre Lorbach Date: Thu, 7 Jan 2010 16:59:00 +0100 Subject: [PATCH] Finished Online ReportList in Reportadmin --- src/admin/reports.php | 38 ++++++++++++++++++++++++++ src/include/functions_common.php | 1 + src/lang/en/admin.php | 6 ++-- src/templates/admin/admin_reports.html | 34 +++++++++++++---------- 4 files changed, 62 insertions(+), 17 deletions(-) diff --git a/src/admin/reports.php b/src/admin/reports.php index f2935f7..890d4af 100644 --- a/src/admin/reports.php +++ b/src/admin/reports.php @@ -495,6 +495,44 @@ if ( isset($_GET['op']) ) $j = 0; // Help counter! foreach ($content['ONLINEREPORTS'] as &$myOnlineReport ) { + // Split reportID + preg_match("/report\.(.*?)\.(.*?)\.class$/", $myOnlineReport['reportid'], $out ); + $myOnlineReport['reportcat'] = $out[1]; + $myOnlineReport['reportid'] = $out[2]; + + // Set Installed Flag! + $myOnlineReport['installed'] = false; + foreach($content['REPORTS'] as $myReport) + { + // check if already installed! + if ( $myOnlineReport['reportid'] == $myReport['ID'] ) + $myOnlineReport['installed'] = true; + } + + // --- Set Icon! + if ( $myOnlineReport['installed'] ) + { + $myOnlineReport['installed_icon'] = $content['MENU_CHECKED']; + $myOnlineReport['installed_text'] = $content['LN_REPORTS_INSTALLED']; + } + else + { + $myOnlineReport['installed_icon'] = $content['MENU_DELETE']; + $myOnlineReport['installed_text'] = $content['LN_REPORTS_NOTINSTALLED']; + } + // --- + + // --- Set Helper links + if ( $myOnlineReport['reporthelparticle'] == "-" ) + { + } + else + { + + } + + // --- + // --- Set CSS Class if ( $j % 2 == 0 ) $myOnlineReport['cssclass'] = "line1"; diff --git a/src/include/functions_common.php b/src/include/functions_common.php index 4c1750f..41219d0 100644 --- a/src/include/functions_common.php +++ b/src/include/functions_common.php @@ -694,6 +694,7 @@ function InitFrontEndVariables() $content['MENU_NETDOWNLOAD'] = $content['BASEPATH'] . "images/icons/download.png"; $content['MENU_DOCUMENTLIST'] = $content['BASEPATH'] . "images/icons/documents.png"; $content['MENU_WINDOWLIST'] = $content['BASEPATH'] . "images/icons/windows.png"; + $content['MENU_CHECKED'] = $content['BASEPATH'] . "images/icons/check.png"; $content['MENU_PAGER_BEGIN'] = $content['BASEPATH'] . "images/icons/media_beginning.png"; $content['MENU_PAGER_PREVIOUS'] = $content['BASEPATH'] . "images/icons/media_rewind.png"; diff --git a/src/lang/en/admin.php b/src/lang/en/admin.php index fa267ff..366611f 100644 --- a/src/lang/en/admin.php +++ b/src/lang/en/admin.php @@ -440,11 +440,13 @@ $content['LN_REPORTS_CRONCMD'] = "Local Report command"; $content['LN_REPORTMENU_LIST'] = "List installed Reports"; $content['LN_REPORTMENU_ONLINELIST'] = "All Available Reports"; $content['LN_REPORTS_LINKS'] = "Related Links"; +$content['LN_REPORTS_INSTALLED'] = "Installed"; +$content['LN_REPORTS_NOTINSTALLED'] = "Not installed"; +$content['LN_REPORTS_DOWNLOAD'] = "Download Link"; +$content['LN_REPORTS_SAMPLELINK'] = "Report Sample"; $content['LN_REPORTS_'] = ""; $content['LN_REPORTS_'] = ""; $content['LN_REPORTS_'] = ""; $content['LN_REPORTS_'] = ""; - - ?> \ No newline at end of file diff --git a/src/templates/admin/admin_reports.html b/src/templates/admin/admin_reports.html index a96a425..13529ed 100644 --- a/src/templates/admin/admin_reports.html +++ b/src/templates/admin/admin_reports.html @@ -89,6 +89,7 @@ + @@ -96,24 +97,27 @@ + - +
{LN_REPORTS_INSTALLED} {LN_REPORTS_ID} {LN_REPORTS_NAME} {LN_REPORTS_DESCRIPTION}
{reportid}{reportname} + + {reportname} + + + {reportname} + + {reportdescription} -   - - -    - - - - -   - - -   - - + +    + + +    + + +    +