##// END OF EJS Templates
Adding data-project to the body data attribs.
Brian E. Granger -
Show More
@@ -61,8 +61,10 b' class NBBrowserHandler(AuthenticatedHandler):'
61 def get(self):
61 def get(self):
62 nbm = self.application.notebook_manager
62 nbm = self.application.notebook_manager
63 project = nbm.notebook_dir
63 project = nbm.notebook_dir
64 self.render('nbbrowser.html', project=project,
64 self.render(
65 base_project_url=u'/', base_kernel_url=u'/')
65 'nbbrowser.html', project=project,
66 base_project_url=u'/', base_kernel_url=u'/'
67 )
66
68
67
69
68 class LoginHandler(AuthenticatedHandler):
70 class LoginHandler(AuthenticatedHandler):
@@ -82,9 +84,14 b' class NewHandler(AuthenticatedHandler):'
82
84
83 @web.authenticated
85 @web.authenticated
84 def get(self):
86 def get(self):
85 notebook_id = self.application.notebook_manager.new_notebook()
87 nbm = self.application.notebook_manager
86 self.render('notebook.html', notebook_id=notebook_id,
88 project = nbm.notebook_dir
87 base_project_url=u'/', base_kernel_url=u'/')
89 notebook_id = nbm.new_notebook()
90 self.render(
91 'notebook.html', project=project,
92 notebook_id=notebook_id,
93 base_project_url=u'/', base_kernel_url=u'/'
94 )
88
95
89
96
90 class NamedNotebookHandler(AuthenticatedHandler):
97 class NamedNotebookHandler(AuthenticatedHandler):
@@ -92,10 +99,14 b' class NamedNotebookHandler(AuthenticatedHandler):'
92 @web.authenticated
99 @web.authenticated
93 def get(self, notebook_id):
100 def get(self, notebook_id):
94 nbm = self.application.notebook_manager
101 nbm = self.application.notebook_manager
102 project = nbm.notebook_dir
95 if not nbm.notebook_exists(notebook_id):
103 if not nbm.notebook_exists(notebook_id):
96 raise web.HTTPError(404, u'Notebook does not exist: %s' % notebook_id)
104 raise web.HTTPError(404, u'Notebook does not exist: %s' % notebook_id)
97 self.render('notebook.html', notebook_id=notebook_id,
105 self.render(
98 base_project_url=u'/', base_kernel_url=u'/')
106 'notebook.html', project=project,
107 notebook_id=notebook_id,
108 base_project_url=u'/', base_kernel_url=u'/'
109 )
99
110
100
111
101 #-----------------------------------------------------------------------------
112 #-----------------------------------------------------------------------------
@@ -14,7 +14,8 b''
14
14
15 </head>
15 </head>
16
16
17 <body data-base-project-url={{base_project_url}} data-base-kernel-url={{base_kernel_url}}>
17 <body data-project={{project}} data-base-project-url={{base_project_url}}
18 data-base-kernel-url={{base_kernel_url}}>
18
19
19 <div id="header">
20 <div id="header">
20 <span id="ipython_notebook"><h1>IPython Notebook</h1></span>
21 <span id="ipython_notebook"><h1>IPython Notebook</h1></span>
@@ -44,8 +44,10 b''
44
44
45 </head>
45 </head>
46
46
47 <body data-base-project-url={{base_project_url}} data-base-kernel-url={{base_kernel_url}}
47 <body onload='CheckMathJax();'
48 data-notebook-id={{notebook_id}} onload='CheckMathJax();'>
48 data-project={{project}} data-notebook-id={{notebook_id}}
49 data-base-project-url={{base_project_url}} data-base-kernel-url={{base_kernel_url}}
50 >
49
51
50 <div id="header">
52 <div id="header">
51 <span id="ipython_notebook"><h1>IPython Notebook</h1></span>
53 <span id="ipython_notebook"><h1>IPython Notebook</h1></span>
General Comments 0
You need to be logged in to leave comments. Login now