Skip to content

Commit

Permalink
LUI-153: Footer to show optional extra data from runtime properties.
Browse files Browse the repository at this point in the history
  • Loading branch information
HerbertYiga committed Apr 29, 2020
1 parent c864fda commit d972683
Show file tree
Hide file tree
Showing 4 changed files with 38 additions and 3 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
/**
* This Source Code Form is subject to the terms of the Mozilla Public License,
* v. 2.0. If a copy of the MPL was not distributed with this file, You can
* obtain one at http:https://mozilla.org/MPL/2.0/. OpenMRS is also distributed under
* the terms of the Healthcare Disclaimer located at http:https://openmrs.org/license.
*
* Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS
* graphic logo is a trademark of OpenMRS Inc.
*/
package org.openmrs.template.web.controller;

import org.openmrs.api.context.Context;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;

@Controller
public class FooterFullController {

@RequestMapping("/template/footerFull.htm")
public String footerFull(Model model) {

String footerExtraData = Context.getRuntimeProperties().getProperty("legacyui.footer.extradata", "");

model.addAttribute("extraData", footerExtraData);

return "module/legacyui/template/footerFull";
}

}
2 changes: 1 addition & 1 deletion omod/src/main/webapp/resources/css/openmrs.css
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,7 @@ a:hover {
margin-right: 5px;
}

#buildDate, #codeVersion, #databaseVersion, #databaseVersionError {
#buildDate, #codeVersion, #databaseVersion, #databaseVersionError, #extraData {
color: #999999;
}

Expand Down
2 changes: 1 addition & 1 deletion omod/src/main/webapp/template/footer.jsp
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,6 @@
<%@ include file="footerMinimal.jsp" %>
</c:when>
<c:otherwise>
<%@ include file="footerFull.jsp" %>
<jsp:include page="/template/footerFull.htm" />
</c:otherwise>
</c:choose>
7 changes: 6 additions & 1 deletion omod/src/main/webapp/template/footerFull.jsp
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
<%@ include file="/WEB-INF/view/module/legacyui/template/include.jsp" %>
<br/>
</div>
</div>
Expand Down Expand Up @@ -44,7 +45,11 @@
<span id="buildDate"><openmrs:message code="footer.lastBuild"/>: <%= org.openmrs.web.WebConstants.BUILD_TIMESTAMP %></span>

<span id="codeVersion"><openmrs:message code="footer.version"/>: ${openmrsPlatformVersion}</span>


<c:if test="${not empty extraData}">
<span id="extraData">${extraData}</span>
</c:if>

<span id="poweredBy"><a href="http:https://openmrs.org"><openmrs:message code="footer.poweredBy"/> <img border="0" align="top" src="<%= request.getContextPath() %>/moduleResources/legacyui/images/openmrs_logo_tiny.png"/></a></span>
</div>
</div>
Expand Down

0 comments on commit d972683

Please sign in to comment.