$c->stash->{'template'} = 'relate.tt';
}
+=head2 help
+
+ GET relation/help
+
+Returns the help window HTML.
+
+=cut
+
+sub help :Local :Args(0) {
+ my( $self, $c ) = @_;
+ $c->stash->{'template'} = 'relatehelp.tt';
+}
+
=head2 definitions
GET relation/definitions
my @all_relations;
foreach my $p ( @pairs ) {
my $relobj = $collation->relations->get_relationship( @$p );
- push( @all_relations,
- { source => $p->[0], target => $p->[1],
- type => $relobj->type, scope => $relobj->scope } );
+ my $relhash = { source => $p->[0], target => $p->[1],
+ type => $relobj->type, scope => $relobj->scope };
+ $relhash->{'note'} = $relobj->annotation if $relobj->has_annotation;
+ push( @all_relations, $relhash );
}
$c->stash->{'result'} = \@all_relations;
} elsif( $c->request->method eq 'POST' ) {
my $opts = { 'type' => $relation,
'scope' => $scope };
+ $opts->{'annotation'} = $note if $note;
try {
my @vectors = $collation->add_relationship( $node, $target, $opts );