function rules_scheduler_schedule_page

Schedule page with a view for the scheduled tasks.

1 string reference to 'rules_scheduler_schedule_page'
rules_scheduler_menu in rules_scheduler/rules_scheduler.module
Implements hook_menu().

File

rules_scheduler/rules_scheduler.admin.inc, line 11

Code

function rules_scheduler_schedule_page() {
    // Display view for all scheduled tasks.
    if (module_exists('views')) {
        // We cannot use views_embed_view() here as we need to set the path for the
        // component filter form.
        $view = views_get_view('rules_scheduler');
        $view->override_path = RULES_SCHEDULER_PATH;
        $task_list = $view->preview();
    }
    else {
        $task_list = t('To display scheduled tasks you have to install the <a href="https://www.drupal.org/project/views">Views</a> module.');
    }
    $page['task_view'] = array(
        '#markup' => $task_list,
    );
    $form = drupal_get_form('rules_scheduler_form');
    $page['delete'] = array(
        '#markup' => drupal_render($form),
    );
    return $page;
}