@@ -136,6 +136,9 @@ sub evaluate_uri {
136
136
# don't generate age column on the projects list page
137
137
our $omit_age_column = 0;
138
138
139
+ # don't generate information about owners of repositories
140
+ our $omit_owner =0;
141
+
139
142
# show repository only if this subroutine returns true
140
143
# when given the path to the project, for example:
141
144
# sub { return -e "$_[0]/git-daemon-export-ok"; }
@@ -5465,8 +5468,10 @@ sub git_project_list_rows {
5465
5468
? esc_html_match_hl_chopped($pr -> {' descr_long' },
5466
5469
$pr -> {' descr' }, $search_regexp )
5467
5470
: esc_html($pr -> {' descr' })) .
5468
- " </td>\n " .
5469
- " <td><i>" . chop_and_escape_str($pr -> {' owner' }, 15) . " </i></td>\n " ;
5471
+ " </td>\n " ;
5472
+ unless ($omit_owner ) {
5473
+ print " <td><i>" . chop_and_escape_str($pr -> {' owner' }, 15) . " </i></td>\n " ;
5474
+ }
5470
5475
unless ($omit_age_column ) {
5471
5476
print " <td class=\" " . age_class($pr -> {' age' }) . " \" >" .
5472
5477
(defined $pr -> {' age_string' } ? $pr -> {' age_string' } : " No commits" ) . " </td>\n " ;
@@ -5502,7 +5507,9 @@ sub git_project_list_body {
5502
5507
' tagfilter' => $tagfilter )
5503
5508
if ($tagfilter || $search_regexp );
5504
5509
# fill the rest
5505
- my @all_fields = $omit_age_column ? (' descr' , ' descr_long' , ' owner' , ' ctags' , ' category' ) : ();
5510
+ my @all_fields = (' descr' , ' descr_long' , ' ctags' , ' category' );
5511
+ push @all_fields , (' age' , ' age_string' ) unless ($omit_age_column );
5512
+ push @all_fields , ' owner' unless ($omit_owner );
5506
5513
@projects = fill_project_list_info(\@projects , @all_fields );
5507
5514
5508
5515
$order ||= $default_projects_order ;
@@ -5534,7 +5541,7 @@ sub git_project_list_body {
5534
5541
}
5535
5542
print_sort_th(' project' , $order , ' Project' );
5536
5543
print_sort_th(' descr' , $order , ' Description' );
5537
- print_sort_th(' owner' , $order , ' Owner' );
5544
+ print_sort_th(' owner' , $order , ' Owner' ) unless $omit_owner ;
5538
5545
print_sort_th(' age' , $order , ' Last Change' ) unless $omit_age_column ;
5539
5546
print " <th></th>\n " . # for links
5540
5547
" </tr>\n " ;
@@ -6288,8 +6295,10 @@ sub git_summary {
6288
6295
6289
6296
print " <div class=\" title\" > </div>\n " ;
6290
6297
print " <table class=\" projects_list\" >\n " .
6291
- " <tr id=\" metadata_desc\" ><td>description</td><td>" . esc_html($descr ) . " </td></tr>\n " .
6292
- " <tr id=\" metadata_owner\" ><td>owner</td><td>" . esc_html($owner ) . " </td></tr>\n " ;
6298
+ " <tr id=\" metadata_desc\" ><td>description</td><td>" . esc_html($descr ) . " </td></tr>\n " ;
6299
+ unless ($omit_owner ) {
6300
+ print " <tr id=\" metadata_owner\" ><td>owner</td><td>" . esc_html($owner ) . " </td></tr>\n " ;
6301
+ }
6293
6302
if (defined $cd {' rfc2822' }) {
6294
6303
print " <tr id=\" metadata_lchange\" ><td>last change</td>" .
6295
6304
" <td>" .format_timestamp_html(\%cd )." </td></tr>\n " ;
0 commit comments