[Bio] / Sprout / ERDB.pm Repository:
ViewVC logotype

Diff of /Sprout/ERDB.pm

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.82, Tue Jan 9 01:49:57 2007 UTC revision 1.83, Mon Jan 22 20:23:58 2007 UTC
# Line 548  Line 548 
548          if (my $notes = $entityData->{Notes}) {          if (my $notes = $entityData->{Notes}) {
549              $retVal .= "<p>" . HTMLNote($notes->{content}) . "</p>\n";              $retVal .= "<p>" . HTMLNote($notes->{content}) . "</p>\n";
550          }          }
551          # Now we want a list of the entity's relationships. First, we set up the relationship subsection.          # See if we need a list of the entity's relationships.
552            my $relCount = keys %{$relationshipList};
553            if ($relCount > 0) {
554                # First, we set up the relationship subsection.
555          $retVal .= "<h4>Relationships for <b>$key</b></h4>\n<ul>\n";          $retVal .= "<h4>Relationships for <b>$key</b></h4>\n<ul>\n";
556          # Loop through the relationships.          # Loop through the relationships.
557          for my $relationship (sort keys %{$relationshipList}) {          for my $relationship (sort keys %{$relationshipList}) {
# Line 564  Line 567 
567          }          }
568          # Close off the relationship list.          # Close off the relationship list.
569          $retVal .= "</ul>\n";          $retVal .= "</ul>\n";
570            }
571          # Get the entity's relations.          # Get the entity's relations.
572          my $relationList = $entityData->{Relations};          my $relationList = $entityData->{Relations};
573          # Create a header for the relation subsection.          # Create a header for the relation subsection.
# Line 3322  Line 3326 
3326      # Substitute the bulletin board codes.      # Substitute the bulletin board codes.
3327      $retVal =~ s!\[(/?[bi])\]!<$1>!g;      $retVal =~ s!\[(/?[bi])\]!<$1>!g;
3328      $retVal =~ s!\[p\]!</p><p>!g;      $retVal =~ s!\[p\]!</p><p>!g;
3329        $retVal =~ s!\[link\s+([^\]]+)\]!<a href="$1">!g;
3330        $retVal =~ s!\[/link\]!</a>!g;
3331      # Return the result.      # Return the result.
3332      return $retVal;      return $retVal;
3333  }  }
# Line 4266  Line 4272 
4272          _FixupFields($relationshipStructure, $relationshipName, 2, 3);          _FixupFields($relationshipStructure, $relationshipName, 2, 3);
4273          # Format a description for the FROM field.          # Format a description for the FROM field.
4274          my $fromEntity = $relationshipStructure->{from};          my $fromEntity = $relationshipStructure->{from};
4275          my $fromComment = "<b>id</b> of the source <b><a href=\"#$fromEntity\">$fromEntity</a></b>.";          my $fromComment = "[b]id[/b] of the source [b][link #$fromEntity]$fromEntity\[/link][/b].";
4276          # Get the FROM entity's key type.          # Get the FROM entity's key type.
4277          my $fromType = $entityList->{$fromEntity}->{keyType};          my $fromType = $entityList->{$fromEntity}->{keyType};
4278          # Add the FROM field.          # Add the FROM field.
# Line 4276  Line 4282 
4282                                                      PrettySort => 1});                                                      PrettySort => 1});
4283          # Format a description for the TO field.          # Format a description for the TO field.
4284          my $toEntity = $relationshipStructure->{to};          my $toEntity = $relationshipStructure->{to};
4285          my $toComment = "<b>id</b> of the target <b><a href=\"#$toEntity\">$toEntity</a></b>.";          my $toComment = "[b]id[/b] of the target [b][link #$toEntity]$toEntity\[/link][/b].";
4286          # Get the TO entity's key type.          # Get the TO entity's key type.
4287          my $toType = $entityList->{$toEntity}->{keyType};          my $toType = $entityList->{$toEntity}->{keyType};
4288          # Add the TO field.          # Add the TO field.
# Line 4979  Line 4985 
4985      # Compute the number of columns.      # Compute the number of columns.
4986      my $colCount = @colNames;      my $colCount = @colNames;
4987      # Generate the title row.      # Generate the title row.
4988      my $htmlString = "<p><table border=\"2\"><tr><td colspan=\"$colCount\" align=\"center\">$tablename</td></tr>\n";      my $htmlString = "<table border=\"2\"><tr><td colspan=\"$colCount\" align=\"center\">$tablename</td></tr>\n";
4989      # Loop through the columns, adding the column header rows.      # Loop through the columns, adding the column header rows.
4990      $htmlString .= "<tr>";      $htmlString .= "<tr>";
4991      for my $colName (@colNames) {      for my $colName (@colNames) {
# Line 4998  Line 5004 
5004  =cut  =cut
5005    
5006  sub _CloseTable {  sub _CloseTable {
5007      return "</table></p>\n";      return "</table>\n";
5008  }  }
5009    
5010  =head3 _ShowField  =head3 _ShowField

Legend:
Removed from v.1.82  
changed lines
  Added in v.1.83

MCS Webmaster
ViewVC Help
Powered by ViewVC 1.0.3