Bug.pm bug fix + Change in menu structure + misc things

This commit is contained in:
Yorhel 2012-04-10 14:55:07 +02:00
parent d6865e7b42
commit 42c5026131
6 changed files with 60 additions and 45 deletions

1
Bug.pm
View file

@ -250,6 +250,7 @@ sub handleForm {
$f = { %$f, %$fa }; $f = { %$f, %$fa };
return($f, $l) if $f->{_err}; return($f, $l) if $f->{_err};
} else { } else {
push @{$f->{_err}}, [ 'bug_code', 'invalid', '' ] and return($f, undef) if $f->{bug_code} && $f->{bug_code} ne 'code';
$f->{bug_type} = $l->{type}; $f->{bug_type} = $l->{type};
$f->{bug_status} = $l->{status}; $f->{bug_status} = $l->{status};
$f->{bug_closed} = $l->{closed}; $f->{bug_closed} = $l->{closed};

View file

@ -59,5 +59,8 @@ it. L<source|http://p.blicky.net/agolr>
December 2011. Playing around with the Go programming language, I wrote another December 2011. Playing around with the Go programming language, I wrote another
transfer log parser and statistics generator for ncdc. transfer log parser and statistics generator for ncdc.
L<0.3|http://p.blicky.net/h25z8> L<Example output|http://s.blicky.net/2012/ncdc-share-report.html>.
Download: L<0.3|http://p.blicky.net/h25z8>
(L<0.2|http://p.blicky.net/6yx2d>, L<0.1|http://p.blicky.net/ab4lm>). (L<0.2|http://p.blicky.net/6yx2d>, L<0.1|http://p.blicky.net/ab4lm>).

View file

@ -112,6 +112,10 @@ clients, but which ncdc doesn't do. Yet.
=item * Segmented downloading, =item * Segmented downloading,
=item * IPv6
=item * NAT Traversal
=item * OP features (e.g. client detection, file list scanning and other useful stuff for OPs), =item * OP features (e.g. client detection, file list scanning and other useful stuff for OPs),
=item * SOCKS support. =item * SOCKS support.

View file

@ -12,6 +12,7 @@ BEGIN { ($ROOT = abs_path $0) =~ s{index\.cgi$}{}; }
my @changes = ( my @changes = (
[ '2012-04-10', undef, 'Minor site re-style: ncdu/ncdc/tuwf now have their own menu.' ],
[ '2012-03-30', '/dump', 'Updated ncdc-share-report for Go 1' ], [ '2012-03-30', '/dump', 'Updated ncdc-share-report for Go 1' ],
[ '2012-03-24', '/ncdu/bug', 'Moved ncdu bug tracker from sourceforge to this site' ], [ '2012-03-24', '/ncdu/bug', 'Moved ncdu bug tracker from sourceforge to this site' ],
[ '2012-03-17', '/ncdc/bug', 'Wrote a small bug tracker for ncdc' ], [ '2012-03-17', '/ncdc/bug', 'Wrote a small bug tracker for ncdc' ],
@ -248,7 +249,7 @@ sub bug_post {
return $s->htmlFooter; return $s->htmlFooter;
} }
$s->resRedirect("/$p/bug/$l->{bug}", 'post'); $s->resRedirect("/$p/bug/$l->{issue}", 'post');
} }
@ -353,7 +354,6 @@ sub htmlHeader {
div id => 'body'; div id => 'body';
div id => 'uglyhack', ' '; div id => 'uglyhack', ' ';
div id => 'left'; div id => 'left';
h1 class => 'title', '~ Menu ~';
$s->htmlMenu(%o); $s->htmlMenu(%o);
div class => 'notes'; div class => 'notes';
txt 'Yoran Heling'; br; txt 'Yoran Heling'; br;
@ -389,10 +389,13 @@ sub htmlFooter {
sub htmlMenu { sub htmlMenu {
my($s, %o) = @_; my($s, %o) = @_;
my %spec = map +($_,1), qw|ncdu ncdc tuwf|;
h1 class => 'title', "~ \u$o{page} ~" if $spec{$o{page}};
my $m = sub { my $m = sub {
li; li;
a href => $_[0], $_[0]!~/^\//?(class=>'external'):$_[2]?(class=>'menusel'):(), $_[1]; my $s = $_[0] =~ m{^/([^/]+)} && $spec{$1} && $o{page} ne $1;
if($_[2] && $_[3]) { a href => $_[0], $s?(class=>'special'):$_[2]?(class=>'menusel'):(), $_[1];
if($_[3]) {
ul; ul;
$_[3]->(); $_[3]->();
end; end;
@ -400,42 +403,44 @@ sub htmlMenu {
end; end;
}; };
ul; ul;
$m->('/', 'Home', !$o{page}); if($o{page} eq 'ncdu') {
$m->('/ncdu', 'Ncdu', $o{page} eq 'ncdu', sub {
$m->('/ncdu', 'Info', !$o{sec}); $m->('/ncdu', 'Info', !$o{sec});
$m->('/ncdu/man', 'Manual', $o{sec} eq 'man'); $m->('/ncdu/man', 'Manual', $o{sec} eq 'man');
$m->('/ncdu/changes', 'Changelog', $o{sec} eq 'changes'); $m->('/ncdu/changes', 'Changelog', $o{sec} eq 'changes');
$m->('/ncdu/scr', 'Screenshots', $o{sec} eq 'scr'); $m->('/ncdu/scr', 'Screenshots', $o{sec} eq 'scr');
$m->('/ncdu/bug', 'Bug tracker', $o{sec} eq 'bug'); $m->('/ncdu/bug', 'Bug tracker', $o{sec} eq 'bug');
}); } elsif($o{page} eq 'ncdc') {
$m->('/ncdc', 'Ncdc', $o{page} eq 'ncdc', sub {
$m->('/ncdc', 'Info', !$o{sec}); $m->('/ncdc', 'Info', !$o{sec});
$m->('/ncdc/faq', 'Q&A', $o{sec} eq 'faq'); $m->('/ncdc/faq', 'Q&A', $o{sec} eq 'faq');
$m->('/ncdc/man', 'Manual', $o{sec} eq 'man'); $m->('/ncdc/man', 'Manual', $o{sec} eq 'man');
$m->('/ncdc/changes', 'Changelog', $o{sec} eq 'changes'); $m->('/ncdc/changes', 'Changelog', $o{sec} eq 'changes');
$m->('/ncdc/scr', 'Screenshots', $o{sec} eq 'scr'); $m->('/ncdc/scr', 'Screenshots', $o{sec} eq 'scr');
$m->('/ncdc/bug', 'Bug tracker', $o{sec} eq 'bug'); $m->('/ncdc/bug', 'Bug tracker', $o{sec} eq 'bug');
}); } elsif($o{page} eq 'tuwf') {
$m->('/tuwf', 'Tuwf', $o{page} eq 'tuwf', sub {
$m->('/tuwf', 'Info', !$o{sec}); $m->('/tuwf', 'Info', !$o{sec});
$m->('/tuwf/man', 'Manual', $o{sec} eq 'man', sub { $m->('/tuwf/man', 'Manual', $o{sec} eq 'man', sub {
$m->('/tuwf/man', 'Main', !$o{sec2}); $m->('/tuwf/man', 'Main', $o{sec} eq 'man' && !$o{sec2});
$m->('/tuwf/man/db', '::DB', $o{sec2} eq 'db'); $m->('/tuwf/man/db', '::DB', $o{sec} eq 'man' && $o{sec2} eq 'db');
$m->('/tuwf/man/misc', '::Misc', $o{sec2} eq 'misc'); $m->('/tuwf/man/misc', '::Misc', $o{sec} eq 'man' && $o{sec2} eq 'misc');
$m->('/tuwf/man/request', '::Request', $o{sec2} eq 'request'); $m->('/tuwf/man/request', '::Request', $o{sec} eq 'man' && $o{sec2} eq 'request');
$m->('/tuwf/man/response', '::Response', $o{sec2} eq 'response'); $m->('/tuwf/man/response', '::Response', $o{sec} eq 'man' && $o{sec2} eq 'response');
$m->('/tuwf/man/xml', '::XML', $o{sec2} eq 'xml'); $m->('/tuwf/man/xml', '::XML', $o{sec} eq 'man' && $o{sec2} eq 'xml');
}); });
$m->('/tuwf/changes', 'Changelog', $o{sec} eq 'changes'); $m->('/tuwf/changes', 'Changelog', $o{sec} eq 'changes');
}); } else {
$m->('/', 'Home', !$o{page});
$m->('/ncdu', 'Ncdu ');
$m->('/ncdc', 'Ncdc ');
$m->('/tuwf', 'Tuwf ');
$m->('/doc', 'Articles', $o{page} eq 'doc'); $m->('/doc', 'Articles', $o{page} eq 'doc');
$m->('/dump', 'Code dump', $o{page} eq 'dump', sub { $m->('/dump', 'Code dump', $o{page} eq 'dump', $o{page} eq 'dump' && sub {
$m->('/dump', 'Misc.', !$o{sec}); $m->('/dump', 'Misc.', !$o{sec});
$m->('/demo', 'Demos', $o{sec} eq 'demo'); $m->('/demo', 'Demos', $o{sec} eq 'demo');
$m->('/dump/awshrink','AWShrink', $o{sec} eq 'awshrink'); $m->('/dump/awshrink','AWShrink', $o{sec} eq 'awshrink');
$m->('/dump/grenamr', 'Grenamr', $o{sec} eq 'grenamr'); $m->('/dump/grenamr', 'Grenamr', $o{sec} eq 'grenamr');
$m->('/dump/nccolour','NC-Colour', $o{sec} eq 'nccolour'); $m->('/dump/nccolour','NC-Colour', $o{sec} eq 'nccolour');
}); });
}
end; end;
} }

View file

@ -1,4 +1,6 @@
User-Agent: * User-Agent: *
Disallow: /download Disallow: /download
Disallow: /dat Disallow: /dat
Disallow: /ncdc/bug
Disallow: /ncdu/bug

View file

@ -16,18 +16,18 @@ html,body { background: #ccc; text-align: center; height: 100% }
#body { text-align: left; width: 800px; margin: 0 auto; background: #fff; border-left: 1px solid #aaa; border-right: 1px solid #aaa; min-height: 100% } #body { text-align: left; width: 800px; margin: 0 auto; background: #fff; border-left: 1px solid #aaa; border-right: 1px solid #aaa; min-height: 100% }
#uglyhack { height: 30px } #uglyhack { height: 30px }
#main, #left { float: left; border-top: 0px dashed #aaa, margin-top: 50px } #main, #left { float: left; border-top: 0px dashed #aaa, margin-top: 50px }
#left { width: 130px; border-right: 1px dashed #aaa; padding: 20px 10px; margin-bottom: 30px } #left { width: 110px; border-right: 1px dashed #aaa; padding: 20px 10px; margin-bottom: 30px }
#main { width: 609px; padding: 12px 20px 30px 20px } #main { width: 629px; padding: 12px 20px 30px 20px }
#footer { clear: left; width: 150px; margin: 0 0 0 324px; border-top: 1px dashed #aaa; height: 20px; text-align: center } #footer { clear: left; width: 150px; margin: 0 0 0 324px; border-top: 1px dashed #aaa; height: 20px; text-align: center }
#footer p { position: relative; top: -10px; padding: 0; background: #fff; display: inline; color: #aaa } #footer p { position: relative; top: -10px; padding: 0; background: #fff; display: inline; color: #aaa }
#left h1 { font-weight: bold; text-align: center; font-size: 15px } #left h1 { font-weight: bold; text-align: center; font-size: 15px; margin-bottom: 20px }
#left li { margin: 20px 0 0 10px; list-style-type: none } #left li { margin: 0 0 20px 10px; list-style-type: none }
#left li a { text-decoration: none; display: block; width: 120px; border-bottom: 1px solid #fff } #left li a { text-decoration: none; display: block; width: 100px; border-bottom: 1px solid #fff }
#left li a:hover { border-bottom: 1px dashed #aaa } #left li a:hover { border-bottom: 1px dashed #aaa }
#left li li { margin-top: 10px } #left li li { margin-top: 10px }
#left li li a { width: 110px } #left li li a { width: 90px }
#left li li li { margin-top: 2px } #left li li li { margin-top: 2px }
#left li li li a { width: 100px } #left li li li a { width: 80px }
#left .menusel { color: #03a } #left .menusel { color: #03a }
#left .notes { margin-top: 50px; text-align: center } #left .notes { margin-top: 50px; text-align: center }
#left .notes, #left .notes a { font-size: 12px; text-decoration: none } #left .notes, #left .notes a { font-size: 12px; text-decoration: none }
@ -37,7 +37,7 @@ img.right { float: right; margin: 0 0 5px 10px }
.indexgroup li { list-style-type: none; margin-left: 0px } .indexgroup li { list-style-type: none; margin-left: 0px }
.indexgroup li li { margin-left: 20px } .indexgroup li li { margin-left: 20px }
.indexgroup + .dummyTopAnchor + p { margin-top: 20px } .indexgroup + .dummyTopAnchor + p { margin-top: 20px }
a.external:after { content: url(/img/external.gif) } a.special:after { content: url(/img/external.gif) }
b { font-weight: bold } b { font-weight: bold }
h1.title { margin-top: 0; font-size: 25px } h1.title { margin-top: 0; font-size: 25px }
h1 { margin-top: 50px; } h1 { margin-top: 50px; }