(feat) new SOGoHelpURL preference to set a custom URL for SOGo help (fixes #2768)

pull/204/head
Ludovic Marcotte 2016-03-22 14:25:55 -04:00
parent fee310908b
commit 916806cc2c
6 changed files with 29 additions and 9 deletions

View File

@ -1819,6 +1819,11 @@ behaviour of SOGo.
Defaults to `SOGo` when unset. Defaults to `SOGo` when unset.
|S |SOGoHelpURL
|Parameter used to define the URL to online help for SOGo. When set,
an additional icon will appear near the logout button in SOGo's
web interface. The URL will always be open in a blank target.
|U |SOGoLoginModule |U |SOGoLoginModule
|Parameter used to specify which module to show after login. Possible |Parameter used to specify which module to show after login. Possible
values are: values are:

1
NEWS
View File

@ -9,6 +9,7 @@ Enhancements
- [web] updated Angular Material to version 1.0.6 - [web] updated Angular Material to version 1.0.6
- [web] added Lithuanan (lt) translation - thanks to Mantas Liobė - [web] added Lithuanan (lt) translation - thanks to Mantas Liobė
- [web] we now "cc" delegates during invitation updates (#3195) - [web] we now "cc" delegates during invitation updates (#3195)
- [web] new SOGoHelpURL preference to set a custom URL for SOGo help (#2768)
Bug fixes Bug fixes
- [web] fixed missing columns in SELECT statements (PostgreSQL) - [web] fixed missing columns in SELECT statements (PostgreSQL)

View File

@ -1,6 +1,6 @@
/* SOGoSystemDefaults.h - this file is part of SOGo /* SOGoSystemDefaults.h - this file is part of SOGo
* *
* Copyright (C) 2009-2015 Inverse inc. * Copyright (C) 2009-2016 Inverse inc.
* *
* This file is free software; you can redistribute it and/or modify * This file is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by
@ -67,6 +67,7 @@
- (BOOL) easDebugEnabled; - (BOOL) easDebugEnabled;
- (NSString *) pageTitle; - (NSString *) pageTitle;
- (NSString *) helpURL;
- (NSArray *) supportedLanguages; - (NSArray *) supportedLanguages;
- (NSString *) loginSuffix; - (NSString *) loginSuffix;

View File

@ -435,6 +435,11 @@ _injectConfigurationFromFile (NSMutableDictionary *defaultsDict,
return [self stringForKey: @"SOGoPageTitle"]; return [self stringForKey: @"SOGoPageTitle"];
} }
- (NSString *) helpURL
{
return [self stringForKey: @"SOGoHelpURL"];
}
- (NSArray *) supportedLanguages - (NSArray *) supportedLanguages
{ {
static NSArray *supportedLanguages = nil; static NSArray *supportedLanguages = nil;

View File

@ -112,20 +112,21 @@
return (@"<!DOCTYPE html>"); return (@"<!DOCTYPE html>");
} }
/* Help URL/target */ /* Help URL */
- (NSString *) helpURL - (NSString *) helpURL
{ {
return [NSString stringWithFormat: @"help/%@.html", title]; SOGoSystemDefaults *sd;
} NSString *s;
- (NSString *) helpWindowTarget sd = [SOGoSystemDefaults sharedSystemDefaults];
{
return [NSString stringWithFormat: @"Help_%@", title]; if ((s = [sd helpURL]))
return s;
return @"";
} }
/* notifications */ /* notifications */
- (void) sleep - (void) sleep
{ {
[item release]; [item release];

View File

@ -53,6 +53,13 @@
</md-button> </md-button>
<div class="hide-xs" style="width: 40px" <div class="hide-xs" style="width: 40px"
ng-show="activeUser.path.logoff.length"><!-- divider --></div> ng-show="activeUser.path.logoff.length"><!-- divider --></div>
<md-button class="md-icon-button"
ng-show="activeUser.path.help.length"
ng-href="{{activeUser.path.help}}"
target="_blank">
<md-icon>help_outline</md-icon>
<md-tooltip><var:string label:value="Help"/></md-tooltip>
</md-button>
<md-button class="md-icon-button" <md-button class="md-icon-button"
ng-show="activeUser.path.logoff.length" ng-show="activeUser.path.logoff.length"
ng-href="{{activeUser.path.logoff}}"> ng-href="{{activeUser.path.logoff}}">