当前位置: 首页>>代码示例>>PHP>>正文


PHP Whups::getTicketTabs方法代码示例

本文整理汇总了PHP中Whups::getTicketTabs方法的典型用法代码示例。如果您正苦于以下问题:PHP Whups::getTicketTabs方法的具体用法?PHP Whups::getTicketTabs怎么用?PHP Whups::getTicketTabs使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Whups的用法示例。


在下文中一共展示了Whups::getTicketTabs方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: array

        // Update attributes.
        $whups_driver->setAttributes($info, $ticket);
        // Add attachment if one was uploaded.
        if (!empty($info['newattachment']['name'])) {
            $ticket->change('attachment', array('name' => $info['newattachment']['name'], 'tmp_name' => $info['newattachment']['tmp_name']));
        }
        // If there was a new comment and permissions were specified
        // on it, set them.
        if (!empty($info['group'])) {
            $ticket->change('comment-perms', $info['group']);
        }
        try {
            $ticket->commit();
            $notification->push(_("Ticket Updated"), 'horde.success');
            $ticket->show();
        } catch (Whups_Exception $e) {
            $notification->push($e, 'horde.error');
        }
    }
}
$page_output->header(array('title' => $title));
$notification->notify(array('listeners' => 'status'));
require WHUPS_TEMPLATES . '/prevnext.inc';
$tabs = Whups::getTicketTabs($vars, $id);
echo $tabs->render('update');
$editform->renderActive($editform->getRenderer(), $vars, Horde::url('ticket/update.php'), 'post');
echo '<br class="spacer" />';
$form = new Whups_Form_TicketDetails($vars, $ticket, $title);
$ticket->setDetails($vars);
$form->renderInactive($form->getRenderer(), $vars);
$page_output->footer();
开发者ID:jubinpatel,项目名称:horde,代码行数:31,代码来源:update.php

示例2: catch

 * did not receive this file, see http://www.horde.org/licenses/bsdl.php.
 *
 * @author Jan Schneider <jan@horde.org>
 */
require_once __DIR__ . '/../lib/Application.php';
Horde_Registry::appInit('whups');
$vars = Horde_Variables::getDefaultVariables();
$ticket = Whups::getCurrentTicket();
$view = $injector->createInstance('Horde_View');
try {
    $files = $ticket->listAllAttachments();
} catch (Whups_Exception $e) {
    $notification->push($e);
}
if ($files) {
    $format = array($prefs->getValue('date_format'), $prefs->getValue('time_format'));
    $attachments = Whups::getAttachments($ticket->getId());
    $view->attachments = array();
    foreach ($files as $file) {
        $view->attachments[] = array_merge(array('timestamp' => $file['timestamp'], 'date' => strftime($format[0], $file['timestamp']) . ' ' . strftime($format[1], $file['timestamp']), 'user' => Whups::formatUser(Whups::getUserAttributes($file['user_id']), true, true, true)), Whups::attachmentUrl($ticket->getId(), $attachments[$file['value']], $ticket->get('queue')));
    }
}
Whups::addTopbarSearch();
Whups::addFeedLink();
$page_output->addLinkTag($ticket->feedLink());
$page_output->addScriptFile('tables.js', 'horde');
$page_output->header(array('title' => sprintf(_("Attachments for %s"), '[#' . $id . '] ' . $ticket->get('summary'))));
$notification->notify(array('listeners' => 'status'));
echo Whups::getTicketTabs($vars, $ticket->getId())->render('attachments');
echo $view->render('ticket/attachments');
$page_output->footer();
开发者ID:jubinpatel,项目名称:horde,代码行数:31,代码来源:attachments.php

示例3: Whups_Form_TicketDetails

    }
}
$form = new Whups_Form_TicketDetails($vars, $ticket, '[#' . $id . '] ' . $ticket->get('summary'));
$ticket->setDetails($vars);
$listeners = array_keys($whups_driver->getListeners($id, false, false, false));
array_walk($listeners, function (&$listener) {
    $listener = preg_replace('/^\\*\\*/', '', $listener);
});
$owners = $whups_driver->getOwners($id);
if ($owners) {
    $owners = reset($owners);
} else {
    $owners = array();
}
$delurl = Horde::url('ticket/watch.php')->add('id', $id);
$delimg = Horde::img('delete.png');
$r = new Horde_Form_Renderer();
// Output content.
$page_output->header(array('title' => sprintf(_("Watchers for %s"), '[#' . $id . '] ' . $ticket->get('summary'))));
$notification->notify(array('listeners' => 'status'));
require WHUPS_TEMPLATES . '/prevnext.inc';
echo Whups::getTicketTabs($vars, $id)->render('watch');
require WHUPS_TEMPLATES . '/ticket/watchers.inc';
$addform->renderActive($r, $vars, Horde::url('ticket/watch.php'), 'post');
echo '<br class="spacer" />';
if (!$registry->getAuth()) {
    $delform->renderActive($r, $vars, Horde::url('ticket/watch.php'), 'post');
    echo '<br class="spacer" />';
}
$form->renderInactive($form->getRenderer(), $vars);
$page_output->footer();
开发者ID:horde,项目名称:horde,代码行数:31,代码来源:watch.php

示例4: array

require_once __DIR__ . '/../lib/Application.php';
Horde_Registry::appInit('whups');
$vars = Horde_Variables::getDefaultVariables();
if ($vars->searchfield) {
    $vars->id = $vars->searchfield;
}
$ticket = Whups::getCurrentTicket();
$ticket->setDetails($vars);
$title = '[#' . $ticket->getId() . '] ' . $ticket->get('summary');
Whups::addTopbarSearch();
Whups::addFeedLink();
$page_output->addLinkTag($ticket->feedLink());
$page_output->header(array('title' => $title));
$notification->notify(array('listeners' => 'status'));
require WHUPS_TEMPLATES . '/prevnext.inc';
$tabs = Whups::getTicketTabs($vars, $ticket->getId());
echo $tabs->render('history');
$form = new Whups_Form_TicketDetails($vars, $ticket);
$renderer = $form->getRenderer();
$renderer->_name = $form->getName();
$renderer->beginInactive($title);
$renderer->renderFormInactive($form, $vars);
$renderer->end();
echo '<br class="spacer" />';
$comment = new Whups_Form_Renderer_Comment();
$comment->begin(_("History"));
$history = Whups::permissionsFilter($whups_driver->getHistory($ticket->getId(), $form), 'comment', Horde_Perms::READ);
$chtml = array();
foreach ($history as $transaction => $comment_values) {
    $chtml[] = $comment->render($transaction, new Horde_Variables($comment_values));
}
开发者ID:horde,项目名称:horde,代码行数:31,代码来源:index.php

示例5: array

        }
        // Update attributes.
        $whups_driver->setAttributes($info, $ticket);
        // Add attachment if one was uploaded.
        if (!empty($info['newattachment']['name'])) {
            $ticket->change('attachment', array('name' => $info['newattachment']['name'], 'tmp_name' => $info['newattachment']['tmp_name']));
        }
        // If there was a new comment and permissions were specified
        // on it, set them.
        if (!empty($info['group'])) {
            $ticket->change('comment-perms', $info['group']);
        }
        try {
            $ticket->commit();
            $notification->push(_("Ticket Updated"), 'horde.success');
            $ticket->show();
        } catch (Whups_Exception $e) {
            $notification->push($e, 'horde.error');
        }
    }
}
$page_output->header(array('title' => $title));
$notification->notify(array('listeners' => 'status'));
require WHUPS_TEMPLATES . '/prevnext.inc';
echo Whups::getTicketTabs($vars, $id)->render('update');
$editform->renderActive($editform->getRenderer(), $vars, Horde::url('ticket/update.php'), 'post');
echo '<br class="spacer" />';
$form = new Whups_Form_TicketDetails($vars, $ticket, $title);
$ticket->setDetails($vars);
$form->renderInactive($form->getRenderer(), $vars);
$page_output->footer();
开发者ID:horde,项目名称:horde,代码行数:31,代码来源:update.php


注:本文中的Whups::getTicketTabs方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。