Display instance name (#2114)

merge-requests/133/head
Christophe Maudoux 5 years ago
parent 921cf16fcf
commit e146ea36fa
  1. 1
      e2e-tests/lemonldap-ng.ini
  2. 2
      lemonldap-ng-common/lemonldap-ng.ini
  3. 2
      lemonldap-ng-common/lib/Lemonldap/NG/Common/PSGI.pm
  4. 5
      lemonldap-ng-manager/site/templates/menubar.tpl

@ -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

@ -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__

@ -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) ) : () ),
(

@ -5,8 +5,8 @@
<!-- XS buttons -->
<div class="navbar-header">
<span class="navbar-brand">
<img ng-click="home()" class="link hidden-xs" width="88px" height="32px" src="<TMPL_VAR NAME="STATIC_PREFIX">logos/llng-logo-32.png"/>
<img ng-click="home()" class="link visible-xs" width="32px" height="32px" src="<TMPL_VAR NAME="STATIC_PREFIX">logos/llng-icon-32.png"/>
<img ng-click="home()" class="link hidden-xs" width="88px" height="32px" title="<TMPL_VAR NAME="INSTANCE_NAME">" src="<TMPL_VAR NAME="STATIC_PREFIX">logos/llng-logo-32.png"/>
<img ng-click="home()" class="link visible-xs" width="32px" height="32px" title="<TMPL_VAR NAME="INSTANCE_NAME">" src="<TMPL_VAR NAME="STATIC_PREFIX">logos/llng-icon-32.png"/>
</span>
<button type="button" class="navbar-toggle" ng-click="showM=!showM">
<span class="sr-only">Toggle navigation</span>
@ -22,6 +22,7 @@
</div>
<ul class="hidden-xs nav navbar-nav" role="grid">
<li ng-repeat="l in links" id="l in links"><a href="{{l.target}}" role="row"><strong><i ng-if="activeModule == l.title" ng-style="myStyle" class="glyphicon glyphicon-{{l.icon}}"></i><i ng-if="activeModule != l.title" class="glyphicon glyphicon-{{l.icon}}" ng-style="clickStyle"></i> <span ng-if="activeModule == l.title" ng-style="myStyle" ng-bind="translate(l.title)"></span><span ng-if="activeModule != l.title" ng-bind="translate(l.title)" ng-style="clickStyle"></span></strong></a></li>
</ul>
<ul class="hidden-xs nav navbar-nav navbar-right">
<li uib-dropdown>

Loading…
Cancel
Save