summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/com/p4square/fmfacade/FMFacade.java15
-rw-r--r--src/com/p4square/fmfacade/FreeMarkerPageResource.java1
-rw-r--r--src/templates/pages/index.html.ftl3
-rw-r--r--src/templates/templates/header.ftl3
4 files changed, 19 insertions, 3 deletions
diff --git a/src/com/p4square/fmfacade/FMFacade.java b/src/com/p4square/fmfacade/FMFacade.java
index 54e4098..0e552b0 100644
--- a/src/com/p4square/fmfacade/FMFacade.java
+++ b/src/com/p4square/fmfacade/FMFacade.java
@@ -18,8 +18,10 @@ import freemarker.template.Template;
import org.apache.log4j.Logger;
+import com.p4square.grow.config.Config;
+
/**
- *
+ *
* @author Jesse Morgan <jesse@jesterpm.net>
*/
public class FMFacade extends Application {
@@ -32,11 +34,18 @@ public class FMFacade extends Application {
mFMConfig.setObjectWrapper(new DefaultObjectWrapper());
}
+ /**
+ * @return a Config object.
+ */
+ public Config getConfig() {
+ return null;
+ }
+
@Override
public synchronized Restlet createInboundRoot() {
return createRouter();
}
-
+
/**
* Retrieve a template.
*
@@ -75,7 +84,7 @@ public class FMFacade extends Application {
component.getServers().add(Protocol.HTTP, 8085);
component.getClients().add(Protocol.HTTP);
component.getDefaultHost().attach(new FMFacade());
-
+
// Setup shutdown hook
Runtime.getRuntime().addShutdownHook(new Thread() {
public void run() {
diff --git a/src/com/p4square/fmfacade/FreeMarkerPageResource.java b/src/com/p4square/fmfacade/FreeMarkerPageResource.java
index 46b0ec5..c6cf81e 100644
--- a/src/com/p4square/fmfacade/FreeMarkerPageResource.java
+++ b/src/com/p4square/fmfacade/FreeMarkerPageResource.java
@@ -76,6 +76,7 @@ public class FreeMarkerPageResource extends ServerResource {
root.put("attributes", getRequestAttributes());
root.put("query", getQuery().getValuesMap());
+ root.put("config", mFMF.getConfig());
if (getClientInfo().isAuthenticated()) {
final User user = getClientInfo().getUser();
diff --git a/src/templates/pages/index.html.ftl b/src/templates/pages/index.html.ftl
index 1b59509..59a5e38 100644
--- a/src/templates/pages/index.html.ftl
+++ b/src/templates/pages/index.html.ftl
@@ -16,6 +16,9 @@
<header>
<h1>
<a href="http://myfoursquarechurch.com"><img src="${staticRoot}/images/foursquarelg.png"></a>
+ <#if config.getDomain() != "prod">
+ <span class="versiontag">${config.getDomain()}</span>
+ </#if>
</h1>
<#include "/templates/nav.ftl">
diff --git a/src/templates/templates/header.ftl b/src/templates/templates/header.ftl
index 8d568bf..0911bbc 100644
--- a/src/templates/templates/header.ftl
+++ b/src/templates/templates/header.ftl
@@ -5,6 +5,9 @@
<#else>
<a href="${dynamicRoot}/index.html"><img src="${staticRoot}/images/logo.png"> Grow Process</a>
</#if>
+ <#if config.getDomain() != "prod">
+ <span class="versiontag">${config.getDomain()}</span>
+ </#if>
<a id="foursquarefloat" href="http://myfoursquarechurch.com"><img src="${staticRoot}/images/foursquaresm.png" alt="Foursqaure Church" /></a>
</h1>