本文整理汇总了PHP中help_button函数的典型用法代码示例。如果您正苦于以下问题:PHP help_button函数的具体用法?PHP help_button怎么用?PHP help_button使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了help_button函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。
示例1: printnode
function printnode($nodeid, $text, $depth = 0, $delete_ok = false)
{
global $Language;
$purifier = Codendi_HTMLPurifier::instance();
// print current node, then all subnodes
print '<BR>';
for ($i = 0; $i < $depth; $i++) {
print " ";
}
html_image('ic/cfolder15.png', array());
print ' ' . $purifier->purify($text) . " ";
if ($nodeid != 0) {
print ' <A href="trove_cat_edit.php?trove_cat_id=' . $nodeid . '">[' . $Language->getText('admin_trove_cat_list', 'edit') . ']</A> ';
}
if ($delete_ok) {
print ' <A href="trove_cat_delete.php?trove_cat_id=' . $nodeid . '">[' . $Language->getText('admin_trove_cat_list', 'delete') . ']</A> ';
}
if ($nodeid != 0) {
print ' ' . help_button('trove_cat', $nodeid) . "\n";
}
$res_child = db_query("SELECT trove_cat_id,fullname,parent FROM trove_cat " . "WHERE parent='" . db_ei($nodeid) . "' ORDER BY fullpath");
while ($row_child = db_fetch_array($res_child)) {
$delete_ok = $row_child["parent"] != 0;
printnode($row_child["trove_cat_id"], $row_child["fullname"], $depth + 1, $delete_ok);
}
}
开发者ID:pombredanne,项目名称:tuleap,代码行数:26,代码来源:trove_cat_list.php
示例2: _toolbar
function _toolbar($params)
{
// No toolbar in printer version
if (isset($params['pv']) && $params['pv'] > 0) {
return;
}
$tools = array();
$this->_addDocmanTool($params, $tools);
$dPm =& Docman_PermissionsManager::instance($params['group_id']);
$user =& $this->_controller->getUser();
$oneFolderWritable = $dPm->oneFolderIsWritable($user);
if ($oneFolderWritable) {
$url_params = array('action' => 'newGlobalDocument');
if (isset($params['item'])) {
$url_params['id'] = $params['item']->accept(new Docman_View_ToolbarNewDocumentVisitor());
}
$tools[] = '<b><a href="' . $this->buildUrl($params['default_url'], $url_params) . '">' . $GLOBALS['Language']->getText('plugin_docman', 'new_document') . '</a></b>';
if ($this->_controller->userCanAdmin()) {
$tools[] = '<b><a href="' . $params['default_url'] . '&action=admin">' . $GLOBALS['Language']->getText('plugin_docman', 'toolbar_admin') . '</a></b>';
}
}
$tools[] = help_button('DocumentManagerPlugin.html', false, $GLOBALS['Language']->getText('global', 'help'));
echo implode(' | ', $tools);
echo "\n";
}
开发者ID:nterray,项目名称:tuleap,代码行数:25,代码来源:Docman_View_Docman.class.php
示例3: project_admin_header
function project_admin_header($params)
{
global $group_id, $feedback, $Language;
$params['toptab'] = 'admin';
$params['group'] = $group_id;
site_project_header($params);
echo '
<P><TABLE width="100%"><TR>';
echo '<TD width="1"><b>' . $Language->getText('project_admin_utils', 'menu_config') . '</b></td><td><b>
<A HREF="/project/admin/editgroupinfo.php?group_id=' . $group_id . '">' . $Language->getText('project_admin_utils', 'edit_public_info') . '</A> |
<A HREF="/project/admin/servicebar.php?group_id=' . $group_id . '">' . $Language->getText('project_admin_editservice', 's_conf') . '</A> |
<A HREF="/project/admin/reference.php?group_id=' . $group_id . '">' . $Language->getText('project_admin_utils', 'references') . '</A>';
$em = EventManager::instance();
$em->processEvent('admin_toolbar_configuration', array('group_id' => $group_id));
echo '</td><td>';
if (isset($params['help'])) {
echo help_button($params['help'], false, $Language->getText('global', 'help'));
}
echo '</td></tr>';
echo '</td></tr><tr><td><b>' . $Language->getText('project_admin_utils', 'menu_permissions') . '</b></td><td><b>
<A HREF="/project/admin/userperms.php?group_id=' . $group_id . '">' . $Language->getText('project_admin_utils', 'user_perms') . '</A> |
<A HREF="/project/admin/ugroup.php?group_id=' . $group_id . '">' . $Language->getText('project_admin_utils', 'ug_admin') . '</A> |
<A HREF="/project/admin/permission_request.php?group_id=' . $group_id . '">' . $Language->getText('project_admin_ugroup', 'permission_request') . '</A>';
echo '</td><td></td></tr><tr><td><b>' . $Language->getText('project_admin_utils', 'menu_data') . '</b></td><td><b>
<A HREF="/project/export/index.php?group_id=' . $group_id . '">' . $Language->getText('project_admin_utils', 'project_data_export') . '</A> |
<A HREF="/tracker/import_admin.php?group_id=' . $group_id . '&mode=admin">' . $Language->getText('project_admin_utils', 'tracker_import') . '</A> |
<A HREF="/project/admin/history.php?group_id=' . $group_id . '">' . $Language->getText('project_admin_history', 'proj_history') . '</A> |
<A HREF="/project/stats/source_code_access.php/?group_id=' . $group_id . '">' . $Language->getText('project_admin_utils', 'access_logs') . '</A>';
//Call hook that can be displayed in this area
$em->processEvent('admin_toolbar_data', array('group_id' => $group_id));
//<A HREF="/project/admin/?group_id='.$group_id.'&func=import">Tracker Import</A>
echo '</td><td></td></tr></table>';
echo '</B>
<P>';
}
开发者ID:rinodung,项目名称:tuleap,代码行数:35,代码来源:project_admin_utils.php
示例4: survey_header
function survey_header($params)
{
global $group_id, $is_admin_page, $Language;
$params['toptab'] = 'survey';
$params['group'] = $group_id;
$pm = ProjectManager::instance();
$project = $pm->getProject($group_id);
if (!$project->usesSurvey()) {
exit_error($Language->getText('global', 'error'), $Language->getText('survey_s_utils', 's_off'));
}
site_project_header($params);
echo "<P><B>";
// Admin link is displayed only if the user is a project administrator
if (user_ismember($group_id, 'A')) {
echo "<A HREF=\"/survey/admin/?group_id={$group_id}\">" . $Language->getText('survey_s_utils', 'admin') . "</A>";
}
if ($is_admin_page && $group_id && user_ismember($group_id, 'A')) {
echo " | <A HREF=\"/survey/admin/add_survey.php?group_id={$group_id}\">" . $Language->getText('survey_admin_index', 'add_s') . "</A>";
echo " | <A HREF=\"/survey/admin/edit_survey.php?func=browse&group_id={$group_id}\">" . $Language->getText('survey_admin_browse_survey', 'edit_s') . "</A>";
echo " | <A HREF=\"/survey/admin/add_question.php?group_id={$group_id}\">" . $Language->getText('survey_admin_index', 'add_q') . "</A>";
echo " | <A HREF=\"/survey/admin/edit_question.php?func=browse&group_id={$group_id}\">" . $Language->getText('survey_admin_browse_question', 'edit_q') . "</A>";
echo " | <A HREF=\"/survey/admin/show_results.php?group_id={$group_id}\">" . $Language->getText('survey_s_utils', 'show_r') . "</A>";
}
if (isset($params['help'])) {
if (user_ismember($group_id, 'A')) {
echo ' | ';
}
echo help_button($params['help'], false, $Language->getText('global', 'help'));
}
echo "</B><P>";
}
开发者ID:nterray,项目名称:tuleap,代码行数:31,代码来源:survey_utils.php
示例5: printnode
function printnode($nodeid, $text, $delete_ok = false)
{
global $Language;
// print current node, then all subnodes
print '<BR>';
for ($i = 0; $i < $GLOBALS['depth']; $i++) {
print " ";
}
html_image('ic/cfolder15.png', array());
print ' ' . $text . " ";
if ($nodeid != 0) {
print ' <A href="trove_cat_edit.php?trove_cat_id=' . $nodeid . '">[' . $Language->getText('admin_trove_cat_list', 'edit') . ']</A> ';
}
if ($delete_ok) {
print ' <A href="trove_cat_delete.php?trove_cat_id=' . $nodeid . '">[' . $Language->getText('admin_trove_cat_list', 'delete') . ']</A> ';
}
if ($nodeid != 0) {
print ' ' . help_button('trove_cat', $nodeid) . "\n";
}
$GLOBALS["depth"]++;
$res_child = db_query("SELECT trove_cat_id,fullname,parent FROM trove_cat " . "WHERE parent='{$nodeid}' ORDER BY fullpath");
while ($row_child = db_fetch_array($res_child)) {
$delete_ok = $row_child["parent"] != 0;
printnode($row_child["trove_cat_id"], $row_child["fullname"], $delete_ok);
}
$GLOBALS["depth"]--;
}
开发者ID:nterray,项目名称:tuleap,代码行数:27,代码来源:trove_cat_list.php
示例6: _getHelp
function _getHelp($section = '', $questionmark = false)
{
if (trim($section) !== '' && $section[0] !== '#') {
$section = '#' . $section;
}
if ($questionmark) {
$help_label = '[?]';
} else {
$help_label = $GLOBALS['Language']->getText('global', 'help');
}
return help_button('ci.html' . $section, false, $help_label);
}
开发者ID:pombredanne,项目名称:tuleap,代码行数:12,代码来源:hudsonViews.class.php
示例7: people_header
function people_header($params)
{
global $group_id, $HTML, $Language;
echo $HTML->header($params);
echo '
<H2>' . $GLOBALS['sys_name'] . ' - ' . $Language->getText('people_utils', 'people_skills') . '</H2>
<P><B>
<A HREF="/people/admin/">' . $Language->getText('people_utils', 'admin') . '</A>';
if (array_key_exists('help', $params) && $params['help']) {
echo ' | ' . help_button($params['help'], false, $Language->getText('global', 'help'));
}
echo '</B>';
echo '<HR NoShade SIZE="1" SIZE="90%">';
}
开发者ID:nterray,项目名称:tuleap,代码行数:14,代码来源:people_utils.php
示例8: commits_header_admin
function commits_header_admin($params)
{
global $group_id, $Language;
//required params for site_project_header();
$params['group'] = $group_id;
$params['toptab'] = 'cvs';
$pm = ProjectManager::instance();
$project = $pm->getProject($group_id);
if (!$project->usesCVS()) {
exit_error($Language->getText('global', 'error'), $Language->getText('cvs_commit_utils', 'error_off'));
}
echo site_project_header($params);
if ($params['help']) {
echo ' | <b>' . help_button($params['help'], false, $Language->getText('global', 'help')) . '</b>';
}
echo ' <hr width="300" size="1" align="left" noshade>';
}
开发者ID:pombredanne,项目名称:tuleap,代码行数:17,代码来源:commit_utils.php
示例9: printnode
function printnode($nodeid, $text)
{
// print current node, then all subnodes
print '<BR>';
for ($i = 0; $i < $GLOBALS[depth]; $i++) {
print " ";
}
print html_image('images/ic/cfolder15.png', '15', '13', array());
print ' ' . $text . " ";
print '<A href="trove_cat_edit.php?trove_cat_id=' . $nodeid . '">[Edit]</A> ';
print help_button('trove_cat', $nodeid) . "\n";
$GLOBALS["depth"]++;
$res_child = db_query("SELECT trove_cat_id,fullname FROM trove_cat " . "WHERE parent='{$nodeid}'");
while ($row_child = db_fetch_array($res_child)) {
printnode($row_child["trove_cat_id"], $row_child["fullname"]);
}
$GLOBALS["depth"]--;
}
开发者ID:BackupTheBerlios,项目名称:berlios,代码行数:18,代码来源:trove_cat_list.php
示例10: news_header
function news_header($params)
{
global $HTML, $group_id, $news_name, $news_id, $Language;
$params['toptab'] = 'news';
$params['group'] = $group_id;
if (isset($params['project_id'])) {
$params['group'] = $params['project_id'];
$group_id = $params['project_id'];
}
/*
Show horizontal links
*/
if ($group_id && $group_id != $GLOBALS['sys_news_group']) {
site_project_header($params);
} else {
$HTML->header($params);
echo '
<H2>' . $GLOBALS['sys_name'] . ' <A HREF="/news/">' . $Language->getText('news_index', 'news') . '</A></H2>';
}
if (!isset($params['pv']) || !$params['pv']) {
echo '<P><B>';
// 'Admin' tab is only displayed if the user is News admin or project admin
if ($group_id) {
if (user_ismember($group_id, 'A') || user_ismember($group_id, 'N2')) {
echo '<A HREF="/news/submit.php?group_id=' . $group_id . '">' . $Language->getText('news_utils', 'submit_news') . '</A> | <A HREF="/news/admin/?group_id=' . $group_id . '">' . $Language->getText('news_utils', 'admin') . '</A>';
} else {
if (user_ismember($group_id, 'A') || user_ismember($group_id, 'N1')) {
// 'Submit News' tab is only displayed if the user is News writer, or project admin
echo '<A HREF="/news/submit.php?group_id=' . $group_id . '">' . $Language->getText('news_utils', 'submit_news') . '</A>';
}
}
if (user_ismember($group_id, 'A') || user_ismember($group_id, 'N2') || user_ismember($group_id, 'N1')) {
if (isset($params['help'])) {
echo ' | ';
}
}
}
if (isset($params['help'])) {
echo help_button($params['help'], false, $Language->getText('global', 'help'));
}
echo '</b><P>';
}
}
开发者ID:pombredanne,项目名称:tuleap,代码行数:43,代码来源:news_utils.php
示例11: file_utils_admin_header
function file_utils_admin_header($params)
{
global $group_id, $Language;
$params['toptab'] = 'file';
$params['group'] = $group_id;
site_project_header($params);
if (user_ismember($group_id, "R2")) {
$pm = ProjectManager::instance();
$p = $pm->getProject($group_id);
echo '<strong>';
echo '<a href="/file/?group_id=' . $group_id . '">' . $Language->getText('project_admin_editservice', $p->services['file']->getLabel()) . '</a>';
echo ' | <a href="/file/admin/?group_id=' . $group_id . '">' . $Language->getText('file_file_utils', 'admin') . '</a>';
echo ' | <a href="/file/admin/manageprocessors.php?group_id=' . $group_id . '">' . $Language->getText('file_file_utils', 'manage_proc') . '</a>';
if (!isset($params['help'])) {
$params['help'] = "frs.html";
}
echo ' | ' . help_button($params['help'], false, $Language->getText('global', 'help'));
echo "</strong><br><hr>";
}
}
开发者ID:rinodung,项目名称:tuleap,代码行数:20,代码来源:file_utils.php
示例12: printnode
function printnode($nodeid, $text)
{
global $Language;
print '<br />';
for ($i = 0; $i < $GLOBALS[depth]; $i++) {
print " ";
}
print html_image('ic/cfolder15.png', '15', '13', array());
print ' ' . $text . " ";
print url_make_link("trove_cat_add.php?parent_trove_cat_id='.{$nodeid}.'", "[" . _('Add') . "]");
if ($nodeid != 0) {
print url_make_link("trove_cat_edit.php?parent_trove_cat_id='.{$nodeid}.'", "[" . _('Edit') . "]");
print help_button('trove_cat', $nodeid) . "\n";
}
$GLOBALS['depth']++;
$res_child = db_query("\n\t\tSELECT trove_cat_id,fullname FROM trove_cat \n\t\tWHERE parent='{$nodeid}'\n\t\tAND trove_cat_id!=0;\n\t");
while ($row_child = db_fetch_array($res_child)) {
printnode($row_child["trove_cat_id"], $row_child["fullname"]);
}
$GLOBALS["depth"]--;
}
开发者ID:neymanna,项目名称:fusionforge,代码行数:21,代码来源:trove_cat_list.php
示例13: mail_header_admin
function mail_header_admin($params)
{
global $group_id, $Language;
//required for site_project_header
$params['group'] = $group_id;
$params['toptab'] = 'mail';
$pm = ProjectManager::instance();
$project = $pm->getProject($group_id);
if (!$project->usesMail()) {
exit_error($Language->getText('global', 'error'), $Language->getText('mail_utils', 'mail_turned_off'));
}
site_project_header($params);
echo '
<P><B><A HREF="/mail/admin/?group_id=' . $group_id . '">' . $Language->getText('mail_utils', 'admin') . '</A></B>
| <B><A HREF="/mail/admin/?group_id=' . $group_id . '&add_list=1">' . $Language->getText('mail_utils', 'add_list') . '</A></B>
| <B><A HREF="/mail/admin/?group_id=' . $group_id . '&change_status=1">' . $Language->getText('mail_utils', 'update_list') . '</A></B>
';
if ($params['help']) {
echo ' | <B>' . help_button($params['help'], false, $Language->getText('global', 'help')) . '</B>';
}
}
开发者ID:pombredanne,项目名称:tuleap,代码行数:21,代码来源:mail_utils.php
示例14: snippet_header
function snippet_header($params)
{
global $is_snippet_page, $HTML, $feedback, $Language;
if ($GLOBALS['sys_use_snippet'] == 0) {
exit_permission_denied();
}
// LJ used so the search box will add the necessary element to the pop-up box
// Codendi Specific
$is_snippet_page = 1;
$HTML->header($params);
/*
Show horizontal links
*/
echo '<H2>' . $params['title'] . '</H2>';
echo '<P><B>';
echo '<A HREF="/snippet/">' . $Language->getText('snippet_utils', 'browse') . '</A>
| <A HREF="/snippet/submit.php">' . $Language->getText('snippet_utils', 'create_s') . '</A>
| <A HREF="/snippet/package.php">' . $Language->getText('snippet_utils', 'create_p') . '</A></B>';
if (isset($params['help']) && $params['help']) {
echo ' | ' . help_button($params['help'], false, $Language->getText('global', 'help'));
}
echo '<P>';
html_feedback_top($feedback);
}
开发者ID:nterray,项目名称:tuleap,代码行数:24,代码来源:snippet_utils.php
示例15: _getHelp
function _getHelp()
{
return help_button('communication.html#instant-messaging-plug-in', false, $GLOBALS['Language']->getText('global', 'help'));
}
开发者ID:pdaniel-frk,项目名称:tuleap,代码行数:4,代码来源:IMViews.class.php
示例16: displayMenu
/**
* displayMenu - public
*/
function displayMenu()
{
print '
<table class="ServiceMenu">
<tr>
<td>';
switch (DEFAULT_LANGUAGE) {
case 'fr_FR':
$attatch_page = "DéposerUnFichier";
$preferences_page = "PréférencesUtilisateurs";
break;
case 'en_US':
default:
$attatch_page = 'UpLoad';
$preferences_page = 'UserPreferences';
break;
}
$attatch_menu = $GLOBALS['Language']->getText('wiki_views_wikiserviceviews', 'menuattch');
$preferences_menu = $GLOBALS['Language']->getText('wiki_views_wikiserviceviews', 'menuprefs');
$help_menu = $GLOBALS['Language']->getText('global', 'help');
print '
<ul class="ServiceMenu">
<li><a href="' . $this->wikiLink . '&view=browsePages">' . $GLOBALS['Language']->getText('wiki_views_wikiserviceviews', 'menupages') . '</a> | </li>';
if (UserManager::instance()->getCurrentUser()->isLoggedIn()) {
print '<li><a href="javascript:help_window(\'' . $this->wikiLink . '&pagename=' . $attatch_page . '&pv=1\')">' . $attatch_menu . '</a> | </li>';
print '<li><a href="' . $this->wikiLink . '&pagename=' . $preferences_page . '">' . $preferences_menu . '</a> | </li>';
}
if (user_ismember($this->gid, 'W2')) {
print '<li><a href="' . $this->wikiAdminLink . '">' . $GLOBALS['Language']->getText('wiki_views_wikiserviceviews', 'menuadmin') . '</a> | </li>';
}
print '<li>' . help_button('WikiService.html', false, $help_menu) . '</li>
</ul>';
print '
</td>
<td align="right" valign="top">';
if (user_ismember($this->gid, 'W2')) {
$wiki = new Wiki($this->gid);
$permInfo = "";
if ('wiki' == $this->view) {
// User is browsing a wiki page
$wp = new WikiPage($this->gid, $_REQUEST['pagename']);
$permLink = $this->wikiAdminLink . '&view=pagePerms&id=' . $wp->getId();
if ($wp->permissionExist()) {
$permInfo = '<a href="' . $permLink . '"> ' . '<img src="' . util_get_image_theme("ic/lock.png") . '" border="0" alt="' . $GLOBALS['Language']->getText('wiki_views_wikiserviceviews', 'lock_alt') . '" title="' . $GLOBALS['Language']->getText('wiki_views_wikiserviceviews', 'lock_title_spec') . '"/></a>';
}
}
if ($wiki->permissionExist()) {
$permInfo .= '<a href="/wiki/admin/index.php?group_id=' . $this->gid . '&view=wikiPerms"> ' . '<img src="' . util_get_image_theme("ic/lock.png") . '" border="0" alt="' . $GLOBALS['Language']->getText('wiki_views_wikiserviceviews', 'lock_alt') . '" title="' . $GLOBALS['Language']->getText('wiki_views_wikiserviceviews', 'lock_title_set') . '"/>' . '</a>';
}
if ($permInfo) {
print $permInfo;
}
}
//Display printer_version link only in wiki pages
if (isset($_REQUEST['pagename'])) {
print '
(<a href="' . $_SERVER['REQUEST_URI'] . '&pv=1" title="' . $GLOBALS['Language']->getText('wiki_views_wikiserviceviews', 'lighter_display') . '">
<img src="' . util_get_image_theme("msg.png") . '" border="0"> ' . $GLOBALS['Language']->getText('global', 'printer_version') . '</A> )
</li>';
}
print '
</td>
</tr>
</table>';
}
开发者ID:nterray,项目名称:tuleap,代码行数:68,代码来源:WikiServiceViews.class.php
示例17: array
$params = array('title' => $Language->getText('file_showfiles', 'file_p_for', $pm->getProject($group_id)->getPublicName()), 'pv' => $pv);
file_utils_header($params);
$hp =& Codendi_HTMLPurifier::instance();
if ($num_packages < 1) {
echo '<h3>' . $Language->getText('file_showfiles', 'no_file_p') . '</h3><p>' . $Language->getText('file_showfiles', 'no_p_available');
if ($frspf->userCanAdmin($user, $group_id)) {
echo '<p><a href="admin/package.php?func=add&group_id=' . $group_id . '">[' . $GLOBALS['Language']->getText('file_admin_editpackages', 'create_new_p') . ']</a></p>';
}
file_utils_footer($params);
exit;
}
if ($pv) {
echo '<h3>' . $Language->getText('file_showfiles', 'p_releases') . ':</h3>';
} else {
echo "<TABLE width='100%'><TR><TD>";
echo '<h3>' . $Language->getText('file_showfiles', 'p_releases') . ' ' . help_button('FileReleaseJargon.html') . '</h3>';
echo "</TD>";
echo "<TD align='left'> ( <A HREF='showfiles.php?group_id={$group_id}&pv=1'><img src='" . util_get_image_theme("msg.png") . "' border='0'> " . $Language->getText('global', 'printer_version') . "</A> ) </TD>";
echo "</TR></TABLE>";
echo '<p>' . $Language->getText('file_showfiles', 'select_release') . '</p>';
?>
<SCRIPT language="JavaScript">
<!--
function showConfirmDownload(group_id,file_id,filename) {
url = "/file/confirm_download.php?popup=1&group_id=" + group_id + "&file_id=" + file_id + "&filename=" + filename;
wConfirm = window.open(url,"confirm","width=520,height=450,resizable=1,scrollbars=1");
wConfirm.focus();
}
function download(group_id,file_id,filename) {
url = "/file/download.php/" + group_id + "/" + file_id +"/"+filename;
开发者ID:nterray,项目名称:tuleap,代码行数:31,代码来源:showfiles.php
示例18: displayAdminNotifications_Personnal
protected function displayAdminNotifications_Personnal($current_user)
{
$user_id = $current_user->getId();
$hp = Codendi_HTMLPurifier::instance();
// Build Wachees UI
$arr_watchees = array();
foreach ($this->getWatcherDao()->searchWatchees($this->tracker->id, $current_user->getId()) as $row) {
$arr_watchees[] = user_getname($row['watchee_id']);
}
$watchees = join(',', $arr_watchees);
echo '<h3>' . $GLOBALS['Language']->getText('plugin_tracker_include_type', 'perso_mail_notif') . '</h3>';
if ($this->tracker->userIsAdmin()) {
// To watch other users you must have at least admin rights on the tracker
echo '
<h4>' . $GLOBALS['Language']->getText('plugin_tracker_include_type', 'users_to_watch') . ' ' . help_button('TrackerV5Administration.html#TrackerV5Watchers') . '</h4>
<P>' . $GLOBALS['Language']->getText('plugin_tracker_include_type', 'backup_person') . '
<p><INPUT TYPE="TEXT" NAME="watchees" VALUE="' . $hp->purify($watchees, CODENDI_PURIFIER_CONVERT_HTML) . '" SIZE="55" MAXLENGTH="255"><br></p>
';
$watchers = "";
foreach ($this->getWatcherDao()->searchWatchers($this->tracker->id, $current_user->getId()) as $row) {
$watcher_name = user_getname($row_watcher['user_id']);
$watchers .= '<a href="/users/' . urlencode($watcher_name) . '">' . $hp->purify($watcher_name, CODENDI_PURIFIER_CONVERT_HTML) . '</a>,';
}
$watchers = substr($watchers, 0, -1);
// remove extra comma at the end
if ($watchers) {
echo "<p>" . $GLOBALS['Language']->getText('plugin_tracker_include_type', 'watchers', $hp->purify($watchers, CODENDI_PURIFIER_CONVERT_HTML));
} else {
echo "<p>" . $GLOBALS['Language']->getText('plugin_tracker_include_type', 'no_watcher');
}
echo '<br><br>';
}
// Build Role/Event table
$dar_roles = $this->getNotificationDao()->searchRoles($this->tracker->id);
$num_roles = $dar_roles->rowCount();
$dar_events = $this->getNotificationDao()->searchEvents($this->tracker->id);
$num_events = $dar_events->rowCount();
$arr_notif = array();
// By default it's all 'yes'
foreach ($dar_roles as $role) {
foreach ($dar_events as $event) {
$arr_notif[$role['role_label']][$event['event_label']] = 1;
}
}
foreach ($this->getNotificationDao()->searchNotification($this->tracker->id, $current_user->getId()) as $arr) {
$arr_notif[$arr['role_label']][$arr['event_label']] = $arr['notify'];
}
// Rk: Can't use html_build_list_table_top because of the specific layout
echo '<h4>' . $GLOBALS['Language']->getText('plugin_tracker_include_type', 'event_settings') . ' ' . help_button('TrackerV5Administration.html#TrackerV5EventRoleBasedEmailNotification') . '</h4>
<P>' . $GLOBALS['Language']->getText('plugin_tracker_include_type', 'tune_settings');
echo '
<table BORDER="0" CELLSPACING="1" CELLPADDING="2" class="small">
<tr class="boxtitle">
<td colspan="' . (int) $num_roles . '" align="center" width="50%"><b>' . $GLOBALS['Language']->getText('plugin_tracker_include_type', 'role_is') . '</b></td>
<td rowspan="2" width="50%"><b> ' . $GLOBALS['Language']->getText('plugin_tracker_include_type', 'notify_me') . '</b></td>
</tr>';
$dar_roles->rewind();
foreach ($dar_roles as $role) {
echo '<td align="center" width="10%"><b>' . $GLOBALS['Language']->getText('plugin_tracker_common_types', $role['short_description_msg']) . "</b></td>\n";
}
echo "</tr>\n";
$dar_events->rewind();
$dar_roles->rewind();
$i = 0;
foreach ($dar_events as $event) {
$event_label = $event['event_label'];
echo "<tr class=\"" . util_get_alt_row_color($i++) . "\">\n";
foreach ($dar_roles as $role) {
$role_label = $role['role_label'];
$cbox_name = 'cb_' . $role['role_id'] . '_' . $event['event_id'];
if ($event_label == 'NEW_ARTIFACT' && $role_label != 'ASSIGNEE' && $role_label != 'SUBMITTER' || $event_label == 'ROLE_CHANGE' && $role_label != 'ASSIGNEE' && $role_label != 'CC') {
// if the user is not a member then the ASSIGNEE column cannot
// be set. If it's not an assignee or a submitter the new_artifact event is meaningless
echo ' <td align="center"><input type="hidden" name="' . $cbox_name . '" value="1">-</td>' . "\n";
} else {
echo ' <td align="center"><input type="checkbox" name="' . $cbox_name . '" value="1" ' . ($arr_notif[$role_label][$event_label] ? 'checked' : '') . "></td>\n";
}
}
echo ' <td> ' . $GLOBALS['Language']->getText('plugin_tracker_common_types', $event['description_msg']) . "</td>\n";
echo "</tr>\n";
}
echo '
</table>';
}
开发者ID:nterray,项目名称:tuleap,代码行数:84,代码来源:Tracker_NotificationsManager.class.php
示例19: help_button
$HTML->header(array('title' => $Language->getText('register_index', 'project_registration') . ' - ' . $steps[$current_step]->name));
echo '<style>
.current_step {
font-weight:bold;
}
.next_step {
color:#999;
}
</style>';
echo '<form action="" method="POST">';
echo $csrf->fetchHTMLInput();
echo '<table>';
echo '<tr style="vertical-align:top;">';
echo '<td>';
echo '<h2>' . $steps[$current_step]->name . ' ';
echo help_button($steps[$current_step]->help);
echo '</h2>';
$steps[$current_step]->display($data);
echo '</td>';
echo '<td rowspan="2"><ol>';
foreach ($steps as $key => $step) {
$classname = $key == $current_step ? 'current_step' : ($key < $current_step ? 'previous_step' : 'next_step');
echo '<li class="' . $classname . '">' . $step->name . '</li>';
}
echo '</ol></td>';
echo '</tr><tr>';
echo '<td style="text-align:center">';
echo '<input type="submit" name="cancel" value="' . $GLOBALS['Language']->getText('register_form', 'cancel') . '" /> ';
echo '<input type="hidden" name="current_step" value="' . $current_step . '" />';
echo '<input type="hidden" name="data" value="' . htmlentities(serialize($data), ENT_QUOTES, 'UTF-8') . '" />';
echo '<input type="submit" name="next" id="project_register_next" value="' . ($current_step < count($steps) - 1 ? $GLOBALS['Language']->getText('register_form', 'next') : $GLOBALS['Language']->getText('register_title', 'intro')) . '" />';
开发者ID:nterray,项目名称:tuleap,代码行数:31,代码来源:register.php
示例20: displayAdd
function displayAdd($user_id)
{
global $art_field_fact, $art_fieldset_fact, $sys_max_size_attachment, $Language;
$hp = Codendi_HTMLPurifier::instance();
$fields_per_line = 2;
// the column number is the number of field per line * 2 (label + value)
// + the number of field per line -1 (a blank column between each pair "label-value" to give more space)
$columns_number = $fields_per_line * 2 + ($fields_per_line - 1);
$max_size = 40;
$group = $this->ArtifactType->getGroup();
$group_artifact_id = $this->ArtifactType->getID();
$group_id = $group->getGroupId();
$result_fieldsets = $art_fieldset_fact->getAllFieldSetsContainingUsedFields();
// Display submit informations if any
if ($this->ArtifactType->getSubmitInstructions()) {
echo $hp->purify(util_unconvert_htmlspecialchars($this->ArtifactType->getSubmitInstructions()), CODENDI_PURIFIER_FULL);
}
// Beginning of the submission form with fixed fields
echo '<FORM ACTION="" METHOD="POST" enctype="multipart/form-data" NAME="artifact_form">
<INPUT TYPE="hidden" name="MAX_FILE_SIZE" value="' . $sys_max_size_attachment . '">
<INPUT TYPE="HIDDEN" NAME="func" VALUE="postadd">
<INPUT TYPE="HIDDEN" NAME="group_id" VALUE="' . (int) $group_id . '">
<INPUT TYPE="HIDDEN" NAME="atid" VALUE="' . (int) $group_artifact_id . '">';
echo '<TABLE><TR><TD class="artifact">';
$pm = ProjectManager::instance();
$html = '';
$html .= ' <TABLE width="100%">
<TR><TD VALIGN="TOP" COLSPAN="' . $columns_number . '">
<B>' . $Language->getText('tracker_include_artifact', 'group') . ':</B> ' . $hp->purify(util_unconvert_htmlspecialchars($pm->getProject($group_id)->getPublicName()), CODENDI_PURIFIER_CONVERT_HTML) . '</TD></TR>';
// Now display the variable part of the field list (depend on the project)
foreach ($result_fieldsets as $fieldset_id => $result_fieldset) {
// this variable will tell us if we have to display the fieldset or not (if there is at least one field to display or not)
$display_fieldset = false;
$fieldset_html = '';
$i = 0;
$fields_in_fieldset = $result_fieldset->getAllUsedFields();
while (list($key, $field) = each($fields_in_fieldset)) {
$field_html = new ArtifactFieldHtml($field);
// if the field is a special field (except summary and original description)
// or if not used by this project then skip it.
// Plus only show fields allowed on the artifact submit_form
if (!$field->isSpecial() || $field->getName() == 'summary' || $field->getName() == 'details') {
if ($field->userCanSubmit($group_id, $group_artifact_id, $user_id)) {
// display the artifact field with its default value
// if field size is greatest than max_size chars then force it to
// appear alone on a new line or it won't fit in the page
// if the user can submit at least one field, we can display the fieldset this field is within
$display_fieldset = true;
$field_value = $field->getDefaultValue();
list($sz, ) = $field->getGlobalDisplaySize();
$label = $field_html->labelDisplay(false, false, true);
$value = $field_html->display($group_artifact_id, $field_value, false, false);
$star = $field->isEmptyOk() ? '' : '<span class="highlight"><big>*</big></b></span>';
if ($sz > $max_size || $field->getName() == 'details') {
$fieldset_html .= "\n<TR>" . '<TD valign="top"><a class="artifact_field_tooltip" href="#" title="' . $hp->purify(SimpleSanitizer::unsanitize($fiel
|
请发表评论