function display_bug($p_event, $p_bug_id) { require_once 'Source.ViewAPI.php'; $t_project_id = bug_get_field($p_bug_id, 'project_id'); $t_view_threshold = config_get('plugin_Source_view_threshold'); if (!access_has_project_level($t_view_threshold, $t_project_id)) { return; } $t_changesets = $this->changesets; if (count($t_changesets) < 1) { return; } collapse_open('Source'); ?> <br/> <a name="changesets"/> <table class="width100" cellspacing="1"> <tr> <td class="form-title"><?php collapse_icon('Source'); echo plugin_lang_get('related_changesets', 'Source'); ?> </td> </tr> <?php Source_View_Changesets($t_changesets); ?> </table> <?php collapse_closed('Source'); ?> <br/> <table class="width100" cellspacing="1"> <tr> <td class="form-title"><?php collapse_icon('Source'); echo plugin_lang_get('related_changesets', 'Source'); ?> </td> </tr> </table> <?php collapse_end('Source'); }
<tr> <td class="form-title" colspan="2"><?php echo plugin_lang_get('search_changesets'); ?> </td> <td class="right" colspan="2"> <?php print_bracket_link(plugin_page('search') . $t_permalink, plugin_lang_get('permalink')); print_bracket_link(plugin_page('search_page') . $t_permalink, plugin_lang_get('modify_search')); print_bracket_link(plugin_page('search_page'), plugin_lang_get('new_search')); ?> </td> </tr> <?php Source_View_Changesets($t_changesets, $t_repos); ?> <tr> <td colspan="4" class="center"> <?php #PAGINATION if ($t_count > $f_perpage) { $t_pages = ceil($t_count / $f_perpage); $t_block = max(5, min(20, ceil($t_pages / 6))); $t_current = $f_offset; $t_page_set = array(); $t_page_link_body = "if ( is_null( \$t ) ) { \$t = \$p; }\n\t\treturn ( is_null( \$p ) ? '...' : ( \$p == {$t_current} ? \"<strong>\$p</strong>\" :\n\t\t'<a href=\"' . plugin_page( 'search' ) . '&offset=' . \$p . '{$t_permalink}' . '\">' . \$t . '</a>' ) );"; $t_page_link = create_function('$p, $t=null', $t_page_link_body) or die('gah'); if ($t_pages > 15) {
</td> <td class="right" colspan="2"> <?php if (access_has_global_level(plugin_config_get('manage_threshold'))) { print_bracket_link(plugin_page('repo_manage_page') . '&id=' . $t_repo->id, plugin_lang_get('manage')); } if ($t_url = $t_vcs->url_repo($t_repo)) { print_bracket_link($t_url, plugin_lang_get('browse')); } print_bracket_link(plugin_page('index'), plugin_lang_get('back')); ?> </td> </tr> <?php Source_View_Changesets($t_changesets, array($t_repo->id => $t_repo), false); ?> <tr> <td colspan="4" class="center"> <?php #PAGINATION $t_count = $t_stats['changesets']; if ($t_count > $f_perpage) { $t_pages = ceil($t_count / $f_perpage); $t_block = max(5, min(20, ceil($t_pages / 6))); $t_current = $f_offset; $t_page_set = array(); $t_page_link_body = "if ( is_null( \$t ) ) { \$t = \$p; }\n\t\treturn ( is_null( \$p ) ? '...' : ( \$p == {$t_current} ? \"<strong>\$p</strong>\" :\n\t\t'<a href=\"' . plugin_page( 'list' ) . '&id={$t_repo->id}' . '&offset=' . \$p . '\">' . \$t . '</a>' ) );"; $t_page_link = create_function('$p, $t=null', $t_page_link_body) or die('gah');