From 1d2b6b821fb9955334c38e88652c02b150209d6c Mon Sep 17 00:00:00 2001 From: nac26 Date: Mon, 17 Jan 2011 02:28:45 +0000 Subject: [PATCH] NIHVIVO-1760 Updated logic for data checking templates. Will only suggest logging in if no authenticated session exists. --- webapp/web/templates/freemarker/body/menupage/menupage.ftl | 2 +- .../freemarker/body/partials/classgroups-checkForData.ftl | 7 +++++-- .../body/partials/menupage/menupage-checkForData.ftl | 7 +++++-- 3 files changed, 11 insertions(+), 5 deletions(-) diff --git a/webapp/web/templates/freemarker/body/menupage/menupage.ftl b/webapp/web/templates/freemarker/body/menupage/menupage.ftl index 450edee0b..e64d82254 100644 --- a/webapp/web/templates/freemarker/body/menupage/menupage.ftl +++ b/webapp/web/templates/freemarker/body/menupage/menupage.ftl @@ -2,7 +2,7 @@ <#include "menupage-checkForData.ftl"> -<#if (!noData)> +<#if !noData>

${page.title}

diff --git a/webapp/web/templates/freemarker/body/partials/classgroups-checkForData.ftl b/webapp/web/templates/freemarker/body/partials/classgroups-checkForData.ftl index 7e8b22f22..2f45a0c37 100644 --- a/webapp/web/templates/freemarker/body/partials/classgroups-checkForData.ftl +++ b/webapp/web/templates/freemarker/body/partials/classgroups-checkForData.ftl @@ -1,7 +1,8 @@ <#-- $This file is distributed under the terms of the license in /doc/license.txt$ --> +<#assign populatedClassGroups = 0 /> + <#list classGroups as classGroup> - <#assign populatedClassGroups = 0 /> <#-- Check to see if any of the class groups have individuals --> <#if (classGroup.individualCount > 0)> <#assign populatedClassGroups = populatedClassGroups + 1 /> @@ -16,5 +17,7 @@ <#assign noDataNotification>

There is currently no content in the system

-

Please login to manage content.

+ <#if !user.loggedIn> +

Please log in to manage content.

+ \ No newline at end of file diff --git a/webapp/web/templates/freemarker/body/partials/menupage/menupage-checkForData.ftl b/webapp/web/templates/freemarker/body/partials/menupage/menupage-checkForData.ftl index 138c8356c..b7295758a 100644 --- a/webapp/web/templates/freemarker/body/partials/menupage/menupage-checkForData.ftl +++ b/webapp/web/templates/freemarker/body/partials/menupage/menupage-checkForData.ftl @@ -1,7 +1,8 @@ <#-- $This file is distributed under the terms of the license in /doc/license.txt$ --> +<#assign populatedClasses = 0 /> + <#list vClassGroup as vClass> - <#assign populatedClasses = 0 /> <#-- Check to see if any of the classes in this class group have individuals --> <#if (vClass.entityCount > 0)> <#assign populatedClasses = populatedClasses + 1 /> @@ -16,7 +17,9 @@ <#assign noDataNotification>

There are currently no ${page.title?lower_case} in the system

-

Please log in to manage content.

+ <#if !user.loggedIn> +

Please log in to manage content.

+

You can browse all of the public content currently in the system using the index page.

\ No newline at end of file