Bug.pm bug fix + Change in menu structure + misc things
This commit is contained in:
parent
d6865e7b42
commit
42c5026131
6 changed files with 60 additions and 45 deletions
77
index.cgi
77
index.cgi
|
|
@ -12,6 +12,7 @@ BEGIN { ($ROOT = abs_path $0) =~ s{index\.cgi$}{}; }
|
|||
|
||||
|
||||
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-24', '/ncdu/bug', 'Moved ncdu bug tracker from sourceforge to this site' ],
|
||||
[ '2012-03-17', '/ncdc/bug', 'Wrote a small bug tracker for ncdc' ],
|
||||
|
|
@ -248,7 +249,7 @@ sub bug_post {
|
|||
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 => 'uglyhack', ' ';
|
||||
div id => 'left';
|
||||
h1 class => 'title', '~ Menu ~';
|
||||
$s->htmlMenu(%o);
|
||||
div class => 'notes';
|
||||
txt 'Yoran Heling'; br;
|
||||
|
|
@ -389,10 +389,13 @@ sub htmlFooter {
|
|||
|
||||
sub htmlMenu {
|
||||
my($s, %o) = @_;
|
||||
my %spec = map +($_,1), qw|ncdu ncdc tuwf|;
|
||||
h1 class => 'title', "~ \u$o{page} ~" if $spec{$o{page}};
|
||||
my $m = sub {
|
||||
li;
|
||||
a href => $_[0], $_[0]!~/^\//?(class=>'external'):$_[2]?(class=>'menusel'):(), $_[1];
|
||||
if($_[2] && $_[3]) {
|
||||
my $s = $_[0] =~ m{^/([^/]+)} && $spec{$1} && $o{page} ne $1;
|
||||
a href => $_[0], $s?(class=>'special'):$_[2]?(class=>'menusel'):(), $_[1];
|
||||
if($_[3]) {
|
||||
ul;
|
||||
$_[3]->();
|
||||
end;
|
||||
|
|
@ -400,42 +403,44 @@ sub htmlMenu {
|
|||
end;
|
||||
};
|
||||
ul;
|
||||
$m->('/', 'Home', !$o{page});
|
||||
$m->('/ncdu', 'Ncdu', $o{page} eq 'ncdu', sub {
|
||||
$m->('/ncdu', 'Info', !$o{sec});
|
||||
$m->('/ncdu/man', 'Manual', $o{sec} eq 'man');
|
||||
$m->('/ncdu/changes', 'Changelog', $o{sec} eq 'changes');
|
||||
$m->('/ncdu/scr', 'Screenshots', $o{sec} eq 'scr');
|
||||
$m->('/ncdu/bug', 'Bug tracker', $o{sec} eq 'bug');
|
||||
});
|
||||
$m->('/ncdc', 'Ncdc', $o{page} eq 'ncdc', sub {
|
||||
$m->('/ncdc', 'Info', !$o{sec});
|
||||
$m->('/ncdc/faq', 'Q&A', $o{sec} eq 'faq');
|
||||
$m->('/ncdc/man', 'Manual', $o{sec} eq 'man');
|
||||
$m->('/ncdc/changes', 'Changelog', $o{sec} eq 'changes');
|
||||
$m->('/ncdc/scr', 'Screenshots', $o{sec} eq 'scr');
|
||||
$m->('/ncdc/bug', 'Bug tracker', $o{sec} eq 'bug');
|
||||
});
|
||||
$m->('/tuwf', 'Tuwf', $o{page} eq 'tuwf', sub {
|
||||
if($o{page} eq 'ncdu') {
|
||||
$m->('/ncdu', 'Info', !$o{sec});
|
||||
$m->('/ncdu/man', 'Manual', $o{sec} eq 'man');
|
||||
$m->('/ncdu/changes', 'Changelog', $o{sec} eq 'changes');
|
||||
$m->('/ncdu/scr', 'Screenshots', $o{sec} eq 'scr');
|
||||
$m->('/ncdu/bug', 'Bug tracker', $o{sec} eq 'bug');
|
||||
} elsif($o{page} eq 'ncdc') {
|
||||
$m->('/ncdc', 'Info', !$o{sec});
|
||||
$m->('/ncdc/faq', 'Q&A', $o{sec} eq 'faq');
|
||||
$m->('/ncdc/man', 'Manual', $o{sec} eq 'man');
|
||||
$m->('/ncdc/changes', 'Changelog', $o{sec} eq 'changes');
|
||||
$m->('/ncdc/scr', 'Screenshots', $o{sec} eq 'scr');
|
||||
$m->('/ncdc/bug', 'Bug tracker', $o{sec} eq 'bug');
|
||||
} elsif($o{page} eq 'tuwf') {
|
||||
$m->('/tuwf', 'Info', !$o{sec});
|
||||
$m->('/tuwf/man', 'Manual', $o{sec} eq 'man', sub {
|
||||
$m->('/tuwf/man', 'Main', !$o{sec2});
|
||||
$m->('/tuwf/man/db', '::DB', $o{sec2} eq 'db');
|
||||
$m->('/tuwf/man/misc', '::Misc', $o{sec2} eq 'misc');
|
||||
$m->('/tuwf/man/request', '::Request', $o{sec2} eq 'request');
|
||||
$m->('/tuwf/man/response', '::Response', $o{sec2} eq 'response');
|
||||
$m->('/tuwf/man/xml', '::XML', $o{sec2} eq 'xml');
|
||||
$m->('/tuwf/man', 'Main', $o{sec} eq 'man' && !$o{sec2});
|
||||
$m->('/tuwf/man/db', '::DB', $o{sec} eq 'man' && $o{sec2} eq 'db');
|
||||
$m->('/tuwf/man/misc', '::Misc', $o{sec} eq 'man' && $o{sec2} eq 'misc');
|
||||
$m->('/tuwf/man/request', '::Request', $o{sec} eq 'man' && $o{sec2} eq 'request');
|
||||
$m->('/tuwf/man/response', '::Response', $o{sec} eq 'man' && $o{sec2} eq 'response');
|
||||
$m->('/tuwf/man/xml', '::XML', $o{sec} eq 'man' && $o{sec2} eq 'xml');
|
||||
});
|
||||
$m->('/tuwf/changes', 'Changelog', $o{sec} eq 'changes');
|
||||
});
|
||||
$m->('/doc', 'Articles', $o{page} eq 'doc');
|
||||
$m->('/dump', 'Code dump', $o{page} eq 'dump', sub {
|
||||
$m->('/dump', 'Misc.', !$o{sec});
|
||||
$m->('/demo', 'Demos', $o{sec} eq 'demo');
|
||||
$m->('/dump/awshrink','AWShrink', $o{sec} eq 'awshrink');
|
||||
$m->('/dump/grenamr', 'Grenamr', $o{sec} eq 'grenamr');
|
||||
$m->('/dump/nccolour','NC-Colour', $o{sec} eq 'nccolour');
|
||||
});
|
||||
} else {
|
||||
$m->('/', 'Home', !$o{page});
|
||||
$m->('/ncdu', 'Ncdu ');
|
||||
$m->('/ncdc', 'Ncdc ');
|
||||
$m->('/tuwf', 'Tuwf ');
|
||||
$m->('/doc', 'Articles', $o{page} eq 'doc');
|
||||
$m->('/dump', 'Code dump', $o{page} eq 'dump', $o{page} eq 'dump' && sub {
|
||||
$m->('/dump', 'Misc.', !$o{sec});
|
||||
$m->('/demo', 'Demos', $o{sec} eq 'demo');
|
||||
$m->('/dump/awshrink','AWShrink', $o{sec} eq 'awshrink');
|
||||
$m->('/dump/grenamr', 'Grenamr', $o{sec} eq 'grenamr');
|
||||
$m->('/dump/nccolour','NC-Colour', $o{sec} eq 'nccolour');
|
||||
});
|
||||
}
|
||||
end;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue