From 9432886cac6f87542f2cb7d9cffdcdfca8928062 Mon Sep 17 00:00:00 2001 From: cappadona Date: Mon, 18 Jul 2011 11:55:31 +0000 Subject: [PATCH] NIHVIVO-2944 Updated "Expecting Content" message based on login state and whether the user has permission to rebuild the search index. --- webapp/web/css/vitro.css | 8 +++---- .../partials/classgroups-checkForData.ftl | 23 ++++++++++++------- .../menupage/menupage-checkForData.ftl | 19 ++++++++++----- 3 files changed, 32 insertions(+), 18 deletions(-) diff --git a/webapp/web/css/vitro.css b/webapp/web/css/vitro.css index 7a2f951d5..141b88a79 100644 --- a/webapp/web/css/vitro.css +++ b/webapp/web/css/vitro.css @@ -63,7 +63,7 @@ padding: .5em; margin-bottom: 10px; } -.rebuildSearchIndex { +.contentNote { float: right; padding: .6em; background: #ffc; @@ -71,12 +71,12 @@ -webkit-border-radius: 6px; border-radius: 6px; } -.rebuildSearchIndex h4, -.rebuildSearchIndex p { +.contentNote h4, +.contentNote p { margin: 0; padding: 0; } -.rebuildSearchIndex p { +.contentNote p { font-size: .8em; } diff --git a/webapp/web/templates/freemarker/body/partials/classgroups-checkForData.ftl b/webapp/web/templates/freemarker/body/partials/classgroups-checkForData.ftl index e397cb9d5..19c32a771 100644 --- a/webapp/web/templates/freemarker/body/partials/classgroups-checkForData.ftl +++ b/webapp/web/templates/freemarker/body/partials/classgroups-checkForData.ftl @@ -14,16 +14,23 @@ <#assign noData = false /> -<#assign noDataNotification> -

Expecting content?

Try rebuilding the search index.

+<#assign noDataNotification> + <#if user.loggedIn> + <#if user.authorizedToRebuildSearchIndex> + +

Expecting content?

+

Try rebuilding the search index.

+
+ + <#else> + +

Please log in to manage content.

+
+

There is currently no content in the system

- <#if user.loggedIn> - <#if user.hasSiteAdminAccess> -

You can add content and manage this site from the Site Administration page.

- - <#else> -

Please log in to manage content.

+ <#if user.loggedIn && user.hasSiteAdminAccess> +

You can add content and manage this site from the Site Administration page.

\ 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 337f4f436..6661a019e 100644 --- a/webapp/web/templates/freemarker/body/partials/menupage/menupage-checkForData.ftl +++ b/webapp/web/templates/freemarker/body/partials/menupage/menupage-checkForData.ftl @@ -18,15 +18,22 @@ <#assign noDataNotification> -

Expecting content?

Try rebuilding the search index.

- -

There is currently no ${page.title} content in the system

<#if user.loggedIn> - <#if user.hasSiteAdminAccess> -

You can add content and manage this site from the Site Administration page.

+ <#if user.authorizedToRebuildSearchIndex> + +

Expecting content?

+

Try rebuilding the search index.

+
<#else> -

Please log in to manage content.

+ +

Please log in to manage content.

+
+ + +

There is currently no ${page.title} content in the system

+ <#if user.loggedIn && user.hasSiteAdminAccess> +

You can add content and manage this site from the Site Administration page.

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