X-Git-Url: https://git.ladys.computer/Gitweb/blobdiff_plain/9ce9037e27bd821d2e70218588f6f0e673630acda5b2462742cdbb91d518ea60..435037d8cf5dce5ee0f25d4ba5866925489f7045b310f29dc43c6f32523d672f:/gitweb.perl diff --git a/gitweb.perl b/gitweb.perl index 0ac67c9..6231f15 100755 --- a/gitweb.perl +++ b/gitweb.perl @@ -134,6 +134,9 @@ our $default_projects_order = "project"; # (only effective if this variable evaluates to true) our $export_ok = "++GITWEB_EXPORT_OK++"; +# don't generate age column on the projects list page +our $omit_age_column = 0; + # show repository only if this subroutine returns true # when given the path to the project, for example: # sub { return -e "$_[0]/git-daemon-export-ok"; } @@ -5615,9 +5618,11 @@ sub git_project_list_rows { : esc_html($pr->{'descr'})) . "\n" . "" . chop_and_escape_str($pr->{'owner'}, 15) . "\n"; - print "{'age'}) . "\">" . - (defined $pr->{'age_string'} ? $pr->{'age_string'} : "No commits") . "\n" . - "" . + unless ($omit_age_column) { + print "{'age'}) . "\">" . + (defined $pr->{'age_string'} ? $pr->{'age_string'} : "No commits") . "\n"; + } + print"" . $cgi->a({-href => href(project=>$pr->{'path'}, action=>"summary")}, "summary") . " | " . $cgi->a({-href => href(project=>$pr->{'path'}, action=>"shortlog")}, "shortlog") . " | " . $cgi->a({-href => href(project=>$pr->{'path'}, action=>"log")}, "log") . " | " . @@ -5648,7 +5653,8 @@ sub git_project_list_body { 'tagfilter' => $tagfilter) if ($tagfilter || $search_regexp); # fill the rest - @projects = fill_project_list_info(\@projects); + my @all_fields = $omit_age_column ? ('descr', 'descr_long', 'owner', 'ctags', 'category') : (); + @projects = fill_project_list_info(\@projects, @all_fields); $order ||= $default_projects_order; $from = 0 unless defined $from; @@ -5680,7 +5686,7 @@ sub git_project_list_body { print_sort_th('project', $order, 'Project'); print_sort_th('descr', $order, 'Description'); print_sort_th('owner', $order, 'Owner'); - print_sort_th('age', $order, 'Last Change'); + print_sort_th('age', $order, 'Last Change') unless $omit_age_column; print "\n" . # for links "\n"; }