##// END OF EJS Templates
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.
Stefan van der Walt -
Show More
@@ -1,296 +1,298 b''
1 1 <!DOCTYPE HTML>
2 2 <html>
3 3
4 4 <head>
5 5 <meta charset="utf-8">
6 6
7 7 <title>IPython Notebook</title>
8 8
9 9 {% if mathjax_url %}
10 10 <script type="text/javascript" src="{{mathjax_url}}?config=TeX-AMS_HTML" charset="utf-8"></script>
11 11 {% end %}
12 12 <script type="text/javascript">
13 13 // MathJax disabled, set as null to distingish from *missing* MathJax,
14 14 // where it will be undefined, and should prompt a dialog later.
15 15 window.mathjax_url = "{{mathjax_url}}";
16 16 </script>
17 17
18 18 <link rel="stylesheet" href="static/jquery/css/themes/aristo/jquery-wijmo.css" type="text/css" />
19 19 <link rel="stylesheet" href="static/codemirror/lib/codemirror.css">
20 20 <link rel="stylesheet" href="static/codemirror/mode/markdown/markdown.css">
21 21 <link rel="stylesheet" href="static/codemirror/mode/rst/rst.css">
22 22 <link rel="stylesheet" href="static/codemirror/theme/ipython.css">
23 23 <link rel="stylesheet" href="static/codemirror/theme/default.css">
24 24
25 25 <link rel="stylesheet" href="static/prettify/prettify.css"/>
26 26
27 27 <link rel="stylesheet" href="static/css/boilerplate.css" type="text/css" />
28 28 <link rel="stylesheet" href="static/css/layout.css" type="text/css" />
29 29 <link rel="stylesheet" href="static/css/base.css" type="text/css" />
30 30 <link rel="stylesheet" href="static/css/notebook.css" type="text/css" />
31 31 <link rel="stylesheet" href="static/css/renderedhtml.css" type="text/css" />
32 32
33 <meta name="read_only" content="{{read_only}}"/>
33 {% comment In the notebook, the read-only flag is used to determine %}
34 {% comment whether to hide the side panels and switch off input %}
35 <meta name="read_only" content="{{read_only and not logged_in}}"/>
34 36
35 37 </head>
36 38
37 39 <body
38 40 data-project={{project}} data-notebook-id={{notebook_id}}
39 41 data-base-project-url={{base_project_url}} data-base-kernel-url={{base_kernel_url}}
40 42 >
41 43
42 44 <div id="header">
43 45 <span id="ipython_notebook"><h1><a href='..' alt='dashboard'><img src='static/ipynblogo.png' alt='IPython Notebook'/></a></h1></span>
44 46 <span id="save_widget">
45 47 <input type="text" id="notebook_name" size="20"></textarea>
46 48 <button id="save_notebook"><u>S</u>ave</button>
47 49 </span>
48 50 <span id="quick_help_area">
49 51 <button id="quick_help">Quick<u>H</u>elp</button>
50 52 </span>
51 53
52 54 <span id="login_widget">
53 55 {% comment This is a temporary workaround to hide the logout button %}
54 56 {% comment when appropriate until notebook.html is templated %}
55 57 {% if logged_in %}
56 58 <button id="logout">Logout</button>
57 59 {% elif not logged_in and login_available %}
58 60 <button id="login">Login</button>
59 61 {% end %}
60 62 </span>
61 63
62 64 <span id="kernel_status">Idle</span>
63 65 </div>
64 66
65 67 <div id="main_app">
66 68
67 69 <div id="left_panel">
68 70
69 71 <div id="notebook_section">
70 72 <div class="section_header">
71 73 <h3>Notebook</h3>
72 74 </div>
73 75 <div class="section_content">
74 76 <div class="section_row">
75 77 <span id="new_open" class="section_row_buttons">
76 78 <button id="new_notebook">New</button>
77 79 <button id="open_notebook">Open</button>
78 80 </span>
79 81 <span class="section_row_header">Actions</span>
80 82 </div>
81 83 <div class="section_row">
82 84 <span>
83 85 <select id="download_format">
84 86 <option value="json">ipynb</option>
85 87 <option value="py">py</option>
86 88 </select>
87 89 </span>
88 90 <span class="section_row_buttons">
89 91 <button id="download_notebook">Download</button>
90 92 </span>
91 93 </div>
92 94 <div class="section_row">
93 95 <span class="section_row_buttons">
94 96 <span id="print_widget">
95 97 <button id="print_notebook">Print</button>
96 98 </span>
97 99 </span>
98 100 </div>
99 101 </div>
100 102 </div>
101 103
102 104 <div id="cell_section">
103 105 <div class="section_header">
104 106 <h3>Cell</h3>
105 107 </div>
106 108 <div class="section_content">
107 109 <div class="section_row">
108 110 <span class="section_row_buttons">
109 111 <button id="delete_cell"><u>D</u>elete</button>
110 112 </span>
111 113 <span class="section_row_header">Actions</span>
112 114 </div>
113 115 <div class="section_row">
114 116 <span id="cell_type" class="section_row_buttons">
115 117 <button id="to_code"><u>C</u>ode</button>
116 118 <!-- <button id="to_html">HTML</button>-->
117 119 <button id="to_markdown"><u>M</u>arkdown</button>
118 120 </span>
119 121 <span class="button_label">Format</span>
120 122 </div>
121 123 <div class="section_row">
122 124 <span id="cell_output" class="section_row_buttons">
123 125 <button id="toggle_output"><u>T</u>oggle</button>
124 126 <button id="clear_all_output">ClearAll</button>
125 127 </span>
126 128 <span class="button_label">Output</span>
127 129 </div>
128 130 <div class="section_row">
129 131 <span id="insert" class="section_row_buttons">
130 132 <button id="insert_cell_above"><u>A</u>bove</button>
131 133 <button id="insert_cell_below"><u>B</u>elow</button>
132 134 </span>
133 135 <span class="button_label">Insert</span>
134 136 </div>
135 137 <div class="section_row">
136 138 <span id="move" class="section_row_buttons">
137 139 <button id="move_cell_up">Up</button>
138 140 <button id="move_cell_down">Down</button>
139 141 </span>
140 142 <span class="button_label">Move</span>
141 143 </div>
142 144 <div class="section_row">
143 145 <span id="run_cells" class="section_row_buttons">
144 146 <button id="run_selected_cell">Selected</button>
145 147 <button id="run_all_cells">All</button>
146 148 </span>
147 149 <span class="button_label">Run</span>
148 150 </div>
149 151 <div class="section_row">
150 152 <span id="autoindent_span">
151 153 <input type="checkbox" id="autoindent" checked="true"></input>
152 154 </span>
153 155 <span class="checkbox_label" id="autoindent_label">Autoindent:</span>
154 156 </div>
155 157 </div>
156 158 </div>
157 159
158 160 <div id="kernel_section">
159 161 <div class="section_header">
160 162 <h3>Kernel</h3>
161 163 </div>
162 164 <div class="section_content">
163 165 <div class="section_row">
164 166 <span id="int_restart" class="section_row_buttons">
165 167 <button id="int_kernel"><u>I</u>nterrupt</button>
166 168 <button id="restart_kernel">Restart</button>
167 169 </span>
168 170 <span class="section_row_header">Actions</span>
169 171 </div>
170 172 <div class="section_row">
171 173 <span id="kernel_persist">
172 174 {% if kill_kernel %}
173 175 <input type="checkbox" id="kill_kernel" checked="true"></input>
174 176 {% else %}
175 177 <input type="checkbox" id="kill_kernel"></input>
176 178 {% end %}
177 179 </span>
178 180 <span class="checkbox_label" id="kill_kernel_label">Kill kernel upon exit:</span>
179 181 </div>
180 182 </div>
181 183 </div>
182 184
183 185 <div id="help_section">
184 186 <div class="section_header">
185 187 <h3>Help</h3>
186 188 </div>
187 189 <div class="section_content">
188 190 <div class="section_row">
189 191 <span id="help_buttons0" class="section_row_buttons">
190 192 <a id="python_help" href="http://docs.python.org" target="_blank">Python</a>
191 193 <a id="ipython_help" href="http://ipython.org/documentation.html" target="_blank">IPython</a>
192 194 </span>
193 195 <span class="section_row_header">Links</span>
194 196 </div>
195 197 <div class="section_row">
196 198 <span id="help_buttons1" class="section_row_buttons">
197 199 <a id="numpy_help" href="http://docs.scipy.org/doc/numpy/reference/" target="_blank">NumPy</a>
198 200 <a id="scipy_help" href="http://docs.scipy.org/doc/scipy/reference/" target="_blank">SciPy</a>
199 201 </span>
200 202 </div>
201 203 <div class="section_row">
202 204 <span id="help_buttons2" class="section_row_buttons">
203 205 <a id="matplotlib_help" href="http://matplotlib.sourceforge.net/" target="_blank">MPL</a>
204 206 <a id="sympy_help" href="http://docs.sympy.org/dev/index.html" target="_blank">SymPy</a>
205 207 </span>
206 208 </div>
207 209 <div class="section_row">
208 210 <span class="help_string">run selected cell</span>
209 211 <span class="help_string_label">Shift-Enter :</span>
210 212 </div>
211 213 <div class="section_row">
212 214 <span class="help_string">run selected cell in-place</span>
213 215 <span class="help_string_label">Ctrl-Enter :</span>
214 216 </div>
215 217 <div class="section_row">
216 218 <span class="help_string">show keyboard shortcuts</span>
217 219 <span class="help_string_label">Ctrl-m h :</span>
218 220 </div>
219 221 </div>
220 222 </div>
221 223
222 224 <div id="config_section">
223 225 <div class="section_header">
224 226 <h3>Configuration</h3>
225 227 </div>
226 228 <div class="section_content">
227 229 <div class="section_row">
228 230 <span id="tooltipontab_span">
229 231 <input type="checkbox" id="tooltipontab" checked="true"></input>
230 232 </span>
231 233 <span class="checkbox_label" id="tooltipontab_label">Tooltip on tab:</span>
232 234 </div>
233 235 <div class="section_row">
234 236 <span id="smartcompleter_span">
235 237 <input type="checkbox" id="smartcompleter" checked="true"></input>
236 238 </span>
237 239 <span class="checkbox_label" id="smartcompleter_label">Smart completer:</span>
238 240 </div>
239 241 <div class="section_row">
240 242 <span id="timebeforetooltip_span">
241 243 <input type="text" id="timebeforetooltip" value="1200" size='6'></input>
242 244 <span class="numeric_input_label" id="timebeforetooltip_unit">milliseconds</span>
243 245 </span>
244 246 <span class="numeric_input_label" id="timebeforetooltip_label">Time before tooltip : </span>
245 247 </div>
246 248 </div>
247 249 </div>
248 250
249 251 </div>
250 252 <div id="left_panel_splitter"></div>
251 253 <div id="notebook_panel">
252 254 <div id="notebook"></div>
253 255 <div id="pager_splitter"></div>
254 256 <div id="pager"></div>
255 257 </div>
256 258
257 259 </div>
258 260
259 261 <script src="static/jquery/js/jquery-1.6.2.min.js" type="text/javascript" charset="utf-8"></script>
260 262 <script src="static/jquery/js/jquery-ui-1.8.14.custom.min.js" type="text/javascript" charset="utf-8"></script>
261 263 <script src="static/jquery/js/jquery.autogrow.js" type="text/javascript" charset="utf-8"></script>
262 264
263 265 <script src="static/codemirror/lib/codemirror.js" charset="utf-8"></script>
264 266 <script src="static/codemirror/mode/python/python.js" charset="utf-8"></script>
265 267 <script src="static/codemirror/mode/htmlmixed/htmlmixed.js" charset="utf-8"></script>
266 268 <script src="static/codemirror/mode/xml/xml.js" charset="utf-8"></script>
267 269 <script src="static/codemirror/mode/javascript/javascript.js" charset="utf-8"></script>
268 270 <script src="static/codemirror/mode/css/css.js" charset="utf-8"></script>
269 271 <script src="static/codemirror/mode/rst/rst.js" charset="utf-8"></script>
270 272 <script src="static/codemirror/mode/markdown/markdown.js" charset="utf-8"></script>
271 273
272 274 <script src="static/pagedown/Markdown.Converter.js" charset="utf-8"></script>
273 275
274 276 <script src="static/prettify/prettify.js" charset="utf-8"></script>
275 277
276 278 <script src="static/js/namespace.js" type="text/javascript" charset="utf-8"></script>
277 279 <script src="static/js/utils.js" type="text/javascript" charset="utf-8"></script>
278 280 <script src="static/js/cell.js" type="text/javascript" charset="utf-8"></script>
279 281 <script src="static/js/codecell.js" type="text/javascript" charset="utf-8"></script>
280 282 <script src="static/js/textcell.js" type="text/javascript" charset="utf-8"></script>
281 283 <script src="static/js/kernel.js" type="text/javascript" charset="utf-8"></script>
282 284 <script src="static/js/kernelstatus.js" type="text/javascript" charset="utf-8"></script>
283 285 <script src="static/js/layout.js" type="text/javascript" charset="utf-8"></script>
284 286 <script src="static/js/savewidget.js" type="text/javascript" charset="utf-8"></script>
285 287 <script src="static/js/quickhelp.js" type="text/javascript" charset="utf-8"></script>
286 288 <script src="static/js/loginwidget.js" type="text/javascript" charset="utf-8"></script>
287 289 <script src="static/js/pager.js" type="text/javascript" charset="utf-8"></script>
288 290 <script src="static/js/panelsection.js" type="text/javascript" charset="utf-8"></script>
289 291 <script src="static/js/printwidget.js" type="text/javascript" charset="utf-8"></script>
290 292 <script src="static/js/leftpanel.js" type="text/javascript" charset="utf-8"></script>
291 293 <script src="static/js/notebook.js" type="text/javascript" charset="utf-8"></script>
292 294 <script src="static/js/notebookmain.js" type="text/javascript" charset="utf-8"></script>
293 295
294 296 </body>
295 297
296 298 </html>
General Comments 0
You need to be logged in to leave comments. Login now