function theme_notifications_admin_subscription_list in Notifications 7
Display big list of subscriptions
1 theme call to theme_notifications_admin_subscription_list()
- notifications_scheduler_admin_send_form in notifications_scheduler/
notifications_scheduler.admin.inc - Preview form to send notifications
File
- ./
notifications.admin.inc, line 372
Code
function theme_notifications_admin_subscription_list($variables) {
$sids = $variables['sids'];
$limit = $variables['limit'];
// Display fully only the first ones up to limit
if (!$sids) {
return t('No subscriptions');
}
else {
$display = array_slice($sids, 0, $limit);
$send_methods = _notifications_send_methods();
foreach ($display as $sid) {
$subscription = notifications_subscription_load($sid);
$rows[] = array(
l($sid, 'notifications/subscription/' . $sid),
$subscription
->get_name(),
$send_methods[$subscription->send_method],
theme('username', array(
'account' => $subscription
->get_user(),
)),
);
}
if (count($sids) > count($display)) {
$rows[] = array(
array(
'data' => t('And @count other subscriptions...', array(
'@count' => count($sids) - count($display),
)),
'colspan' => 4,
),
);
}
return theme('table', array(
'rows' => $rows,
));
}
}