function summary_helper_print_row($p_label, $p_open, $p_resolved, $p_closed, $p_total) { printf('<tr %s>', helper_alternate_class()); printf('<td width="50%%">%s</td>', string_display($p_label)); printf('<td width="12%%" class="right">%s</td>', $p_open); printf('<td width="12%%" class="right">%s</td>', $p_resolved); printf('<td width="12%%" class="right">%s</td>', $p_closed); printf('<td width="12%%" class="right">%s</td>', $p_total); print '</tr>'; }
function print_version_header($p_version_id) { $t_project_id = version_get_field($p_version_id, 'project_id'); $t_version_name = version_get_field($p_version_id, 'version'); $t_project_name = project_get_field($t_project_id, 'name'); $t_release_title = string_display($t_project_name) . ' - ' . string_display($t_version_name); echo $t_release_title, '<br />'; echo str_pad('', strlen($t_release_title), '='), '<br />'; $t_description = version_get_field($p_version_id, 'description'); if ($t_description !== false && !is_blank($t_description)) { echo string_display("<br />{$t_description}<br /><br />"); } }
/** * Return html for a row * @param string $p_caption Caption. * @param integer $p_access_level Access level. * @return string */ function get_capability_row($p_caption, $p_access_level) { $t_access_levels = MantisEnum::getValues(config_get('access_levels_enum_string')); $t_output = '<tr><td>' . string_display($p_caption) . '</td>'; foreach ($t_access_levels as $t_access_level) { if ($t_access_level >= (int) $p_access_level) { $t_value = '<img src="images/ok.gif" width="20" height="15" alt="X" title="X" />'; } else { $t_value = ' '; } $t_output .= '<td class="center">' . $t_value . '</td>'; } $t_output .= '</tr>' . "\n"; return $t_output; }
function get_capability_row($p_caption, $p_access_level) { $t_access_levels = explode_enum_string(config_get('access_levels_enum_string')); $t_output = '<tr ' . helper_alternate_class() . '><td>' . string_display($p_caption) . '</td>'; foreach ($t_access_levels as $t_access_level) { $t_entry_array = explode_enum_arr($t_access_level); if ((int) $t_entry_array[0] >= (int) $p_access_level) { $t_value = '<img src="images/ok.gif" width="20" height="15" alt="X" title="X" />'; } else { $t_value = ' '; } $t_output .= '<td class="center">' . $t_value . '</td>'; } $t_output .= '</tr>' . "\n"; return $t_output; }
function prepare_user_name($p_user_id) { # Catch a user_id of NO_USER (like when a handler hasn't been assigned) if (NO_USER == $p_user_id) { return ''; } $t_username = user_get_name($p_user_id); if (user_exists($p_user_id) && user_get_field($p_user_id, 'enabled')) { $t_email = user_get_email($p_user_id); if (!is_blank($t_email)) { return prepare_email_link($t_email, $t_username); } else { return string_display($t_username); } } else { $t_result = '<font STYLE="text-decoration: line-through">'; $t_result .= string_display($t_username); $t_result .= '</font>'; return $t_result; } }
$t_page_count = null; $result = filter_get_bug_rows($f_page_number, $t_per_page, $t_page_count, $t_bug_count); $row_count = count($result); # pre-cache custom column data columns_plugin_cache_issue_data($result); # for export $t_show_flag = gpc_get_int('show_flag', 0); html_page_top1(); html_head_end(); html_body_begin(); ?> <table class="width100"><tr><td class="form-title"> <div class="center"> <?php echo string_display(config_get('window_title')) . ' - ' . string_display(project_get_name($t_project_id)); ?> </div> </td></tr></table> <br /> <form method="post" action="view_all_set.php"> <?php # CSRF protection not required here - form does not result in modifications ?> <input type="hidden" name="type" value="1" /> <input type="hidden" name="print" value="1" /> <input type="hidden" name="offset" value="0" /> <input type="hidden" name="<?php echo FILTER_PROPERTY_SORT_FIELD_NAME;
</a> </td> <td><?php echo count(custom_field_get_project_ids($t_field_id)); ?> </td> <td><?php echo get_enum_element('custom_field_type', $t_desc['type']); ?> </td> <td><?php echo string_display($t_desc['possible_values']); ?> </td> <td><?php echo string_display($t_desc['default_value']); ?> </td> </tr><?php } # Create Form END ?> </table> <form method="post" action="manage_custom_field_create.php"> <fieldset> <?php echo form_security_field('manage_custom_field_create'); ?> <input type="text" name="name" size="32" maxlength="64" /> <input type="submit" class="button" value="<?php echo lang_get('add_custom_field_button');
<br /> <?php # Select the news posts $rows = news_get_rows(helper_get_current_project()); $t_count = count($rows); if ($t_count > 0) { ?> <ul><?php # Loop through results for ($i = 0; $i < $t_count; $i++) { extract($rows[$i], EXTR_PREFIX_ALL, 'v'); if (VS_PRIVATE == $v_view_state && !access_has_project_level(config_get('private_news_threshold'), $v_project_id)) { continue; } $v_headline = string_display($v_headline); $v_date_posted = date(config_get('complete_date_format'), $v_date_posted); ?> <li> <span class="news-date-posted"><?php echo $v_date_posted; ?> </span> <span class="news-headline"><a href="news_view_page.php?news_id=<?php echo $v_id; ?> "><?php echo $v_headline; ?> </a></span> <span class="news-author"><?php
/** * Prints a multi-value filter field. * @param string $p_field_name Field name. * @param mixed $p_field_value Field value. * @return void */ function print_multivalue_field($p_field_name, $p_field_value) { $t_output = ''; $t_any_found = false; if (count($p_field_value) == 0) { echo lang_get('any'); } else { $t_first_flag = true; $t_field_value = is_array($p_field_value) ? $p_field_value : array($p_field_value); foreach ($t_field_value as $t_current) { $t_current = stripslashes($t_current); ?> <input type="hidden" name="<?php echo string_attribute($p_field_name); ?> []" value="<?php echo string_attribute($t_current); ?> " /> <?php $t_this_string = ''; if ($t_current == META_FILTER_ANY && is_numeric($t_current) || is_blank($t_current)) { $t_any_found = true; } else { $t_this_string = string_display($t_current); } if ($t_first_flag != true) { $t_output .= '<br />'; } else { $t_first_flag = false; } $t_output .= $t_this_string; } if (true == $t_any_found) { echo lang_get('any'); } else { echo $t_output; } } }
function print_column_category($p_row, $p_columns_target = COLUMNS_TARGET_VIEW_PAGE) { global $t_sort, $t_dir; # grab the project name $t_project_name = project_get_field($p_row['project_id'], 'name'); echo '<td class="center">'; # type project name if viewing 'all projects' or if issue is in a subproject if (ON == config_get('show_bug_project_links') && helper_get_current_project() != $p_row['project_id']) { echo '<small>['; print_view_bug_sort_link($t_project_name, 'project_id', $t_sort, $t_dir, $p_columns_target); echo ']</small><br />'; } echo string_display($p_row['category']); echo '</td>'; }
* MantisBT Core API's */ require_once 'core.php'; /** * requires ajax_api */ require_once 'ajax_api.php'; /** * requires tag_api */ require_once 'tag_api.php'; compress_enable(); $f_tag_id = gpc_get_int('tag_id'); $t_tag_row = tag_get($f_tag_id); $t_name = string_display_line($t_tag_row['name']); $t_description = string_display($t_tag_row['description']); if (!(access_has_global_level(config_get('tag_edit_threshold')) || auth_get_current_user_id() == $t_tag_row['user_id'] && access_has_global_level(config_get('tag_edit_own_threshold')))) { access_denied(); } html_page_top(sprintf(lang_get('tag_update'), $t_name)); ?> <br /> <form method="post" action="tag_update.php"> <?php echo form_security_field('tag_update'); ?> <table class="width100" cellspacing="1"> <!-- Title --> <tr>
?> <tr <?php echo helper_alternate_class($i); ?> > <td> <a href="manage_user_edit_page.php?user_id=<?php echo $u_id; ?> "><?php echo string_display($u_username); ?> </a> </td> <td><?php echo string_display($u_realname); ?> </td> <td><?php print_email_link($u_email, $u_email); ?> </td> <td><?php echo get_enum_element('access_levels', $u_access_level); ?> </td> <td><?php echo trans_bool($u_enabled); ?> </td> <td class="center">
extract($result[$i], EXTR_PREFIX_ALL, 'v'); if (in_array($v_id, $f_bug_arr) || $f_show_flag == 0) { $t_last_updated = date($g_short_date_format, $v_last_updated); # grab the bugnote count $bugnote_count = bug_get_bugnote_count($v_id); # grab the project name $project_name = project_get_field($v_project_id, 'name'); $t_bug_text_table = config_get('mantis_bug_text_table'); $query4 = "SELECT *\r\n FROM {$t_bug_text_table}\r\n WHERE id='{$v_bug_text_id}'"; $result4 = db_query($query4); $row = db_fetch_array($result4); extract($row, EXTR_PREFIX_ALL, 'v2'); $v_os = string_display($v_os); $v_os_build = string_display($v_os_build); $v_platform = string_display($v_platform); $v_version = string_display($v_version); $v_summary = string_display_links($v_summary); # line feeds are desactivated in case of excel export, to avoid multiple lines if ($f_type_page != 'html') { $v2_description = stripslashes(htmlspecialchars(str_replace('\\n', ' ', $v2_description))); $v2_steps_to_reproduce = stripslashes(htmlspecialchars(str_replace('\\n', ' ', $v2_steps_to_reproduce))); $v2_additional_information = stripslashes(htmlspecialchars(str_replace('\\n', ' ', $v2_additional_information))); } else { $v2_description = string_display_links($v2_description); $v2_steps_to_reproduce = string_display_links($v2_steps_to_reproduce); $v2_additional_information = string_display_links($v2_additional_information); } # an index for incrementing the array position $name_index = 0; ?> <tr>
$f_file_id = gpc_get_int( 'file_id' ); $t_project_id = file_get_field( $f_file_id, 'project_id', 'project' ); access_ensure_project_level( config_get( 'upload_project_file_threshold' ), $t_project_id ); $t_project_file_table = db_get_table( 'project_file' ); $query = "SELECT title FROM $t_project_file_table WHERE id=" . db_param(); $result = db_query_bound( $query, Array( $f_file_id ) ); $t_title = db_result( $result ); # Confirm with the user helper_ensure_confirmed( lang_get( 'confirm_file_delete_msg' ) . '<br/>' . lang_get( 'filename_label' ) . lang_get( 'word_separator' ) . string_display( $t_title ), lang_get( 'file_delete_button' ) ); file_delete( $f_file_id, 'project' ); form_security_purge( 'proj_doc_delete' ); $t_redirect_url = 'proj_doc_page.php'; html_page_top( null, $t_redirect_url ); ?> <br /> <div> <?php echo lang_get( 'operation_successful' ).'<br />'; print_bracket_link( $t_redirect_url, lang_get( 'proceed' ) );
require_api('access_api.php'); require_api('config_api.php'); require_api('database_api.php'); require_api('file_api.php'); require_api('form_api.php'); require_api('gpc_api.php'); require_api('helper_api.php'); require_api('html_api.php'); require_api('lang_api.php'); require_api('print_api.php'); require_api('string_api.php'); form_security_validate('proj_doc_delete'); # Check if project documentation feature is enabled. if (OFF == config_get('enable_project_documentation')) { access_denied(); } $f_file_id = gpc_get_int('file_id'); $t_project_id = file_get_field($f_file_id, 'project_id', 'project'); access_ensure_project_level(config_get('upload_project_file_threshold'), $t_project_id); $t_project_file_table = db_get_table('project_file'); $query = "SELECT title FROM {$t_project_file_table}\n\t\t\tWHERE id=" . db_param(); $result = db_query_bound($query, array($f_file_id)); $t_title = db_result($result); # Confirm with the user helper_ensure_confirmed(lang_get('confirm_file_delete_msg') . '<br/>' . lang_get('filename_label') . lang_get('word_separator') . string_display($t_title), lang_get('file_delete_button')); file_delete($f_file_id, 'project'); form_security_purge('proj_doc_delete'); $t_redirect_url = 'proj_doc_page.php'; html_page_top(null, $t_redirect_url); html_operation_successful($t_redirect_url); html_page_bottom();
echo lang_get('actions'); ?> </td> </tr> <?php $t_index = 0; foreach ($t_custom_fields as $t_field_id) { $t_desc = custom_field_get_definition($t_field_id); ?> <tr <?php echo helper_alternate_class(); ?> > <td> <?php echo string_display($t_desc['name']); ?> </td> <td> <form method="post" action="manage_proj_custom_field_update.php"> <?php echo form_security_field('manage_proj_custom_field_update'); ?> <input type="hidden" name="project_id" value="<?php echo $f_project_id; ?> " /> <input type="hidden" name="field_id" value="<?php echo $t_field_id; ?> " />
/** * return the mailto: href string link instead of printing it * add subject line * * @param string $p_email Email Address. * @param string $p_text Link text to display to user. * @param string $p_subject Email subject line. * @return string */ function get_email_link_with_subject($p_email, $p_text, $p_subject) { # If we apply string_url() to the whole mailto: link then the @ # gets turned into a %40 and you can't right click in browsers to # do Copy Email Address. If we don't apply string_url() to the # subject text then an ampersand (for example) will truncate the text $t_subject = string_url($p_subject); $t_email = string_url($p_email); $t_mailto = string_attribute('mailto:' . $t_email . '?subject=' . $t_subject); $t_text = string_display($p_text); return '<a class="user" href="' . $t_mailto . '">' . $t_text . '</a>'; }
function print_subproject_menu_bar($p_project_id, $p_parents = '') { $t_subprojects = current_user_get_accessible_subprojects($p_project_id); $t_char = ':'; foreach ($t_subprojects as $t_subproject) { print "{$t_char} <a href=\"set_project.php?project_id={$p_parents}{$t_subproject}\">" . string_display(project_get_field($t_subproject, 'name')) . '</a>'; print_subproject_menu_bar($t_subproject, $p_parents . $t_subproject . ';'); $t_char = ','; } }
function get_capability_enum($p_caption, $p_threshold, $p_enum, $p_all_projects_only = false) { global $t_user, $t_project_id, $t_show_submit, $t_access_levels, $t_colour_project, $t_colour_global; $t_file = config_get_global($p_threshold); $t_global = config_get($p_threshold, null, null, ALL_PROJECTS); $t_project = config_get($p_threshold); $t_can_change = access_has_project_level(config_get_access($p_threshold), $t_project_id, $t_user) && (ALL_PROJECTS == $t_project_id || !$p_all_projects_only); $t_colour = ''; if ($t_global != $t_file) { $t_colour = ' bgcolor="' . $t_colour_global . '" '; # all projects override if ($t_can_change) { set_overrides($p_threshold); } } if ($t_project != $t_global) { $t_colour = ' bgcolor="' . $t_colour_project . '" '; # project overrides if ($t_can_change) { set_overrides($p_threshold); } } echo '<tr ' . helper_alternate_class() . '><td>' . string_display($p_caption) . '</td>'; if ($t_can_change) { echo '<td class="left" colspan="3"' . $t_colour . '><select name="flag_' . $p_threshold . '">'; print_enum_string_option_list($p_enum, config_get($p_threshold)); echo '</select></td><td colspan="' . (count($t_access_levels) - 3) . '"></td>'; $t_show_submit = true; } else { $t_value = MantisEnum::getLabel(lang_get($p_enum . '_enum_string'), config_get($p_threshold)) . ' '; echo '<td class="left" colspan="3"' . $t_colour . '>' . $t_value . '</td><td colspan="' . (count($t_access_levels) - 3) . '"></td>'; } if ($t_can_change) { echo '<td><select name="access_' . $p_threshold . '">'; print_enum_string_option_list('access_levels', config_get_access($p_threshold)); echo '</select> </td>'; } else { echo '<td>' . MantisEnum::getLabel(lang_get('access_levels_enum_string'), config_get_access($p_threshold)) . ' </td>'; } echo '</tr>' . "\n"; }
} } # check for exit == 0 and entry == 0, isolated state foreach ($t_status_arr as $t_status => $t_status_label) { if (0 == count($g_project_workflow['exit'][$t_status]) && 0 == count($g_project_workflow['entry'][$t_status])) { $t_validation_result .= '<tr><td>' . MantisEnum::getLabel($t_lang_enum_status, $t_status) . '</td><td bgcolor="#FF0088">' . lang_get('unreachable') . '<br />' . lang_get('no_exit') . '</td></tr>'; } } echo '<form id="workflow_config_action" method="post" action="manage_config_workflow_set.php">' . "\n"; echo '<fieldset>'; echo form_security_field('manage_config_workflow_set'); echo '</fieldset>'; if (ALL_PROJECTS == $t_project) { $t_project_title = lang_get('config_all_projects'); } else { $t_project_title = sprintf(lang_get('config_project'), string_display(project_get_name($t_project))); } echo '<p class="bold">' . $t_project_title . '</p>' . "\n"; echo '<p>' . lang_get('colour_coding') . '<br />'; if (ALL_PROJECTS != $t_project) { echo '<span class="' . COLOR_PROJECT . '">' . lang_get('colour_project') . '</span><br />'; } echo '<span class="' . COLOR_GLOBAL . '">' . lang_get('colour_global') . '</span></p>'; # show the settings used to derive the table threshold_begin(lang_get('workflow_thresholds')); if (!is_array(config_get('bug_submit_status'))) { threshold_row('bug_submit_status'); } threshold_row('bug_resolved_status_threshold'); threshold_row('bug_reopen_status'); threshold_end();
require_api('print_api.php'); require_api('string_api.php'); auth_ensure_user_authenticated(); compress_enable(); $f_query_id = gpc_get_int('source_query_id'); $t_redirect_url = 'query_view_page.php'; $t_delete_url = 'query_delete.php'; if (!filter_db_can_delete_filter($f_query_id)) { print_header_redirect($t_redirect_url); } html_page_top(); ?> <br /> <div align="center"> <center><b><?php print string_display(filter_db_get_name($f_query_id)); ?> </b></center> <?php echo lang_get('query_delete_msg'); ?> <form method="post" action="<?php print $t_delete_url; ?> "> <?php echo form_security_field('query_delete'); ?> <br /><br /> <input type="hidden" name="source_query_id" value="<?php
echo $_POST['sprintName']; ?> "> <div class="table-container"> <table align="center" class="width100" cellspacing="1"> <tr> <td class="left" style="font-weight: bold"> <?php echo plugin_lang_get('manage_capacity_planning_for'); ?> <span style="color: grey;"><?php $agilemantis_team->id = $_POST['team']; $currentTeam = $agilemantis_team->getSelectedTeam(); echo string_display($currentTeam[0]['name']); ?> </span> </td> <td class="right"> <input type="submit" name="addavailability" value="<?php echo plugin_lang_get('manage_capacity_add_availability'); ?> "> <input type="submit" name="submit" value="<?php echo plugin_lang_get('button_save'); ?> "> <input type="submit" name="back_button"
<?php } ?> <?php if ($t_def['type'] != CUSTOM_FIELD_TYPE_RADIO && $t_def['type'] != CUSTOM_FIELD_TYPE_CHECKBOX) { ?> <label for="custom_field_<?php echo string_attribute($t_def['id']); ?> "><?php echo string_display(lang_get_defaulted($t_def['name'])); ?> </label> <?php } else { echo string_display(lang_get_defaulted($t_def['name'])); } ?> </th> <td> <?php print_custom_field_input($t_def, $f_master_bug_id === 0 ? null : $f_master_bug_id); ?> </td> </tr> <?php } } # foreach( $t_related_custom_field_ids as $t_id ) # File Upload (if enabled) if ($t_show_attachments) {
} # # Issue History # if ($t_show_history) { echo '<tr><td class="print-spacer" colspan="6"><hr /></td></tr>'; echo '<tr><th class="form-title">', lang_get('bug_history'), '</th></tr>'; echo '<tr class="print-category">'; echo '<th class="row-category-history">', lang_get('date_modified'), '</th>'; echo '<th class="row-category-history">', lang_get('username'), '</th>'; echo '<th class="row-category-history">', lang_get('field'), '</th>'; echo '<th class="row-category-history">', lang_get('change'), '</th>'; echo '</tr>'; $t_history = history_get_events_array($f_bug_id); foreach ($t_history as $t_item) { echo '<tr class="print">'; echo '<td class="print">', $t_item['date'], '</td>'; echo '<td class="print">'; print_user($t_item['userid']); echo '</td>'; echo '<td class="print">', string_display($t_item['note']), '</td>'; echo '<td class="print">', string_display_line_links($t_item['change']), '</td>'; echo '</tr>'; } } echo '</table>'; define('PRINT_BUGNOTE_INC_ALLOW', true); include dirname(__FILE__) . '/print_bugnote_inc.php'; last_visited_issue($f_bug_id); html_body_end(); html_end();
function get_email_link_with_subject($p_email, $p_text, $p_summary) { if (!access_has_project_level(config_get('show_user_email_threshold'))) { return $p_text; } # If we apply string_url() to the whole mailto: link then the @ # gets turned into a %40 and you can't right click in browsers to # do Copy Email Address. If we don't apply string_url() to the # summary text then an ampersand (for example) will truncate the text $t_summary = string_url($p_summary); $t_email = string_url($p_email); $t_mailto = string_attribute("mailto:{$t_email}?subject={$t_summary}"); $t_text = string_display($p_text); return "<a href=\"{$t_mailto}\">{$t_text}</a>"; }
/** * Get a list of bug group actions available to the current user for one or * more projects. * @param array $p_project_ids An array containing one or more project IDs. * @return array */ function bug_group_action_get_commands(array $p_project_ids = null) { if ($p_project_ids === null || count($p_project_ids) == 0) { $p_project_ids = array(ALL_PROJECTS); } $t_commands = array(); foreach ($p_project_ids as $t_project_id) { if (!isset($t_commands['MOVE']) && access_has_project_level(config_get('move_bug_threshold', null, null, $t_project_id), $t_project_id)) { $t_commands['MOVE'] = lang_get('actiongroup_menu_move'); } if (!isset($t_commands['COPY']) && access_has_any_project(config_get('report_bug_threshold', null, null, $t_project_id))) { $t_commands['COPY'] = lang_get('actiongroup_menu_copy'); } if (!isset($t_commands['ASSIGN']) && access_has_project_level(config_get('update_bug_assign_threshold', null, null, $t_project_id), $t_project_id)) { if (ON == config_get('auto_set_status_to_assigned', null, null, $t_project_id) && access_has_project_level(access_get_status_threshold(config_get('bug_assigned_status', null, null, $t_project_id), $t_project_id), $t_project_id)) { $t_commands['ASSIGN'] = lang_get('actiongroup_menu_assign'); } else { $t_commands['ASSIGN'] = lang_get('actiongroup_menu_assign'); } } if (!isset($t_commands['CLOSE']) && access_has_project_level(config_get('update_bug_status_threshold', null, null, $t_project_id), $t_project_id) && (access_has_project_level(access_get_status_threshold(config_get('bug_closed_status_threshold', null, null, $t_project_id), $t_project_id), $t_project_id) || access_has_project_level(config_get('allow_reporter_close', null, null, $t_project_id), $t_project_id))) { $t_commands['CLOSE'] = lang_get('actiongroup_menu_close'); } if (!isset($t_commands['DELETE']) && access_has_project_level(config_get('delete_bug_threshold', null, null, $t_project_id), $t_project_id)) { $t_commands['DELETE'] = lang_get('actiongroup_menu_delete'); } if (!isset($t_commands['RESOLVE']) && access_has_project_level(config_get('update_bug_status_threshold', null, null, $t_project_id), $t_project_id) && access_has_project_level(access_get_status_threshold(config_get('bug_resolved_status_threshold', null, null, $t_project_id), $t_project_id), $t_project_id)) { $t_commands['RESOLVE'] = lang_get('actiongroup_menu_resolve'); } if (!isset($t_commands['SET_STICKY']) && access_has_project_level(config_get('set_bug_sticky_threshold', null, null, $t_project_id), $t_project_id)) { $t_commands['SET_STICKY'] = lang_get('actiongroup_menu_set_sticky'); } if (!isset($t_commands['UP_PRIOR']) && access_has_project_level(config_get('update_bug_threshold', null, null, $t_project_id), $t_project_id)) { $t_commands['UP_PRIOR'] = lang_get('actiongroup_menu_update_priority'); } if (!isset($t_commands['EXT_UPDATE_SEVERITY']) && access_has_project_level(config_get('update_bug_threshold', null, null, $t_project_id), $t_project_id)) { $t_commands['EXT_UPDATE_SEVERITY'] = lang_get('actiongroup_menu_update_severity'); } if (!isset($t_commands['UP_STATUS']) && access_has_project_level(config_get('update_bug_status_threshold', null, null, $t_project_id), $t_project_id)) { $t_commands['UP_STATUS'] = lang_get('actiongroup_menu_update_status'); } if (!isset($t_commands['UP_CATEGORY']) && access_has_project_level(config_get('update_bug_threshold', null, null, $t_project_id), $t_project_id)) { $t_commands['UP_CATEGORY'] = lang_get('actiongroup_menu_update_category'); } if (!isset($t_commands['VIEW_STATUS']) && access_has_project_level(config_get('change_view_status_threshold', null, null, $t_project_id), $t_project_id)) { $t_commands['VIEW_STATUS'] = lang_get('actiongroup_menu_update_view_status'); } if (!isset($t_commands['EXT_UPDATE_PRODUCT_BUILD']) && config_get('enable_product_build', null, null, $t_project_id) == ON && access_has_project_level(config_get('update_bug_threshold', null, null, $t_project_id), $t_project_id)) { $t_commands['EXT_UPDATE_PRODUCT_BUILD'] = lang_get('actiongroup_menu_update_product_build'); } if (!isset($t_commands['EXT_ADD_NOTE']) && access_has_project_level(config_get('add_bugnote_threshold', null, null, $t_project_id), $t_project_id)) { $t_commands['EXT_ADD_NOTE'] = lang_get('actiongroup_menu_add_note'); } if (!isset($t_commands['EXT_ATTACH_TAGS']) && access_has_project_level(config_get('tag_attach_threshold', null, null, $t_project_id), $t_project_id)) { $t_commands['EXT_ATTACH_TAGS'] = lang_get('actiongroup_menu_attach_tags'); } if (!isset($t_commands['UP_FIXED_IN_VERSION']) && version_should_show_product_version($t_project_id) && access_has_project_level(config_get('update_bug_threshold', null, null, $t_project_id), $t_project_id)) { $t_commands['UP_FIXED_IN_VERSION'] = lang_get('actiongroup_menu_update_fixed_in_version'); } if (!isset($t_commands['UP_TARGET_VERSION']) && version_should_show_product_version($t_project_id) && access_has_project_level(config_get('roadmap_update_threshold', null, null, $t_project_id), $t_project_id)) { $t_commands['UP_TARGET_VERSION'] = lang_get('actiongroup_menu_update_target_version'); } $t_custom_field_ids = custom_field_get_linked_ids($t_project_id); foreach ($t_custom_field_ids as $t_custom_field_id) { if (!custom_field_has_write_access_to_project($t_custom_field_id, $t_project_id)) { continue; } $t_custom_field_def = custom_field_get_definition($t_custom_field_id); $t_command_id = 'custom_field_' . $t_custom_field_id; $t_command_caption = sprintf(lang_get('actiongroup_menu_update_field'), lang_get_defaulted($t_custom_field_def['name'])); $t_commands[$t_command_id] = string_display($t_command_caption); } } $t_custom_group_actions = config_get('custom_group_actions'); foreach ($t_custom_group_actions as $t_custom_group_action) { # use label if provided to get the localized text, otherwise fallback to action name. if (isset($t_custom_group_action['label'])) { $t_commands[$t_custom_group_action['action']] = lang_get_defaulted($t_custom_group_action['label']); } else { $t_commands[$t_custom_group_action['action']] = lang_get_defaulted($t_custom_group_action['action']); } } return $t_commands; }
} ?> </tr> <?php } foreach ($t_categories as $t_category) { $t_id = $t_category['id']; ?> <!-- Repeated Info Row --> <tr <?php echo helper_alternate_class(); ?> > <td> <?php echo string_display(category_full_name($t_id, false)); ?> </td> <td> <?php echo prepare_user_name($t_category['user_id']); ?> </td> <?php if ($t_can_update_global_cat) { ?> <td class="center"> <?php $t_id = urlencode($t_id); $t_project_id = urlencode(ALL_PROJECTS); print_button("manage_proj_cat_edit_page.php?id={$t_id}&project_id={$t_project_id}", lang_get('edit_link'));
<?php # -- Custom Field Searching -- ?> <?php if (sizeof($t_accessible_custom_fields_ids) > 0) { $t_per_row = config_get('filter_custom_fields_per_row'); $t_num_rows = ceil(sizeof($t_accessible_custom_fields_ids) / $t_per_row); $t_base = 0; for ($i = 0; $i < $t_num_rows; $i++) { ?> <tr class="row-category2"> <?php for ($j = 0; $j < $t_per_row; $j++) { echo '<td class="small-caption" colspan="' . 1 * $t_filter_cols . '">'; if (isset($t_accessible_custom_fields_names[$t_base + $j])) { echo string_display(lang_get_defaulted($t_accessible_custom_fields_names[$t_base + $j])); } else { echo ' '; } echo '</td>'; } ?> </tr> <tr class="row-2"> <?php for ($j = 0; $j < $t_per_row; $j++) { echo '<td colspan="' . 1 * $t_filter_cols . '">'; if (isset($t_accessible_custom_fields_ids[$t_base + $j])) { print_filter_custom_field($t_accessible_custom_fields_ids[$t_base + $j]); } else { echo ' ';
foreach ($t_history as $t_item) { ?> <tr> <td class="small-caption"> <?php echo $t_item['date']; ?> </td> <td class="small-caption"> <?php print_user($t_item['userid']); ?> </td> <td class="small-caption"> <?php echo string_display($t_item['note']); ?> </td> <td class="small-caption"> <?php echo $t_item['raw'] ? string_display_line_links($t_item['change']) : $t_item['change']; ?> </td> </tr> <?php } # end for loop ?> </tbody> </table> <?php
/** * HTML for Row * * @param string $p_caption Caption. * @param string $p_message_type Message type. * @return void */ function get_capability_row_for_email($p_caption, $p_message_type) { $t_access_levels = MantisEnum::getValues(config_get('access_levels_enum_string')); echo '<tr><td>' . string_display($p_caption) . '</td>' . "\n"; echo ' <td' . color_notify_flag($p_message_type, 'reporter') . '>' . show_notify_flag($p_message_type, 'reporter') . '</td>' . "\n"; echo ' <td' . color_notify_flag($p_message_type, 'handler') . '>' . show_notify_flag($p_message_type, 'handler') . '</td>' . "\n"; echo ' <td' . color_notify_flag($p_message_type, 'monitor') . '>' . show_notify_flag($p_message_type, 'monitor') . '</td>' . "\n"; echo ' <td' . color_notify_flag($p_message_type, 'bugnotes') . '>' . show_notify_flag($p_message_type, 'bugnotes') . '</td>' . "\n"; echo ' <td' . color_notify_flag($p_message_type, 'category') . '>' . show_notify_flag($p_message_type, 'category') . '</td>' . "\n"; foreach ($t_access_levels as $t_access_level) { echo ' <td' . color_threshold_flag($t_access_level, $p_message_type) . '>' . show_notify_threshold($t_access_level, $p_message_type) . '</td>' . "\n"; } echo '</tr>' . "\n"; }