From 5fd0e9674cdeb476defcc22f2f193ed4f2ae622c 2011-12-14 02:02:17
From: Stefan van der Walt <stefan@sun.ac.za>
Date: 2011-12-14 02:02:17
Subject: [PATCH] Correctly set read_only meta name for use in javascript.  Note that this has a different meaning than in the Python code: not whether the read-only flag was specified upon launch, but whether the notebook is in read-only mode and input should be disabled.

---

diff --git a/IPython/frontend/html/notebook/templates/notebook.html b/IPython/frontend/html/notebook/templates/notebook.html
index 5d313af..ab160a1 100644
--- a/IPython/frontend/html/notebook/templates/notebook.html
+++ b/IPython/frontend/html/notebook/templates/notebook.html
@@ -29,8 +29,10 @@
     <link rel="stylesheet" href="static/css/base.css" type="text/css" />
     <link rel="stylesheet" href="static/css/notebook.css" type="text/css" />
     <link rel="stylesheet" href="static/css/renderedhtml.css" type="text/css" />
-    
-    <meta name="read_only" content="{{read_only}}"/>
+
+    {% comment  In the notebook, the read-only flag is used to determine %}
+    {% comment  whether to hide the side panels and switch off input %}
+    <meta name="read_only" content="{{read_only and not logged_in}}"/>
 
 </head>