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/Util/CommonHTML.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/Util/CommonHTML.pm')
-rw-r--r-- | lib/VNDB/Util/CommonHTML.pm | 25 |
1 files changed, 1 insertions, 24 deletions
diff --git a/lib/VNDB/Util/CommonHTML.pm b/lib/VNDB/Util/CommonHTML.pm index 7a3d554c..03b1bd28 100644 --- a/lib/VNDB/Util/CommonHTML.pm +++ b/lib/VNDB/Util/CommonHTML.pm @@ -12,7 +12,7 @@ use POSIX 'ceil'; our @EXPORT = qw| htmlMainTabs htmlDenied htmlHiddenMessage htmlRevision - htmlEditMessage htmlItemMessage htmlVoteStats htmlSearchBox htmlRGHeader + htmlEditMessage htmlItemMessage htmlVoteStats htmlSearchBox |; @@ -301,27 +301,4 @@ sub htmlSearchBox { } -sub htmlRGHeader { - my($self, $title, $type, $obj) = @_; - - # This used to be a good test for inline SVG support, but I'm not sure it is nowadays. - if(($self->reqHeader('Accept')||'') !~ /application\/xhtml\+xml/) { - $self->htmlHeader(title => $title); - $self->htmlMainTabs($type, $obj, 'rg'); - div class => 'mainbox'; - h1 $title; - div class => 'warning'; - h2 'Not supported'; - p 'Your browser sucks, it doesn\'t have the functionality to render our nice relation graphs.'; - end; - end; - $self->htmlFooter; - return 1; - } - $self->htmlHeader(title => $title); - $self->htmlMainTabs($type, $obj, 'rg'); - return 0; -} - - 1; |