diff options
author | Angie Byron <webchick@24967.no-reply.drupal.org> | 2009-06-28 16:05:58 +0000 |
---|---|---|
committer | Angie Byron <webchick@24967.no-reply.drupal.org> | 2009-06-28 16:05:58 +0000 |
commit | 3bcc48225adf7d92c69accb069bf2604bae7da1b (patch) | |
tree | 9b8927350a787f4d2115fec87fa2fcd68a22be8c /modules/aggregator | |
parent | 08b1bb73f770888b39ac862495622629af65de97 (diff) | |
download | brdo-3bcc48225adf7d92c69accb069bf2604bae7da1b.tar.gz brdo-3bcc48225adf7d92c69accb069bf2604bae7da1b.tar.bz2 |
#504428 by Sutharsan: Include link to add item on all empty admin listing pages.
Diffstat (limited to 'modules/aggregator')
-rw-r--r-- | modules/aggregator/aggregator.admin.inc | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/modules/aggregator/aggregator.admin.inc b/modules/aggregator/aggregator.admin.inc index 9ffee9938..df2648c62 100644 --- a/modules/aggregator/aggregator.admin.inc +++ b/modules/aggregator/aggregator.admin.inc @@ -29,6 +29,9 @@ function aggregator_view() { foreach ($result as $feed) { $rows[] = array(l($feed->title, "aggregator/sources/$feed->fid"), format_plural($feed->items, '1 item', '@count items'), ($feed->checked ? t('@time ago', array('@time' => format_interval(REQUEST_TIME - $feed->checked))) : t('never')), ($feed->checked && $feed->refresh ? t('%time left', array('%time' => format_interval($feed->checked + $feed->refresh - REQUEST_TIME))) : t('never')), l(t('edit'), "admin/content/aggregator/edit/feed/$feed->fid"), l(t('remove items'), "admin/content/aggregator/remove/$feed->fid"), l(t('update items'), "admin/content/aggregator/update/$feed->fid")); } + if (empty($rows)) { + $rows[] = array(array('data' => t('No feeds available. <a href="@link">Add feed</a> now.', array('@link' => url('admin/content/aggregator/add/feed'))), 'colspan' => '5', 'class' => 'message')); + } $output .= theme('table', $header, $rows); $result = db_query('SELECT c.cid, c.title, COUNT(ci.iid) as items FROM {aggregator_category} c LEFT JOIN {aggregator_category_item} ci ON c.cid = ci.cid GROUP BY c.cid, c.title ORDER BY title'); @@ -40,6 +43,9 @@ function aggregator_view() { foreach ($result as $category) { $rows[] = array(l($category->title, "aggregator/categories/$category->cid"), format_plural($category->items, '1 item', '@count items'), l(t('edit'), "admin/content/aggregator/edit/category/$category->cid")); } + if (empty($rows)) { + $rows[] = array(array('data' => t('No categories available. <a href="@link">Add category</a> now.', array('@link' => url('admin/content/aggregator/add/category'))), 'colspan' => '5', 'class' => 'message')); + } $output .= theme('table', $header, $rows); return $output; |