Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Show review status in the dashboard module

  • Loading branch information...
commit 621631d38de2868779ddf53b21ffb3b5e203c5e5 1 parent 0a8b415
@markkevans markkevans authored haraldpdl committed
View
1  catalog/admin/includes/languages/english/modules/dashboard/d_reviews.php
@@ -15,4 +15,5 @@
define('MODULE_ADMIN_DASHBOARD_REVIEWS_REVIEWER', 'Reviewer');
define('MODULE_ADMIN_DASHBOARD_REVIEWS_DATE', 'Date');
define('MODULE_ADMIN_DASHBOARD_REVIEWS_RATING', 'Rating');
+define('MODULE_ADMIN_DASHBOARD_REVIEWS_REVIEW_STATUS', 'Status');
?>
View
5 catalog/admin/includes/modules/dashboard/d_reviews.php
@@ -36,15 +36,18 @@ function getOutput() {
' <td class="dataTableHeadingContent">' . MODULE_ADMIN_DASHBOARD_REVIEWS_DATE . '</td>' .
' <td class="dataTableHeadingContent">' . MODULE_ADMIN_DASHBOARD_REVIEWS_REVIEWER . '</td>' .
' <td class="dataTableHeadingContent">' . MODULE_ADMIN_DASHBOARD_REVIEWS_RATING . '</td>' .
+ ' <td class="dataTableHeadingContent">' . MODULE_ADMIN_DASHBOARD_REVIEWS_REVIEW_STATUS . '</td>' .
' </tr>';
- $reviews_query = tep_db_query("select r.reviews_id, r.date_added, pd.products_name, r.customers_name, r.reviews_rating from " . TABLE_REVIEWS . " r, " . TABLE_PRODUCTS_DESCRIPTION . " pd where pd.products_id = r.products_id and pd.language_id = '" . (int)$languages_id . "' order by r.date_added desc limit 6");
+ $reviews_query = tep_db_query("select r.reviews_id, r.date_added, pd.products_name, r.customers_name, r.reviews_rating, r.reviews_status from " . TABLE_REVIEWS . " r, " . TABLE_PRODUCTS_DESCRIPTION . " pd where pd.products_id = r.products_id and pd.language_id = '" . (int)$languages_id . "' order by r.date_added desc limit 6");
while ($reviews = tep_db_fetch_array($reviews_query)) {
+ $status_icon = ($reviews['reviews_status'] == '1') ? tep_image(DIR_WS_IMAGES . 'icon_status_green.gif', IMAGE_ICON_STATUS_GREEN, 10, 10) : tep_image(DIR_WS_IMAGES . 'icon_status_red.gif', IMAGE_ICON_STATUS_RED, 10, 10);
$output .= ' <tr class="dataTableRow" onmouseover="rowOverEffect(this);" onmouseout="rowOutEffect(this);">' .
' <td class="dataTableContent"><a href="' . tep_href_link(FILENAME_REVIEWS, 'rID=' . (int)$reviews['reviews_id'] . '&action=edit') . '">' . $reviews['products_name'] . '</td>' .
' <td class="dataTableContent">' . tep_date_short($reviews['date_added']) . '</td>' .
' <td class="dataTableContent">' . tep_output_string_protected($reviews['customers_name']) . '</td>' .
' <td class="dataTableContent">' . tep_image(HTTP_CATALOG_SERVER . DIR_WS_CATALOG_IMAGES . 'stars_' . $reviews['reviews_rating'] . '.gif') . '</td>' .
+ ' <td class="dataTableContent">' . $status_icon . '</td>' .
' </tr>';
}
Please sign in to comment.
Something went wrong with that request. Please try again.