From 59abb52dd3b4795a4660772053bfd66a932ddb75 Mon Sep 17 00:00:00 2001 From: Michal Vaner Date: Fri, 29 Aug 2008 21:05:08 +0200 Subject: [PATCH] New terminology, part 3 -- data listing --- PciIds/Html/List.pm | 24 ++++++++++++------------ static/print.css | 4 ++-- static/screen.css | 8 ++++---- 3 files changed, 18 insertions(+), 18 deletions(-) diff --git a/PciIds/Html/List.pm b/PciIds/Html/List.pm index 4115bbb..fdd17c2 100644 --- a/PciIds/Html/List.pm +++ b/PciIds/Html/List.pm @@ -14,38 +14,38 @@ sub loadItem( $$ ) { return ( 0 ) unless( defined $address ); my $item = $tables->item( $address->get() ); return ( 0 ) unless( defined $item ); - my( $parent, $name, $description, $maincomment ) = @{$item}; - return ( 1, $parent, $name, $description, $address, $maincomment ); + my( $parent, $name, $note, $mainhistory ) = @{$item}; + return ( 1, $parent, $name, $note, $address, $mainhistory ); } sub list( $$$$ ) { my( $req, $args, $tables, $auth ) = @_; - my( $ok, $parent, $name, $description, $address, $mid ) = loadItem( $tables, $req->uri() ); + my( $ok, $parent, $name, $note, $address, $mid ) = loadItem( $tables, $req->uri() ); return NOT_FOUND unless( $ok ); my $id = $address->pretty(); genHtmlHead( $req, $id, undef ); print '

'.encode( $id ).'

'; genMenu( $address, $args, $auth ); print htmlDiv( 'name', '

'.encode( $name ) ) if( defined( $name ) ); - print htmlDiv( 'description', '

'.encode( $description ) ) if( defined( $description ) ); + print htmlDiv( 'note', '

'.encode( $note ) ) if( defined( $note ) ); genPath( $address, 0 ); my $diss = 0; - my $comment; - foreach $comment ( @{$tables->history( $address->get() )} ) { + my $history; + foreach $history ( @{$tables->history( $address->get() )} ) { unless( $diss ) { print "

\n

Discussion

"; $diss = 1; } - my( $id, $text, $time, $name, $description, $seen, $user ) = @{$comment}; - my $type = $seen ? 'comment' : 'unseen-comment'; - $type = 'main-comment' if( defined( $mid ) && ( $id == $mid ) ); + my( $id, $text, $time, $name, $note, $seen, $user ) = @{$history}; + my $type = $seen ? 'history' : 'unseen-history'; + $type = 'main-history' if( defined( $mid ) && ( $id == $mid ) ); print "
\n"; print "

Name: ".encode( $name )."\n" if( defined( $name ) && ( $name ne '' ) ); - print "

Description: ".encode( $description )."\n" if( defined( $description ) && ( $description ne '' ) ); + print "

Note: ".encode( $note )."\n" if( defined( $note ) && ( $note ne '' ) ); if( defined( $text ) && ( $text ne '' ) ) { $text = encode( $text ); $text =~ s/\n/
/g; - print "

$text\n"; + print "

$text\n"; } print "

".encode( $user )."\n" if( defined( $user ) ); print "

".encode( $time )."\n"; @@ -65,7 +65,7 @@ sub list( $$$$ ) { my $url = '/read/'.$address->get().buildExcept( 'sort', $args ); my $sort = ( $args->{'sort'} or 'id' ); my( $sort_id, $sort_name ) = ( ( $sort eq 'id' ? 'rid' : 'id' ), ( $sort eq 'name' ? 'rname' : 'name' ) ); - genTableHead( 'subnodes', [ 'Id', 'Name', 'Description' ], [ 'id-col', 'name-col', 'desc-col' ] ); + genTableHead( 'subnodes', [ 'Id', 'Name', 'Note' ], [ 'id-col', 'name-col', 'note-col' ] ); $args->{'restrict'} = $address->defaultRestrict() unless( defined( $args->{'restrict'} ) ); $tables->nodes( $address->get(), $args ); genTableTail(); diff --git a/static/print.css b/static/print.css index 4da8f26..91ed5d0 100644 --- a/static/print.css +++ b/static/print.css @@ -11,7 +11,7 @@ { font-weight: bold; } -.itemdescription, .description +.itemnote, .note { font-style: italic; font-weight: bold; @@ -20,7 +20,7 @@ { font-style: italic; } -.comment, .unseen-comment, .main-comment +.history, .unseen-history, .main-history { border-bottom: dotted; border-bottom-width: 1px; diff --git a/static/screen.css b/static/screen.css index d5aee1f..aba046a 100644 --- a/static/screen.css +++ b/static/screen.css @@ -3,15 +3,15 @@ body color: black; background: #DDDDFF; } -.unnamedItem, .unseen-comment +.unnamedItem, .unseen-history { background: #D5D5D5; } -.item, .comment +.item, .history { background: #F0F0F0; } -.main-comment +.main-history { background: #DDFFDD; } @@ -19,7 +19,7 @@ body { font-weight: bold; } -.itemdescription, .description +.itemnote, .note { font-weight: bold; font-style: italic; -- 2.39.2