tabs() 공개 정적인 메소드

public static tabs ( )
예제 #1
0
파일: time.php 프로젝트: horde/horde
        $item = $vars->get('item');
        if (is_null($item) || !count($item)) {
            $notification->push(_("No timeslices were selected to submit."), 'horde.error');
        } else {
            foreach (array_keys($item) as $id) {
                $time[] = array('id' => $id);
            }
            try {
                $GLOBALS['injector']->getInstance('Hermes_Driver')->markAs('submitted', $time);
                $notification->push(_("Your time was successfully submitted."), 'horde.success');
                $vars = new Horde_Variables();
            } catch (Horde_Exception $e) {
                $notification->push(sprintf(_("There was an error submitting your time: %s"), $e->getMessage()), 'horde.error');
            }
        }
        break;
}
// We are displaying all time.
$tabs = Hermes::tabs();
$criteria = array('employee' => $GLOBALS['registry']->getAuth(), 'submitted' => false, 'link_page' => 'time.php');
$table = new Hermes_Table('week', $vars, array('title' => _("My Unsubmitted Time"), 'name' => 'hermes/hours', 'params' => $criteria));
$template = new Horde_Template();
$template->setOption('gettext', true);
$template->set('postUrl', Horde::url('time.php', false, -1));
$template->set('sessionId', Horde_Util::formInput());
$template->set('table', $table->render());
$page_output->header(array('title' => _("My Time")));
$notification->notify(array('listeners' => 'status'));
echo $tabs;
echo $template->fetch(HERMES_TEMPLATES . '/time/form.html');
$page_output->footer();
예제 #2
0
파일: search.php 프로젝트: raz0rsdge/horde
            $registry->callAppMethod('hermes', 'download', array('args' => array($vars)));
        } catch (Horde_Exception $e) {
            $notification->push($e->getMessage(), 'horde.error');
        }
}
$title = _("Search for Time");
if (!($searchVars = $session->get('hermes', 'search_criteria'))) {
    $searchVars = $vars;
}
$form = new Hermes_Form_Search($searchVars);
$page_output->header(array('title' => $title));
$notification->notify(array('listeners' => 'status'));
$form->renderActive(new Horde_Form_Renderer(), $searchVars, Horde::url('search.php'), 'post');
echo '<br />';
if ($session->exists('hermes', 'search_criteria')) {
    echo Hermes::tabs();
    if (is_null($criteria)) {
        $criteria = $form->getSearchCriteria($searchVars);
    }
    $table = new Hermes_Table('results', $vars, array('title' => _("Search Results"), 'name' => 'hermes/hours', 'params' => $criteria));
    $template = new Horde_Template();
    $template->setOption('gettext', true);
    $template->set('postUrl', Horde::url('time.php', false, -1));
    $template->set('sessionId', Horde_Util::formInput());
    $template->set('table', $table->render());
    echo $template->fetch(HERMES_TEMPLATES . '/time/form.html');
}
echo '<br />';
$exportForm = new Hermes_Form_Export($vars);
$exportForm->renderActive(new Horde_Form_Renderer(), $vars, Horde::url('search.php'), 'post');
$page_output->footer();