diff options
author | Yorhel <git@yorhel.nl> | 2020-04-01 15:24:30 +0200 |
---|---|---|
committer | Yorhel <git@yorhel.nl> | 2020-04-01 15:24:32 +0200 |
commit | f6f558fe867d1004c08a862ca5b6d0b9c5a9bb5e (patch) | |
tree | dc800ba5c7a29439d34a8cf91865e6e9e704dcfd /lib/VNDB/Handler/VNPage.pm | |
parent | d8220276102d223e699898328c625cac63e39b1b (diff) |
VN::Graph: Also generate VN graphs on-demand
Same change as with Producers::Graph before. This also adds an option to
show/hide unofficial relations.
Restructured the code a bit to allow for sharing code between
Producers::Graph and VN::Graph.
Diffstat (limited to 'lib/VNDB/Handler/VNPage.pm')
-rw-r--r-- | lib/VNDB/Handler/VNPage.pm | 23 |
1 files changed, 0 insertions, 23 deletions
diff --git a/lib/VNDB/Handler/VNPage.pm b/lib/VNDB/Handler/VNPage.pm index 8b01fabc..2f35744f 100644 --- a/lib/VNDB/Handler/VNPage.pm +++ b/lib/VNDB/Handler/VNPage.pm @@ -13,7 +13,6 @@ use POSIX 'strftime'; TUWF::register( qr{v/rand} => \&rand, - qr{v([1-9]\d*)/rg} => \&rg, qr{v([1-9]\d*)/releases} => \&releases, qr{v([1-9]\d*)/(chars)} => \&page, qr{v([1-9]\d*)/staff} => sub { $_[0]->resRedirect("/v$_[1]#staff") }, @@ -27,28 +26,6 @@ sub rand { } -sub rg { - my($self, $vid) = @_; - - my $v = $self->dbVNGet(id => $vid, what => 'relgraph')->[0]; - return $self->resNotFound if !$v->{id} || !$v->{rgraph}; - - my $title = "Relation graph for $v->{title}"; - return if $self->htmlRGHeader($title, 'v', $v); - - $v->{svg} =~ s/id="node_v$vid"/id="graph_current"/; - - div class => 'mainbox'; - h1 $title; - p 'Note: Unofficial relations are excluded if the graph would otherwise be too large.'; - p class => 'center'; - lit $v->{svg}; - end; - end; - $self->htmlFooter; -} - - # Description of each column, field: # id: Identifier used in URLs # sort_field: Name of the field when sorting |