Added automatic request support URL when none is specified in the
setting
This commit is contained in:
parent
fa3e559e57
commit
af183ee637
|
@ -5,11 +5,15 @@ All notable changes to this project will be documented in this file.
|
|||
This project does not adhere to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
||||
|
||||
|
||||
## [v6.6.0-SNAPSHOT] - 2022-03-17
|
||||
|
||||
- Added automatic request support URL when none is specified in the setting
|
||||
|
||||
## [v6.5.0] - 2021-12-17
|
||||
|
||||
Added possibility to customise feedback container URL and Label (Report an issue) and its visibility via a checkbox
|
||||
- Added possibility to customise feedback container URL and Label (Report an issue) and its visibility via a checkbox
|
||||
|
||||
## [v6.4.0-SNAPSHOT] - 2017-01-24
|
||||
|
||||
First release
|
||||
- First release
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
# gCube System - Generic Configurable Liferay 6.2 Communiyty Edition GA6 Theme
|
||||
# gCube System - Generic Configurable Liferay 6.2 Community Edition GA6 Theme
|
||||
|
||||
|
||||
## Structure of the project
|
||||
|
|
2
pom.xml
2
pom.xml
|
@ -11,7 +11,7 @@
|
|||
<artifactId>generic-configurable-theme</artifactId>
|
||||
<packaging>war</packaging>
|
||||
<name>generic-configurable-theme Theme</name>
|
||||
<version>6.5.0</version>
|
||||
<version>6.6.0-SNAPSHOT</version>
|
||||
<description>
|
||||
D4Science Generic Configurable Liferay Theme
|
||||
</description>
|
||||
|
|
|
@ -75,12 +75,12 @@
|
|||
#if ($theme.getSetting("feedback-website-url") !="")
|
||||
#set ($feedback-website-url = $theme.getSetting("feedback-website-url"))
|
||||
#else
|
||||
#set ($feedback-website-url = "https://support.d4science.org")
|
||||
#set ($feedback-website-url = "")
|
||||
#end
|
||||
#if ($theme.getSetting("feedback-label") !="")
|
||||
#set ($feedback-label = $theme.getSetting("feedback-label"))
|
||||
#else
|
||||
#set ($feedback-label = "Report an issue")
|
||||
#set ($feedback-label = "Request Support")
|
||||
#end
|
||||
|
||||
<body class="$css_class">
|
||||
|
@ -116,7 +116,18 @@ $theme.include($body_top_include)
|
|||
</div>
|
||||
#if($is_signed_in)
|
||||
#if ($theme.getSetting("show-feedback-label") == "true")
|
||||
<div class="feedback-container"><a href="$feedback-website-url" target="_blank"><span>$feedback-label</span><a></div>
|
||||
<div class="feedback-container"><a id="requestSupportAnchor" target="_blank"><span>$feedback-label</span><a></div>
|
||||
<script>
|
||||
var supportURL = "${feedback-website-url}";
|
||||
if (supportURL === "") { //if empty we use the automatic site
|
||||
let hostname = location.hostname;
|
||||
let remove = ".d4science.org";
|
||||
let rprojectName = hostname.replace(remove, '').replaceAll('.','-');
|
||||
supportURL = "https://support.d4science.org/projects/" + rprojectName + "-support/issues/new";
|
||||
}
|
||||
console.log(supportURL);
|
||||
document.getElementById("requestSupportAnchor").setAttribute("href", supportURL);
|
||||
</script>
|
||||
#end
|
||||
#end
|
||||
|
||||
|
|
Loading…
Reference in New Issue