summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorYorhel <git@yorhel.nl>2009-10-22 15:05:40 +0200
committerYorhel <git@yorhel.nl>2009-10-22 15:05:40 +0200
commit4170cec21986540ffe0f9025840971ccea682268 (patch)
treee7438df1f23d65f5d9733547d9cfcde0c768d563 /lib
parent40d71fd459c223fafd4b976c9a4b9628ccc80f25 (diff)
TransAdmin: Added intro page
Diffstat (limited to 'lib')
-rw-r--r--lib/VNDB/Plugin/TransAdmin.pm15
1 files changed, 15 insertions, 0 deletions
diff --git a/lib/VNDB/Plugin/TransAdmin.pm b/lib/VNDB/Plugin/TransAdmin.pm
index 742d2ff2..ebb173f6 100644
--- a/lib/VNDB/Plugin/TransAdmin.pm
+++ b/lib/VNDB/Plugin/TransAdmin.pm
@@ -50,6 +50,7 @@ sub tladmin {
my($self, $lang) = @_;
$lang ||= '';
+ my $intro = $lang =~ s/intro//;
return 404 if $lang && ($lang eq 'en' || !grep $_ eq $lang, $self->{l10n}->languages);
my $sect = $self->reqParam('sect')||'';
@@ -71,6 +72,7 @@ sub tladmin {
$self->htmlHeader(title => 'Quick-and-dirty Translation Editor', noindex => 1);
div class => 'mainbox';
+ a class => 'addnew', href => '/tladmin/intro', 'README';
h1 'Quick-and-dirty Translation Editor';
h2 class => 'alttitle', 'Step #1: Choose a language';
p class => 'browseopts';
@@ -80,6 +82,7 @@ sub tladmin {
_sections($self, $lang, $sect, $sects) if $lang;
end;
+ _intro() if $intro;
_page($self, $lang, $sect, $page) if $lang && $sect;
$self->htmlFooter;
@@ -179,6 +182,18 @@ sub _sections {
}
+sub _intro {
+ my $f = LangFile->new(read => $langfile);
+ my $intro = $f->read;
+ $intro = join "\n", @$intro[1..$#$intro];
+ $f->close;
+ div class => 'mainbox';
+ h1 'Introduction to the language file';
+ pre $intro;
+ end;
+}
+
+
sub _page {
my($self, $lang, $sect, $page) = @_;