Index: frontend/src/main/java/org/onehippo/cms7/channelmanager/DimmedRootPanel_fr.properties
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- frontend/src/main/java/org/onehippo/cms7/channelmanager/DimmedRootPanel_fr.properties	(revision )
+++ frontend/src/main/java/org/onehippo/cms7/channelmanager/DimmedRootPanel_fr.properties	(revision )
@@ -0,0 +1,1 @@
+site.is.down.message=Impossible de charger le Channel Manager. Le CMS n'a pas pu accéder au site, soit parce qu'il est en panne ou bien en raison de problèmes de configuration.
Index: frontend/src/main/java/org/onehippo/cms7/channelmanager/ChannelManagerPerspective.html
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- frontend/src/main/java/org/onehippo/cms7/channelmanager/ChannelManagerPerspective.html	(revision 35683)
+++ frontend/src/main/java/org/onehippo/cms7/channelmanager/ChannelManagerPerspective.html	(revision )
@@ -16,40 +16,46 @@
 
 <html xmlns:wicket="http://wicket.apache.org/">
 <wicket:panel>
-  <div yui:id="template-composer-plugin-wrapper" class="hippo-panel-plugin template-composer-perspective">
-    <div yui:id="template-composer-perspective-center">
-      <div yui:id="template-composer-perspective-center-body">
+    <div yui:id="template-composer-plugin-wrapper" class="hippo-panel-plugin template-composer-perspective">
+        <div yui:id="template-composer-perspective-center">
+            <div yui:id="template-composer-perspective-center-body">
-        <div class="channel-manager" wicket:id="channel-root">
+                <div class="channel-manager" wicket:id="channel-root"></div>
+            </div>
+        </div>
+    </div>
+    <wicket:fragment wicket:id="root-panel">
+        <div wicket:id="root-panel-div">
-          <div wicket:id="channel-properties-container">
-            <table>
-              <wicket:container wicket:id="fieldgroups">
-                <tbody class="fieldgroup">
-                  <wicket:enclosure child="fieldgrouptitle">
-                    <tr>
-                      <td class="fieldgrouptitle" colspan="2"><span wicket:id="fieldgrouptitle">Field group title</span></td>
-                    </tr>
-                  </wicket:enclosure>
-                  <wicket:container wicket:id="properties">
-                    <tr>
-                      <td class="key"><span wicket:id="key">key</span></td>
-                      <td class="value"><span wicket:id="value">value</span></td>
+            <div wicket:id="channel-properties-container">
+                <table>
+                    <wicket:container wicket:id="fieldgroups">
+                        <tbody class="fieldgroup">
+                        <wicket:enclosure child="fieldgrouptitle">
+                            <tr>
+                                <td class="fieldgrouptitle" colspan="2"><span wicket:id="fieldgrouptitle">Field group title</span></td>
+                            </tr>
+                        </wicket:enclosure>
+                        <wicket:container wicket:id="properties">
+                            <tr>
+                                <td class="key"><span wicket:id="key">key</span></td>
+                                <td class="value"><span wicket:id="value">value</span></td>
-                      <td class="help">
-                        <wicket:enclosure child="help">
+                                <td class="help"><wicket:enclosure child="help">
-                          <span class="help-icon"><a href="#"><span wicket:id="help">helptext</span></a></span>
+                                    <span class="help-icon"><a href="#"><span wicket:id="help">helptext</span></a></span>
-                        </wicket:enclosure>
-                      </td>
+                                </wicket:enclosure></td>
-                    </tr>
-                  </wicket:container>
-                </tbody>
-              </wicket:container>
-            </table>
-          </div>
-          <div wicket:id="hst-config-editor-container">
-            <span wicket:id="label-mountpoint"></span>
-          </div>
+                            </tr>
+                        </wicket:container>
+                        </tbody>
+                    </wicket:container>
+                </table>
+            </div>
+            <div wicket:id="hst-config-editor-container">
+                <span wicket:id="label-mountpoint"></span>
+            </div>
         </div>
+    </wicket:fragment>
+    <wicket:fragment wicket:id="dimmed-root-panel">
+        <div wicket:id="dimmed-root-panel-div">
+            <label class="channel-manager-error-status-message" wicket:id="siteStatusLabel"></label>
-      </div>
+        </div>
-    </div>
-  </div>
+    </wicket:fragment>
 </wicket:panel>
 </html>
\ No newline at end of file
Index: frontend/src/main/java/org/onehippo/cms7/channelmanager/DimmedRootPanel.properties
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- frontend/src/main/java/org/onehippo/cms7/channelmanager/DimmedRootPanel.properties	(revision )
+++ frontend/src/main/java/org/onehippo/cms7/channelmanager/DimmedRootPanel.properties	(revision )
@@ -0,0 +1,1 @@
+site.is.down.message=The Channel Manager could not be loaded. This is caused by the CMS not being able to connect to the site, either because the site is down or due to a misconfiguration. Please contact your systems administrator.
Index: frontend/src/main/java/org/onehippo/cms7/channelmanager/channels/ChannelUtil.java
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- frontend/src/main/java/org/onehippo/cms7/channelmanager/channels/ChannelUtil.java	(revision 35683)
+++ frontend/src/main/java/org/onehippo/cms7/channelmanager/channels/ChannelUtil.java	(revision )
@@ -12,7 +12,7 @@
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
-final class ChannelUtil {
+public final class ChannelUtil {
 
     private static Logger log = LoggerFactory.getLogger(ChannelUtil.class);
 
@@ -24,7 +24,7 @@
      * @return the Channel Manager, or <code><null/code> if the channel manager cannot be loaded or is unavailable
      * (e.g. when the site is down).
      */
-    static ChannelManager getChannelManager() {
+    public static ChannelManager getChannelManager() {
         ComponentManager componentManager = HstServices.getComponentManager();
         if (componentManager == null) {
             return null;
@@ -38,7 +38,7 @@
      * @return the ChannelInfo class for the given channel, or <code>null</code> if the channel does not have a
      * custom ChannelInfo class or the channel manager could not be loaded (e.g. because the site is down).
      */
-    static Class<? extends ChannelInfo> getChannelInfoClass(Channel channel) {
+    public static Class<? extends ChannelInfo> getChannelInfoClass(Channel channel) {
         ChannelManager channelManager = getChannelManager();
         try {
             return channelManager == null ? null : getChannelManager().getChannelInfoClass(channel);
@@ -53,7 +53,7 @@
      * @return the resource bundle for the given channel, or <code>null</code> if the channel does not have a resource
      * bundle or the channel manager could not be loaded (e.g. because the site is down).
      */
-    static ResourceBundle getResourceBundle(Channel channel) {
+    public static ResourceBundle getResourceBundle(Channel channel) {
         ChannelManager channelManager = getChannelManager();
         return channelManager == null ? null : channelManager.getResourceBundle(channel, Session.get().getLocale());
     }
Index: frontend/src/main/java/org/onehippo/cms7/channelmanager/ChannelManagerPerspective.java
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- frontend/src/main/java/org/onehippo/cms7/channelmanager/ChannelManagerPerspective.java	(revision 35683)
+++ frontend/src/main/java/org/onehippo/cms7/channelmanager/ChannelManagerPerspective.java	(revision )
@@ -21,6 +21,7 @@
 
 import org.apache.wicket.ResourceReference;
 import org.apache.wicket.markup.html.CSSPackageResource;
+import org.apache.wicket.markup.html.panel.Fragment;
 import org.apache.wicket.model.IModel;
 import org.apache.wicket.model.Model;
 import org.apache.wicket.model.StringResourceModel;
@@ -32,6 +33,7 @@
 import org.hippoecm.frontend.plugins.yui.layout.WireframeSettings;
 import org.hippoecm.frontend.service.IRenderService;
 import org.hippoecm.frontend.service.IconSize;
+import org.onehippo.cms7.channelmanager.channels.ChannelUtil;
 import org.onehippo.cms7.channelmanager.service.IChannelManagerService;
 import org.onehippo.cms7.channelmanager.templatecomposer.PageEditor;
 
@@ -39,6 +41,7 @@
 
     private RootPanel rootPanel;
     private List<IRenderService> childservices = new LinkedList<IRenderService>();
+    private final boolean isSiteDown;
 
     public ChannelManagerPerspective(final IPluginContext context, final IPluginConfig config) {
         super(context, config);
@@ -50,10 +53,19 @@
         }
 
         add(CSSPackageResource.getHeaderContribution(ChannelManagerPerspective.class, "ChannelManagerPerspective.css"));
+        // Check whether the site is down
+        isSiteDown = ChannelUtil.getChannelManager() == null;
+        if (isSiteDown) {
+            final Fragment dimmedRootPanelFragment= new Fragment("channel-root", "dimmed-root-panel", this);
+            dimmedRootPanelFragment.add(new DimmedRootPanel("dimmed-root-panel-div"));
+            add(dimmedRootPanelFragment);
+        } else {
+            rootPanel = new RootPanel(context, config, "root-panel-div");
+            final Fragment rootPanelFragment = new Fragment("channel-root", "root-panel", this);
+            rootPanelFragment.add(rootPanel);
+            add(rootPanelFragment);
+        }
 
-        rootPanel = new RootPanel(context, config, "channel-root");
-        add(rootPanel);
-
         final String channelManagerServiceId = config.getString("channel.manager.service.id", IChannelManagerService.class.getName());
         context.registerService(this, channelManagerServiceId);
     }
@@ -65,17 +77,23 @@
 
     @Override
     public ResourceReference getIcon(IconSize type) {
+        if (isSiteDown) {
+            return new ResourceReference(ChannelManagerPerspective.class, "channel-manager-dimmed-" + type.getSize() + ".png");
+        } else {
-        return new ResourceReference(ChannelManagerPerspective.class, "channel-manager-" + type.getSize() + ".png");
-    }
+            return new ResourceReference(ChannelManagerPerspective.class, "channel-manager-" + type.getSize() + ".png");
+        }
+    }
 
     @Override
     public void render(final PluginRequestTarget target) {
         super.render(target);
+        if (!isSiteDown) {
-        rootPanel.render(target);
-        for (IRenderService child : childservices) {
-            child.render(target);
-        }
-    }
+            rootPanel.render(target);
+            for (IRenderService child : childservices) {
+                child.render(target);
+            }
+        }
+    }
 
     public void removeRenderService(final IRenderService service) {
         childservices.remove(service);
@@ -87,15 +105,17 @@
 
     @Override
     public void viewChannel(final String channelId, String pathInfo, String contextPath, String cmsPreviewPrefix, String templateComposerContextPath) {
+        if (!isSiteDown) {
-        PageEditor pageEditor = rootPanel.getPageEditor();
-        pageEditor.setChannel(channelId);
-        pageEditor.setRenderPathInfo(pathInfo);
-        pageEditor.setRenderContextPath(contextPath);
-        pageEditor.setCmsPreviewPrefix(cmsPreviewPrefix);
-        pageEditor.setTemplateComposerContextPath(templateComposerContextPath);
-        pageEditor.setPreviewMode(true);
-        rootPanel.setActiveCard(RootPanel.CardId.TEMPLATE_COMPOSER);
-        focus(null);
+            PageEditor pageEditor = rootPanel.getPageEditor();
+            pageEditor.setChannel(channelId);
+            pageEditor.setRenderPathInfo(pathInfo);
+            pageEditor.setRenderContextPath(contextPath);
+            pageEditor.setCmsPreviewPrefix(cmsPreviewPrefix);
+            pageEditor.setTemplateComposerContextPath(templateComposerContextPath);
+            pageEditor.setPreviewMode(true);
+            rootPanel.setActiveCard(RootPanel.CardId.TEMPLATE_COMPOSER);
+            focus(null);
+        }
     }
 
 }
Index: frontend/src/main/java/org/onehippo/cms7/channelmanager/DimmedRootPanel.css
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- frontend/src/main/java/org/onehippo/cms7/channelmanager/DimmedRootPanel.css	(revision )
+++ frontend/src/main/java/org/onehippo/cms7/channelmanager/DimmedRootPanel.css	(revision )
@@ -0,0 +1,12 @@
+/* Dimmed Root Panel styling */
+
+.channel-manager-error-status-message {
+  color: #000000;
+  font-size: 11px;
+  font-weight: bold;
+  text-align: center;
+  padding-top: 200px;
+  padding-left: 100px;
+  padding-right: 100px;
+  display: block;
+}
\ No newline at end of file
Index: frontend/src/main/java/org/onehippo/cms7/channelmanager/DimmedRootPanel.java
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- frontend/src/main/java/org/onehippo/cms7/channelmanager/DimmedRootPanel.java	(revision )
+++ frontend/src/main/java/org/onehippo/cms7/channelmanager/DimmedRootPanel.java	(revision )
@@ -0,0 +1,47 @@
+/*
+ *  Copyright 2011 Hippo.
+ *
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *  You may obtain a copy of the License at
+ *
+ *       http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ */
+package org.onehippo.cms7.channelmanager;
+
+import org.apache.wicket.markup.html.CSSPackageResource;
+import org.apache.wicket.markup.html.basic.Label;
+import org.apache.wicket.markup.html.resources.CompressedResourceReference;
+import org.apache.wicket.model.ResourceModel;
+import org.json.JSONException;
+import org.json.JSONObject;
+import org.wicketstuff.js.ext.ExtPanel;
+
+public class DimmedRootPanel extends ExtPanel {
+
+    private static final long serialVersionUID = 1L;
+
+    public DimmedRootPanel(String id) {
+        super(id);
+
+        add(new Label("siteStatusLabel", new ResourceModel("site.is.down.message", "Site might be down. Please check with your systems administrator.")));
+        add(CSSPackageResource.getHeaderContribution(new CompressedResourceReference(DimmedRootPanel.class, "DimmedRootPanel.css")));
+    }
+
+    @Override
+    protected void preRenderExtHead(StringBuilder js) {
+        super.preRenderExtHead(js);
+    }
+
+    @Override
+    protected void onRenderProperties(JSONObject properties) throws JSONException {
+        super.onRenderProperties(properties);
+    }
+
+}
\ No newline at end of file
