| Jifty documentation | Contained in the Jifty distribution. |
Jifty::Plugin::OnlineDocs::Dispatcher - Dispatcher for OnlineDocs plugin
Load up the OnlineDocs tab when we're in Admin mode
| Jifty documentation | Contained in the Jifty distribution. |
use warnings; use strict; package Jifty::Plugin::OnlineDocs::Dispatcher;
use Jifty::Dispatcher -base; on '*' => run { return unless Jifty->admin_mode; my $top = Jifty->web->navigation; $top->child( "OnlineDocs", url => "/__jifty/online_docs/", label => _('Online docs'), sort_order => 999 ); }; under '/__jifty/online_docs' => run { return if Jifty->admin_mode; warn "Attempt to access /__jifty/online_docs; either enable AdminMode, or remove the OnlineDocs plugin"; redirect('/__jifty/error/permission_denied'); }; 1;