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