diff --git a/e2e-tests/lemonldap-ng.ini b/e2e-tests/lemonldap-ng.ini index f3700f7d0..0c9af96aa 100644 --- a/e2e-tests/lemonldap-ng.ini +++ b/e2e-tests/lemonldap-ng.ini @@ -46,6 +46,7 @@ viewerAllowBrowser = 1 viewerAllowDiff = 1 staticPrefix = /static +instanceName = Demo languages = fr, en, vi, ar, de, it, zh, tr templateDir = __pwd__/lemonldap-ng-manager/site/templates diff --git a/lemonldap-ng-common/lemonldap-ng.ini b/lemonldap-ng-common/lemonldap-ng.ini index d934302e9..2d620c82f 100644 --- a/lemonldap-ng-common/lemonldap-ng.ini +++ b/lemonldap-ng-common/lemonldap-ng.ini @@ -368,6 +368,8 @@ protection = manager ; staticPrefix: relative (or URL) location of static HTML components staticPrefix = __MANAGERSTATICDIR__ ; +; instanceName: Display current LLNG instance into Manager +;instanceName = Demo ; location of HTML templates directory templateDir = __MANAGERTEMPLATESDIR__ diff --git a/lemonldap-ng-common/lib/Lemonldap/NG/Common/PSGI.pm b/lemonldap-ng-common/lib/Lemonldap/NG/Common/PSGI.pm index 0b3f77f8c..045e400e8 100644 --- a/lemonldap-ng-common/lib/Lemonldap/NG/Common/PSGI.pm +++ b/lemonldap-ng-common/lib/Lemonldap/NG/Common/PSGI.pm @@ -17,6 +17,7 @@ has languages => ( is => 'rw', isa => 'Str', default => 'en' ); has logLevel => ( is => 'rw', isa => 'Str', default => 'info' ); has portal => ( is => 'rw', isa => 'Str' ); has staticPrefix => ( is => 'rw', isa => 'Str' ); +has instanceName => ( is => 'rw', isa => 'Str', default => '' ); has templateDir => ( is => 'rw', isa => 'Str|ArrayRef' ); has links => ( is => 'rw', isa => 'ArrayRef' ); has menuLinks => ( is => 'rw', isa => 'ArrayRef' ); @@ -271,6 +272,7 @@ sub sendHtml { # TODO: warn if STATICPREFIX does not end with '/' $htpl->param( STATIC_PREFIX => $sp, + INSTANCE_NAME => $self->instanceName, SCRIPTNAME => $sc, ( $self->can('tplParams') ? ( $self->tplParams($req) ) : () ), ( diff --git a/lemonldap-ng-manager/site/templates/menubar.tpl b/lemonldap-ng-manager/site/templates/menubar.tpl index 735e58472..7b0b1ba89 100644 --- a/lemonldap-ng-manager/site/templates/menubar.tpl +++ b/lemonldap-ng-manager/site/templates/menubar.tpl @@ -5,8 +5,8 @@