Only switch on the line number toggle when highlighting is activated

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
This commit is contained in:
Johannes Schindelin 2011-09-25 10:23:29 +02:00
parent 458d6ffd0a
commit 610631e49c

View file

@ -4267,7 +4267,8 @@ sub git_print_page_path {
print $cgi->a({-href => href(action=>"blob_plain", file_name=>$file_name,
hash_base=>$hb),
-title => $name}, esc_path($basename));
print '&nbsp;&nbsp;&nbsp;&nbsp;
if (gitweb_check_feature('highlight')) {
print '&nbsp;&nbsp;&nbsp;&nbsp;
<a id="lineNoToggle" href="#" onclick="toggleLineNumbers();"></a>
<script>
function toggleLineNumbers() {
@ -4288,6 +4289,7 @@ sub git_print_page_path {
toggleLineNumbers();
</script>
';
}
} elsif (defined $type && $type eq 'tree') {
print $cgi->a({-href => href(action=>"tree", file_name=>$file_name,
hash_base=>$hb),