@@ -133,6 +133,12 @@ sub evaluate_uri {
133133# (only effective if this variable evaluates to true)
134134our $export_ok = " ++GITWEB_EXPORT_OK++" ;
135135
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+
136142# show repository only if this subroutine returns true
137143# when given the path to the project, for example:
138144# sub { return -e "$_[0]/git-daemon-export-ok"; }
@@ -5612,11 +5618,15 @@ sub git_project_list_rows {
56125618 ? esc_html_match_hl_chopped($pr -> {' descr_long' },
56135619 $pr -> {' descr' }, $search_regexp )
56145620 : 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\" >" .
56205630 $cgi -> a({-href => href(project => $pr -> {' path' }, action => " summary" )}, " summary" ) . " | " .
56215631 $cgi -> a({-href => href(project => $pr -> {' path' }, action => " shortlog" )}, " shortlog" ) . " | " .
56225632 $cgi -> a({-href => href(project => $pr -> {' path' }, action => " log" )}, " log" ) . " | " .
@@ -5647,7 +5657,10 @@ sub git_project_list_body {
56475657 ' tagfilter' => $tagfilter )
56485658 if ($tagfilter || $search_regexp );
56495659 # 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 );
56515664
56525665 $order ||= $default_projects_order ;
56535666 $from = 0 unless defined $from ;
@@ -5678,8 +5691,8 @@ sub git_project_list_body {
56785691 }
56795692 print_sort_th(' project' , $order , ' Project' );
56805693 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 ;
56835696 print " <th></th>\n " . # for links
56845697 " </tr>\n " ;
56855698 }
@@ -6432,8 +6445,10 @@ sub git_summary {
64326445
64336446 print " <div class=\" title\" > </div>\n " ;
64346447 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+ }
64376452 if (defined $cd {' rfc2822' }) {
64386453 print " <tr id=\" metadata_lchange\" ><td>last change</td>" .
64396454 " <td>" .format_timestamp_html(\%cd )." </td></tr>\n " ;
0 commit comments