From 36535b0cc98fd32fb7a326f063e957c16a1ff95c Mon Sep 17 00:00:00 2001 From: Michal Vaner Date: Thu, 16 Oct 2008 22:48:13 +0200 Subject: [PATCH] Another attempt to reorder admin columns This time without breaking the IDs behind the scene --- PciIds/Html/Admin.pm | 48 +++++++++++++++++++++++++++----------------- 1 file changed, 30 insertions(+), 18 deletions(-) diff --git a/PciIds/Html/Admin.pm b/PciIds/Html/Admin.pm index 0f8c159..7b73cb4 100644 --- a/PciIds/Html/Admin.pm +++ b/PciIds/Html/Admin.pm @@ -46,9 +46,13 @@ sub mailEncode( $$ ) { sub genHist( $$$$$$$$$$$ ) { my( $class, $email, $login, $time, $name, $note, $disc, $selname, $selvalue, $delname, $delvalue ) = @_; - print ""; - print "".mailEncode( $email, $login )."
" if( defined $email ); - print "".safeEncode( $time ).""; + print ""; + print "\n"; + if( defined $delname ) { + print "\n"; + } else { + print "\n"; + } print ""; if( defined $name ) { if( $name eq '' ) { @@ -59,13 +63,19 @@ sub genHist( $$$$$$$$$$$ ) { } print "Note: ".encode( $note )."
" if defined $note && $note ne ''; print safeEncode( $disc ); - print "\n"; - print "\n" if defined $delname + print ""; + print "".mailEncode( $email, $login )."
" if( defined $email ); + print "".safeEncode( $time ).""; } sub genNewForm( $$ ) { my( $num, $values ) = @_; - print ""; + print ""; + print ""; + print "\n"; + print "Name: Note:
\n"; + print "\n"; + print ""; if( @{$values} ) { print "Note:
\n"; - print "\n"; - print "\n"; } sub loadStock() { @@ -160,24 +167,29 @@ function answer( id ) { } my $addr = PciIds::Address::new( $locId ); if( defined( $actHist ) ) { - print "\n"; + print "

\n"; } else { - print "
\n"; + print "

\n"; } - print "\n"; - print "

\n"; - print "

\n"; + print "\n"; + print "
"; - genPathBare( $req, $addr, 1, 0, $tables ); + print "
\n"; print "" if( $subcnt ); $subcnt = 0; $cnt ++; - print ""; - print "" if hasRight( $auth->{'accrights'}, 'prune' ) || ( !defined $actHist && !$tables->hasChildren( $addr->get() ) ); + print ""; + if( hasRight( $auth->{'accrights'}, 'prune' ) || ( !defined $actHist && !$tables->hasChildren( $addr->get() ) ) ) { + print ""; + } else { + print ""; + } + print ""; + genPathBare( $req, $addr, 1, 0, $tables ); print ""; if( defined $actHist ) { genHist( 'main-history', $actEmail, $actLogin, $actTime, $actName, $actNote, $actDisc, "loc-$cnt-sel", 'seen', undef, undef ); } else { - print "
"; + print "
"; } } $hiscnt ++; -- 2.39.5