diff --git a/Changes b/Changes index 4a0f791d..7fc219f3 100644 --- a/Changes +++ b/Changes @@ -1,5 +1,14 @@ 2.036000 - + [NEW FEATURES] + + * template_paths config to allow easier override of web templates + * new ACL features including AND and negation + + [ENHANCEMENTTS] + + * renamed netdisco-daemon to netdisco-backend (and *-fg too) + [BUG FIXES] * Add SSL development library to Release Notes diff --git a/lib/App/Netdisco/Manual/Configuration.pod b/lib/App/Netdisco/Manual/Configuration.pod index ad8cef3b..826e60ed 100644 --- a/lib/App/Netdisco/Manual/Configuration.pod +++ b/lib/App/Netdisco/Manual/Configuration.pod @@ -130,7 +130,18 @@ Value: List. Default: Empty List. Additional library paths for the application (both web frontend and backend poller daemons). You can also use a colon-separated list in the -"C" environment variable. +"C" environment variable which makes code available even earlier +in the app startup sequence. + +=head3 C + +Value: List. Default: Empty List. + +Additional paths for L templates. Files in these paths will +be loaded before (and hence override) any templates built in to Netdisco. + +If you do want to copy and override a built in web template, then create the +directories necessary (such as "ajax" or "sidebar") in this path. =head3 C diff --git a/lib/App/Netdisco/Manual/ReleaseNotes.pod b/lib/App/Netdisco/Manual/ReleaseNotes.pod index ec6b8a0a..1374e2d7 100644 --- a/lib/App/Netdisco/Manual/ReleaseNotes.pod +++ b/lib/App/Netdisco/Manual/ReleaseNotes.pod @@ -52,8 +52,6 @@ point to the new app names, going forward. Remember to do this on upgrade: ln -s ~/perl5/bin/{localenv,netdisco-*} ~/bin/ -=head1 2.035007 - =head2 General Notices This release builds a Perl SSL interface which requires OpenSSL development diff --git a/lib/App/Netdisco/Web.pm b/lib/App/Netdisco/Web.pm index f2c63592..82e55294 100644 --- a/lib/App/Netdisco/Web.pm +++ b/lib/App/Netdisco/Web.pm @@ -56,6 +56,14 @@ if (setting('extra_web_plugins') and ref [] eq ref setting('extra_web_plugins')) push @{ config->{engines}->{netdisco_template_toolkit}->{INCLUDE_PATH} }, setting('views'); +# any template paths in deployment.yml (should override plugins) +if (setting('template_paths') and ref [] eq ref setting('template_paths')) { + foreach my $path (setting('template_paths')) { + unshift @{ config->{engines}->{netdisco_template_toolkit}->{INCLUDE_PATH} }, + $path; + } +} + # load cookie key from database setting('session_cookie_key' => undef); my $sessions = schema('netdisco')->resultset('Session'); diff --git a/lib/App/Netdisco/Web/Plugin.pm b/lib/App/Netdisco/Web/Plugin.pm index 2b4887ac..3b08229d 100644 --- a/lib/App/Netdisco/Web/Plugin.pm +++ b/lib/App/Netdisco/Web/Plugin.pm @@ -30,7 +30,7 @@ register 'register_template_path' => sub { return error "bad template path to register_template_paths"; } - push @{ config->{engines}->{netdisco_template_toolkit}->{INCLUDE_PATH} }, + unshift @{ config->{engines}->{netdisco_template_toolkit}->{INCLUDE_PATH} }, dir($path, 'views')->stringify; }; diff --git a/share/config.yml b/share/config.yml index 3715392c..ee7f4a9b 100644 --- a/share/config.yml +++ b/share/config.yml @@ -11,7 +11,8 @@ log: 'warning' logger_format: '[%P] %U %L %m' -include_paths: [] +include_paths: [] +template_paths: [] external_databases: [] # ------------