@@ -133,6 +133,12 @@ sub evaluate_uri {
133
133
# (only effective if this variable evaluates to true)
134
134
our $export_ok = " ++GITWEB_EXPORT_OK++" ;
135
135
136
+ # don't generate age column on the projects list page
137
+ our $omit_age_column = 0;
138
+
139
+ # don't generate information about owners of repositories
140
+ our $omit_owner =0;
141
+
136
142
# show repository only if this subroutine returns true
137
143
# when given the path to the project, for example:
138
144
# sub { return -e "$_[0]/git-daemon-export-ok"; }
@@ -5612,11 +5618,15 @@ sub git_project_list_rows {
5612
5618
? esc_html_match_hl_chopped($pr -> {' descr_long' },
5613
5619
$pr -> {' descr' }, $search_regexp )
5614
5620
: esc_html($pr -> {' descr' })) .
5615
- " </td>\n " .
5616
- " <td><i>" . chop_and_escape_str($pr -> {' owner' }, 15) . " </i></td>\n " ;
5617
- print " <td class=\" " . age_class($pr -> {' age' }) . " \" >" .
5618
- (defined $pr -> {' age_string' } ? $pr -> {' age_string' } : " No commits" ) . " </td>\n " .
5619
- " <td class=\" link\" >" .
5621
+ " </td>\n " ;
5622
+ unless ($omit_owner ) {
5623
+ print " <td><i>" . chop_and_escape_str($pr -> {' owner' }, 15) . " </i></td>\n " ;
5624
+ }
5625
+ unless ($omit_age_column ) {
5626
+ print " <td class=\" " . age_class($pr -> {' age' }) . " \" >" .
5627
+ (defined $pr -> {' age_string' } ? $pr -> {' age_string' } : " No commits" ) . " </td>\n " ;
5628
+ }
5629
+ print " <td class=\" link\" >" .
5620
5630
$cgi -> a({-href => href(project => $pr -> {' path' }, action => " summary" )}, " summary" ) . " | " .
5621
5631
$cgi -> a({-href => href(project => $pr -> {' path' }, action => " shortlog" )}, " shortlog" ) . " | " .
5622
5632
$cgi -> a({-href => href(project => $pr -> {' path' }, action => " log" )}, " log" ) . " | " .
@@ -5647,7 +5657,10 @@ sub git_project_list_body {
5647
5657
' tagfilter' => $tagfilter )
5648
5658
if ($tagfilter || $search_regexp );
5649
5659
# fill the rest
5650
- @projects = fill_project_list_info(\@projects );
5660
+ my @all_fields = (' descr' , ' descr_long' , ' ctags' , ' category' );
5661
+ push @all_fields , (' age' , ' age_string' ) unless ($omit_age_column );
5662
+ push @all_fields , ' owner' unless ($omit_owner );
5663
+ @projects = fill_project_list_info(\@projects , @all_fields );
5651
5664
5652
5665
$order ||= $default_projects_order ;
5653
5666
$from = 0 unless defined $from ;
@@ -5678,8 +5691,8 @@ sub git_project_list_body {
5678
5691
}
5679
5692
print_sort_th(' project' , $order , ' Project' );
5680
5693
print_sort_th(' descr' , $order , ' Description' );
5681
- print_sort_th(' owner' , $order , ' Owner' );
5682
- print_sort_th(' age' , $order , ' Last Change' );
5694
+ print_sort_th(' owner' , $order , ' Owner' ) unless $omit_owner ;
5695
+ print_sort_th(' age' , $order , ' Last Change' ) unless $omit_age_column ;
5683
5696
print " <th></th>\n " . # for links
5684
5697
" </tr>\n " ;
5685
5698
}
@@ -6432,8 +6445,10 @@ sub git_summary {
6432
6445
6433
6446
print " <div class=\" title\" > </div>\n " ;
6434
6447
print " <table class=\" projects_list\" >\n " .
6435
- " <tr id=\" metadata_desc\" ><td>description</td><td>" . esc_html($descr ) . " </td></tr>\n " .
6436
- " <tr id=\" metadata_owner\" ><td>owner</td><td>" . esc_html($owner ) . " </td></tr>\n " ;
6448
+ " <tr id=\" metadata_desc\" ><td>description</td><td>" . esc_html($descr ) . " </td></tr>\n " ;
6449
+ unless ($omit_owner ) {
6450
+ print " <tr id=\" metadata_owner\" ><td>owner</td><td>" . esc_html($owner ) . " </td></tr>\n " ;
6451
+ }
6437
6452
if (defined $cd {' rfc2822' }) {
6438
6453
print " <tr id=\" metadata_lchange\" ><td>last change</td>" .
6439
6454
" <td>" .format_timestamp_html(\%cd )." </td></tr>\n " ;
0 commit comments