# HG changeset patch # User devi # Date 1139607324 -7200 # Node ID 58ea78973bbb19acec563ad85d02f27c8f9b62e2 # Parent a10db759e5872c0e241cd06b9b584c964ec3984f Вывод таблицы с командами переведён на div'ы. Наведён относительный порядок с таблицами стилей. Если прошло > 1 часа, временной интервал выводится в часах diff -r a10db759e587 -r 58ea78973bbb l3-frontend --- a/l3-frontend Thu Feb 09 18:47:04 2006 +0200 +++ b/l3-frontend Fri Feb 10 23:35:24 2006 +0200 @@ -567,7 +567,7 @@ my $table_caption = "Таблица ".$table_number++.". ".$Day_Name[$last_wday].". Новые ".$new_entries_of{$entry_class}; if ($new_commands_section) { - $result .= "" + $result .= "
" . "" . "" . $new_commands_section @@ -576,9 +576,9 @@ } @known_commands = keys %CommandsFDistribution; - $result .= "
$table_caption
КомандаОписание
\n"; + #$result .= "
\n"; $result .= $this_day_result; - $result .= "
"; + #$result .= ""; } push @toc, "".$Day_Name[$wday]."\n"; @@ -586,13 +586,25 @@ $last_wday=$wday; $this_day_result = q(); } + elsif ($seconds_since_last_command > 7200) { + my $hours_passed = int($seconds_since_last_command/3600); + my $passed_word = $minutes_passed % 10 == 1 ? "прошла" + : "прошло"; + my $hours_word = $hours_passed % 10 == 1 ? "часа": + "часов"; + $this_day_result .= "
" + . $passed_word." >".$hours_passed." ".$hours_word + . "
\n"; + } elsif ($seconds_since_last_command > 600) { - my $height = $seconds_since_last_command > 1200 ? 100: 60; my $minutes_passed = int($seconds_since_last_command/60); - my $passed_word = $minutes_passed % 10 == 1 ? "прошла" - : "прошло"; + my $passed_word = $minutes_passed % 100 > 10 + && $minutes_passed % 100 < 20 ? "прошло" + : $minutes_passed % 10 == 1 ? "прошла" + : "прошло"; + my $minutes_word = $minutes_passed % 100 > 10 && $minutes_passed % 100 < 20 ? "минут" : $minutes_passed % 10 == 1 ? "минута": @@ -600,32 +612,38 @@ $minutes_passed % 10 > 4 ? "минут" : "минуты"; - $this_day_result .= "" - . "" - . "" + if ($seconds_since_last_command < 1800) { + $this_day_result .= "
" . $passed_word." ".$minutes_passed." ".$minutes_word - . "" - . "\n"; + . "
\n"; + } + else { + $this_day_result .= "
" + . $passed_word." ".$minutes_passed." ".$minutes_word + . "
\n"; + } } - $this_day_result .= "\n"; + #$this_day_result .= "\n"; + $this_day_result .= "
\n"; # CONSOLE CHANGE - if ( $last_tty ne $cl->{"tty"}) { + if ( $last_tty ne $cl->{"tty"} && 0) { my $tty = $cl->{"tty"}; - $this_day_result .= "
"; + .""; $last_tty=$cl->{"tty"}; } # TIME - $this_day_result .= $Config{"show_time"} =~ /^y/i - ? "" - : "" + # : "
" - ."
" + $this_day_result .= "
" . $tty - ."
" - ."
$hour:$min:$sec"; + $this_day_result .= "
$hour:$min:$sec
" + if $Config{"show_time"} =~ /^y/i; + + #$this_day_result .= $Config{"show_time"} =~ /^y/i + # ? "
$hour:$min:$sec"; # CLASS # if ($cl->{"err"}) { @@ -651,10 +669,12 @@ $cline = "$cline" if $hint; $cline = "$cline" if !$hint; - $this_day_result .= "\n"; - $this_day_result .= "
\n" . $cline ;
-        $this_day_result .= " " if $cl->{"err"};
-        $this_day_result .= "
\n"; + $this_day_result .= "\n"; - $this_day_result .= "\n"; + $this_day_result .= "\n"; # cblock + $this_day_result .= "
\n
\n"; + $this_day_result .= "
\n" . $cline ; #cline + $this_day_result .= "\n" + . "\n" + . "\n" if $cl->{"err"}; + $this_day_result .= "
\n"; #cline # OUTPUT my $last_command = $cl->{"last_command"}; @@ -663,15 +683,12 @@ $Config{"suppress_pagers"} =~ /^y/i && grep ($_ eq $last_command, @{$Config{"pagers"}}) || $Config{"suppress_terminal"}=~ /^y/i && grep ($_ eq $last_command, @{$Config{"terminal"}}) )) { - $this_day_result .= "
" . $output . "
\n"; + $this_day_result .= "
\n" . $output . "
\n"; } # DIFF - if ( $Config{"show_diffs"} =~ /^y/i && $cl->{"diff"}) { - $this_day_result .= "
"
-                    .  $cl->{"diff"}
-                    .  "
"; - } + $this_day_result .= "
".$cl->{"diff"}."
" + if ( $Config{"show_diffs"} =~ /^y/i && $cl->{"diff"}); #NOTES if ( $Config{"show_notes"} =~ /^y/i && $cl->{"note"}) { @@ -680,29 +697,29 @@ if (not $note =~ s@(http:[a-zA-Z.0-9/_?%-]*)@$1@g) { $note =~ s@(www\.[a-zA-Z.0-9/_?%-]*)@$1@g; }; - # Ширину пока не используем - # $this_day_result .= ""; - $this_day_result .= "
"; - $this_day_result .= "" if $cl->{note_title}; - $this_day_result .= ""; - $this_day_result .= "
".$cl->{note_title}."
".$note."
\n"; + $this_day_result .= "
"; + $this_day_result .= "
".$cl->{note_title}."
" if $cl->{note_title}; + $this_day_result .= "
".$note."
"; + $this_day_result .= "
\n"; } # COMMENT if ( $Config{"show_comments"} =~ /^y/i) { my $comment = make_comment($cl->{"cline"}); if ($comment) { - $this_day_result .= "
" - . "" + $this_day_result .= + "
" . $comment - . "
\n" - . "
"; + . "
\n" + ; + } } # Вывод очередной команды окончен - $this_day_result .= "
\n" + . "\n"; # command } last: { $result .= "

".$Day_Name[$last_wday]."

"; @@ -723,9 +740,9 @@ } - $result .= "\n"; + #$result .= "
\n"; $result .= $this_day_result; - $result .= "
"; + #$result .= "
"; } return ($result, collapse_list (\@toc)); diff -r a10db759e587 -r 58ea78973bbb l3config.pm --- a/l3config.pm Thu Feb 09 18:47:04 2006 +0200 +++ b/l3config.pm Fri Feb 10 23:35:24 2006 +0200 @@ -74,7 +74,7 @@ comment_width => "300", note_width => "500", - time_width => "60", + time_width => "6em", "mode" => "daemon", # daemon | normal "daemon_sleep_interval" => "10",