From 9d9a900d337b60599b5b2dab8c8af57ed0cfa32d Mon Sep 17 00:00:00 2001 From: nac26 Date: Sun, 16 Jan 2011 22:53:21 +0000 Subject: [PATCH] Merged r7057 from nihvivo-rel-1.2-maint branch --- .../freemarker/body/menupage/menupage.ftl | 36 +++++++++++-------- .../menupage/menupage-checkForData.ftl | 22 ++++++++++++ 2 files changed, 43 insertions(+), 15 deletions(-) create mode 100644 webapp/web/templates/freemarker/body/partials/menupage/menupage-checkForData.ftl diff --git a/webapp/web/templates/freemarker/body/menupage/menupage.ftl b/webapp/web/templates/freemarker/body/menupage/menupage.ftl index b5fe5de48..450edee0b 100644 --- a/webapp/web/templates/freemarker/body/menupage/menupage.ftl +++ b/webapp/web/templates/freemarker/body/menupage/menupage.ftl @@ -1,26 +1,32 @@ <#-- $This file is distributed under the terms of the license in /doc/license.txt$ --> -
-

${page.title}

+<#include "menupage-checkForData.ftl"> + +<#if (!noData)> +
+

${page.title}

-
- <#-- This will allow us to keep menupage.ftl generic and keep vivo-specific extensions in VIVO --> - <#if visualizationLink??> - ${visualizationLink} - +
+ <#-- This will allow us to keep menupage.ftl generic and keep vivo-specific extensions in VIVO --> + <#if visualizationLink??> + ${visualizationLink} + -

Visual Graph

+

Visual Graph

- <#include "menupage-vClassesInClassgroup.ftl"> + <#include "menupage-vClassesInClassgroup.ftl"> -
- +
+ +
-
-<#include "menupage-browse.ftl"> + <#include "menupage-browse.ftl"> -${stylesheets.add("/css/menupage/menupage.css")} + ${stylesheets.add("/css/menupage/menupage.css")} -<#include "menupage-scripts.ftl"> \ No newline at end of file + <#include "menupage-scripts.ftl"> +<#else> + ${noDataNotification} + \ 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 new file mode 100644 index 000000000..5ec673e43 --- /dev/null +++ b/webapp/web/templates/freemarker/body/partials/menupage/menupage-checkForData.ftl @@ -0,0 +1,22 @@ +<#-- $This file is distributed under the terms of the license in /doc/license.txt$ --> + +<#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 /> + + +<#if (populatedClasses == 0)> + <#assign noData = true /> +<#else> + <#assign noData = false /> + + +<#assign noDataNotification> +

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

+ +

Please login 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