my( $req, $args, $auth, $tables, $error, $values ) = @_;
my( $ok, $parent, $name, $note, $address ) = loadItem( $tables, $req->uri() );
return NOT_FOUND unless( $ok );
- my $prettyAddr = encode( $address->pretty() );
- genHtmlHead( $req, "$prettyAddr - add new item", undef );
- genCustomHead( $req, $args, $address, "$prettyAddr - add new item", [ $address->canDiscuss() ? [ 'Discuss', 'newhistory' ] : (), [ 'Help', 'help', 'newitem' ], [ 'ID syntax', 'help', $address->helpName() ], [ '', 'jump' ] ], [ logItem( $auth ), [ 'Notifications', 'notifications' ] ] );
+ genHtmlHead( $req, "Add new item", undef );
+ genCustomHead( $req, $args, $address, "Add new item", [ $address->canDiscuss() ? [ 'Discuss', 'newhistory' ] : (), [ 'Help', 'help', 'newitem' ], [ 'ID syntax', 'help', $address->helpName() ], [ '', 'jump' ] ], [ logItem( $auth ), [ 'Notifications', 'notifications' ] ] );
print "<div class='error'>$error</div>\n" if( defined $error );
print "<form name='newitem' id='newitem' method='POST' action=''>\n<table>";
genFormEx( [ [ 'input', 'ID:', 'text', 'id', 'maxlength="'.$address->subIdSize().'"' ],
my( $req, $args, $tables, $auth, $error, $values ) = @_;
my( $ok, $parent, $name, $note, $address ) = loadItem( $tables, $req->uri() );
return NOT_FOUND unless( $ok );
- my $prettyAddr = encode( $address->pretty() );
- genHtmlHead( $req, "$prettyAddr - discuss", undef );
- genCustomHead( $req, $args, $address, "$prettyAddr - discuss", [ $address->canAddItem() ? [ 'Add item', 'newitem' ] : (), [ 'Help', 'help', 'newhistory' ], [ '', 'jump' ] ], [ logItem( $auth ), [ 'Notifications', 'notifications' ] ] );
+ genHtmlHead( $req, "Discuss", undef );
+ genCustomHead( $req, $args, $address, "Discuss", [ $address->canAddItem() ? [ 'Add item', 'newitem' ] : (), [ 'Help', 'help', 'newhistory' ], [ '', 'jump' ] ], [ logItem( $auth ), [ 'Notifications', 'notifications' ] ] );
print "<div class='error'>$error</div>\n" if( defined $error );
print "<form name='newhistory' id='newhistory' method='POST' action=''>\n<table>";
genFormEx( [ [ 'textarea', 'Text:', undef, 'text', 'rows="5" cols="50"' ],
my( $req, $args, $tables, $auth ) = @_;
my( $ok, $parent, $name, $note, $address, $mid ) = loadItem( $tables, $req->uri() );
return NOT_FOUND unless( $ok );
- my $id = $address->pretty();
+ my $id = $address->top()->pretty();
genHtmlHead( $req, $id, "<style type='text/css' media='screen,print'>col.id-col { width: ".$address->subIdSize()*1.25."ex; }</style>\n" );
print "<div class='top'>\n";
print '<h1>'.encode( $id ).'</h1>';
sub genNotifForm( $$$$$$ ) {
my( $req, $args, $tables, $auth, $error, $data ) = @_;
my $addr = PciIds::Address::new( $req->uri() );
- genHtmlHead( $req, $addr->pretty().' - notifications', undef );
- genCustomHead( $req, $args, $addr, $addr->pretty()." - notifications", [ $addr->canAddItem() ? [ 'New item', 'newitem' ] : (), $addr->canDiscuss ? [ 'Discuss', 'newhistory' ] : (), [ 'Help', 'help', 'notifications' ], [ '', 'jump' ] ], [ logItem( $auth ), [ 'Profile', 'profile' ] ] );
+ genHtmlHead( $req, 'Notifications', undef );
+ genCustomHead( $req, $args, $addr, "Notifications", [ $addr->canAddItem() ? [ 'New item', 'newitem' ] : (), $addr->canDiscuss ? [ 'Discuss', 'newhistory' ] : (), [ 'Help', 'help', 'notifications' ], [ '', 'jump' ] ], [ logItem( $auth ), [ 'Profile', 'profile' ] ] );
print "<div class='error'>$error</div>\n" if( defined $error );
my $uri = $addr->get();
my $notifs = $tables->notificationsUser( $auth->{'authid'} );