From: Michal Vaner Date: Tue, 14 Oct 2008 20:41:24 +0000 (+0200) Subject: Reorder columns in admin form X-Git-Url: http://mj.ucw.cz/gitweb/?a=commitdiff_plain;h=0c9f9b481d83c72df8efdd03ffd755ac1bbc8c33;p=pciids.git Reorder columns in admin form --- diff --git a/PciIds/Html/Admin.pm b/PciIds/Html/Admin.pm index 0f8c159..04d8a65 100644 --- a/PciIds/Html/Admin.pm +++ b/PciIds/Html/Admin.pm @@ -46,10 +46,14 @@ 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"; + print "\n"; + if( defined $delname ) { + print "\n" if defined $delname + } else { + print ""; + } + print "\n"; if( defined $name ) { if( $name eq '' ) { print "Deletion request
"; @@ -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 ).""; + print ""; } sub genNewForm( $$ ) { my( $num, $values ) = @_; - print ""; + print ""; + print "\n"; + print "Name: Note:
\n"; + print "\n"; + print "\n"; if( @{$values} ) { print "Note:
\n"; - print "\n"; - print "\n"; } sub loadStock() { @@ -159,25 +166,29 @@ function answer( id ) { $started = 1; } my $addr = PciIds::Address::new( $locId ); + $subcnt = 0; + $cnt ++; if( defined( $actHist ) ) { print "\n"; } else { print "
\n"; } - print "\n"; + print "\n"; print "

\n"; + print "

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