Add an option to change the doc URL prefix (#2285)
This commit is contained in:
parent
b0c53126ee
commit
ee46c5c6a7
2
Makefile
2
Makefile
|
@ -65,6 +65,7 @@ MANAGERSITEDIR=$(MANAGERDIR)/htdocs
|
|||
MANAGERAPIDIR=$(MANAGERDIR)/api
|
||||
MANAGERSTATICDIR=$(MANAGERSITEDIR)/static
|
||||
MANAGERRELATIVESTATICDIR=/static
|
||||
MANAGERRELATIVEDOCDIR=/doc
|
||||
MANAGERTEMPLATESDIR=$(MANAGERSITEDIR)/templates
|
||||
DOCDIR=$(DOCUMENTROOT)
|
||||
DEFDOCDIR=$(DOCUMENTROOT)/doc
|
||||
|
@ -806,6 +807,7 @@ install_manager_site: install_conf_dir
|
|||
@rm -rf $$(find ${RMANAGERSTATICDIR} \
|
||||
$(RMANAGERTEMPLATESDIR) $(RCONFDIR) -type d -name .svn)
|
||||
@$(PERL) -i -pe 's#__MANAGERSTATICDIR__#$(MANAGERRELATIVESTATICDIR)#g' $(RCONFDIR)/$(CONFFILENAME)
|
||||
@$(PERL) -i -pe 's#__MANAGERDOCDIR__#$(MANAGERRELATIVEDOCDIR)#g' $(RCONFDIR)/$(CONFFILENAME)
|
||||
@$(PERL) -i -pe 's#__MANAGERTEMPLATESDIR__#$(MANAGERTEMPLATESDIR)#g' $(RCONFDIR)/$(CONFFILENAME)
|
||||
|
||||
install_portal_site: install_conf_dir
|
||||
|
|
|
@ -376,6 +376,8 @@ protection = manager
|
|||
|
||||
; staticPrefix: relative (or URL) location of static HTML components
|
||||
staticPrefix = __MANAGERSTATICDIR__
|
||||
; docPrefix: relative (or URL) location of embedded documentation
|
||||
docPrefix = __MANAGERDOCDIR__
|
||||
|
||||
; instanceName: Display current LLNG instance into Manager
|
||||
;instanceName = Demo
|
||||
|
|
|
@ -167,7 +167,11 @@ sub tplParams {
|
|||
my $res = eval {
|
||||
$self->hLoadedPlugins->{viewer}->brwRule->( $req, $req->{userData} );
|
||||
} || 0;
|
||||
return ( VERSION => $VERSION, ALLOWBROWSER => $res );
|
||||
return (
|
||||
VERSION => $VERSION,
|
||||
ALLOWBROWSER => $res,
|
||||
DOC_PREFIX => ( $self->{docPrefix} || '/doc' ),
|
||||
);
|
||||
}
|
||||
|
||||
sub javascript {
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
{
|
||||
"/doc/":"/doc/",
|
||||
"2faSessions":"2ndFA sessions explorer",
|
||||
"2ndFA":"Second Factors",
|
||||
"ADPwdExpireWarning":"تحذير انتهاء صلاحية كلمة المرور",
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
{
|
||||
"/doc/":"/doc/",
|
||||
"2faSessions":"2ndFA sessions explorer",
|
||||
"2ndFA":"Second Factors",
|
||||
"ADPwdExpireWarning":"Password expire warning",
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
{
|
||||
"/doc/":"/doc/",
|
||||
"2faSessions":"Explorador de sesiones 2snFA",
|
||||
"2ndFA":"Segundos Factores",
|
||||
"ADPwdExpireWarning":"Alerta de caducidad de la contraseña",
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
{
|
||||
"/doc/":"/doc/",
|
||||
"2faSessions":"Explorateur sessions 2ndFA",
|
||||
"2ndFA":"Seconds Facteurs",
|
||||
"ADPwdExpireWarning":"Avertissement avant expiration du mot de passe",
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
{
|
||||
"/doc/":"/doc/",
|
||||
"2faSessions":"חוקר הפעלות אימות דו־שלבי",
|
||||
"2ndFA":"גורמים נוספים",
|
||||
"ADPwdExpireWarning":"אזהרת תפוגת סיסמה",
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
{
|
||||
"/doc/":"/doc/",
|
||||
"2faSessions":"Esploratore di sessioni 2ndFA",
|
||||
"2ndFA":"Secondi fattori",
|
||||
"ADPwdExpireWarning":"Avviso di scadenza password",
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
{
|
||||
"/doc/":"/doc/",
|
||||
"2faSessions":"Eksplorator sesji 2ndFA",
|
||||
"2ndFA":"Drugie czynniki",
|
||||
"ADPwdExpireWarning":"Ostrzeżenie o wygaśnięciu hasła",
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
{
|
||||
"/doc/":"/doc/",
|
||||
"2faSessions":"2ndFA oturumları gezgini",
|
||||
"2ndFA":"İki Faktörlü Kimlik Doğrulama",
|
||||
"ADPwdExpireWarning":"Parola kullanım süresi uyarısı",
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
{
|
||||
"/doc/":"/doc/",
|
||||
"2faSessions":"2ndFA sessions explorer",
|
||||
"2ndFA":"Second Factors",
|
||||
"ADPwdExpireWarning":"Cảnh báo mật khẩu hết hạn",
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
{
|
||||
"/doc/":"/zh-doc/",
|
||||
"2faSessions":"雙因素驗證工作階段探索程式",
|
||||
"2ndFA":"雙因素",
|
||||
"ADPwdExpireWarning":"密码过期警告",
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
{
|
||||
"/doc/":"/doc/",
|
||||
"2faSessions":"雙因素驗證工作階段探索程式",
|
||||
"2ndFA":"雙因素",
|
||||
"ADPwdExpireWarning":"密碼過期警告",
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
<div class="container text-center">
|
||||
<h1>LemonLDAP::NG Manager API</h1>
|
||||
<hr />
|
||||
<a href="/doc/pages/manager-api/index.html" class="btn btn-lg btn-primary">API Reference</a>
|
||||
<a href="<TMPL_VAR NAME="DOC_PREFIX">/pages/manager-api/index.html" class="btn btn-lg btn-primary">API Reference</a>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
|
|
|
@ -61,7 +61,7 @@
|
|||
<div id="bottom" ng-if="showH" class="hidden-xs">
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-body">
|
||||
<iframe id="helpframe" width="100%" height="100%" ng-src="{{translate('/doc/')+'pages/documentation/current/'+helpUrl}}" frameborder="0"></iframe>
|
||||
<iframe id="helpframe" width="100%" height="100%" ng-src="{{'<TMPL_VAR NAME="DOC_PREFIX">/pages/documentation/current/'+helpUrl}}" frameborder="0"></iframe>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -59,7 +59,7 @@
|
|||
<div id="bottom" ng-if="showH" class="hidden-xs">
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-body">
|
||||
<iframe id="helpframe" width="100%" height="100%" ng-src="{{translate('/doc/')+'pages/documentation/current/'+helpUrl}}" frameborder="0"></iframe>
|
||||
<iframe id="helpframe" width="100%" height="100%" ng-src="{{'<TMPL_VAR NAME="DOC_PREFIX">/pages/documentation/current/'+helpUrl}}" frameborder="0"></iframe>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
Loading…
Reference in New Issue