##// END OF EJS Templates
Hide top login/logout buttons on login/logout pages.
Stefan van der Walt -
Show More
@@ -1,79 +1,85
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>{% block title %}IPython Notebook{% end %}</title>
7 <title>{% block title %}IPython Notebook{% end %}</title>
8
8
9 <link rel="stylesheet" href="static/jquery/css/themes/aristo/jquery-wijmo.css" type="text/css" />
9 <link rel="stylesheet" href="static/jquery/css/themes/aristo/jquery-wijmo.css" type="text/css" />
10 <link rel="stylesheet" href="static/css/boilerplate.css" type="text/css" />
10 <link rel="stylesheet" href="static/css/boilerplate.css" type="text/css" />
11 <link rel="stylesheet" href="static/css/layout.css" type="text/css" />
11 <link rel="stylesheet" href="static/css/layout.css" type="text/css" />
12 <link rel="stylesheet" href="static/css/base.css" type="text/css"/>
12 <link rel="stylesheet" href="static/css/base.css" type="text/css"/>
13 {% block stylesheet %}
13 {% block stylesheet %}
14 {% end %}
14 {% end %}
15
15
16 {% block meta %}
16 {% block meta %}
17 {% end %}
17 {% end %}
18
18
19 </head>
19 </head>
20
20
21 <body {% block params %}{% end %}>
21 <body {% block params %}{% end %}>
22
22
23 <div id="header">
23 <div id="header">
24 <span id="ipython_notebook"><h1><img src='static/ipynblogo.png' alt='IPython Notebook'/></h1></span>
24 <span id="ipython_notebook"><h1><img src='static/ipynblogo.png' alt='IPython Notebook'/></h1></span>
25
26 {% block login_widget %}
27
25 <span id="login_widget">
28 <span id="login_widget">
26 {% if logged_in %}
29 {% if logged_in %}
27 <button id="logout">Logout</button>
30 <button id="logout">Logout</button>
28 {% elif login_available and not logged_in %}
31 {% elif login_available and not logged_in %}
29 <button id="login">Login</button>
32 <button id="login">Login</button>
30 {% end %}
33 {% end %}
31 </span>
34 </span>
35
36 {% end %}
37
32 {% block header %}
38 {% block header %}
33 {% end %}
39 {% end %}
34 </div>
40 </div>
35
41
36 <div id="header_border"></div>
42 <div id="header_border"></div>
37
43
38 <div id="main_app">
44 <div id="main_app">
39
45
40 <div id="app_hbox">
46 <div id="app_hbox">
41
47
42 <div id="left_panel">
48 <div id="left_panel">
43 {% block left_panel %}
49 {% block left_panel %}
44 {% end %}
50 {% end %}
45 </div>
51 </div>
46
52
47 <div id="content_panel">
53 <div id="content_panel">
48 {% if message %}
54 {% if message %}
49
55
50 {% for key in message %}
56 {% for key in message %}
51 <div class="message {{key}}">
57 <div class="message {{key}}">
52 {{message[key]}}
58 {{message[key]}}
53 </div>
59 </div>
54 {% end %}
60 {% end %}
55 {% end %}
61 {% end %}
56
62
57 {% block content_panel %}
63 {% block content_panel %}
58 {% end %}
64 {% end %}
59 </div>
65 </div>
60 <div id="right_panel">
66 <div id="right_panel">
61 {% block right_panel %}
67 {% block right_panel %}
62 {% end %}
68 {% end %}
63 </div>
69 </div>
64
70
65 </div>
71 </div>
66
72
67 </div>
73 </div>
68
74
69 <script src="static/jquery/js/jquery-1.6.2.min.js" type="text/javascript" charset="utf-8"></script>
75 <script src="static/jquery/js/jquery-1.6.2.min.js" type="text/javascript" charset="utf-8"></script>
70 <script src="static/jquery/js/jquery-ui-1.8.14.custom.min.js" type="text/javascript" charset="utf-8"></script>
76 <script src="static/jquery/js/jquery-ui-1.8.14.custom.min.js" type="text/javascript" charset="utf-8"></script>
71 <script src="static/js/namespace.js" type="text/javascript" charset="utf-8"></script>
77 <script src="static/js/namespace.js" type="text/javascript" charset="utf-8"></script>
72 <script src="static/js/loginmain.js" type="text/javascript" charset="utf-8"></script>
78 <script src="static/js/loginmain.js" type="text/javascript" charset="utf-8"></script>
73 <script src="static/js/loginwidget.js" type="text/javascript" charset="utf-8"></script>
79 <script src="static/js/loginwidget.js" type="text/javascript" charset="utf-8"></script>
74 {% block script %}
80 {% block script %}
75 {% end %}
81 {% end %}
76
82
77 </body>
83 </body>
78
84
79 </html>
85 </html>
@@ -1,23 +1,26
1 {% extends layout.html %}
1 {% extends layout.html %}
2
2
3 {% block content_panel %}
3 {% block content_panel %}
4
4
5 {% if login_available %}
5 {% if login_available %}
6
6
7 <form action="/login?next={{url_escape(next)}}" method="post">
7 <form action="/login?next={{url_escape(next)}}" method="post">
8 Password: <input type="password" name="password" id="focus">
8 Password: <input type="password" name="password" id="focus">
9 <input type="submit" value="Sign in" id="signin">
9 <input type="submit" value="Sign in" id="signin">
10 </form>
10 </form>
11
11
12 {% end %}
12 {% end %}
13
13
14 {% end %}
14 {% end %}
15
15
16 {% block login_widget %}
17 {% end %}
18
16 {% block script %}
19 {% block script %}
17 <script type="text/javascript">
20 <script type="text/javascript">
18 $(document).ready(function() {
21 $(document).ready(function() {
19 IPython.login_widget = new IPython.LoginWidget('span#login_widget');
22 IPython.login_widget = new IPython.LoginWidget('span#login_widget');
20 $('#focus').focus();
23 $('#focus').focus();
21 });
24 });
22 </script>
25 </script>
23 {% end %}
26 {% end %}
@@ -1,25 +1,28
1 {% extends layout.html %}
1 {% extends layout.html %}
2
2
3 {% block content_panel %}
3 {% block content_panel %}
4 <ul>
4 <ul>
5 {% if read_only or not login_available %}
5 {% if read_only or not login_available %}
6
6
7 Proceed to the <a href="/">list of notebooks</a>.</li>
7 Proceed to the <a href="/">list of notebooks</a>.</li>
8
8
9 {% else %}
9 {% else %}
10
10
11 Proceed to the <a href="/login">login page</a>.</li>
11 Proceed to the <a href="/login">login page</a>.</li>
12
12
13 {% end %}
13 {% end %}
14
14
15 </ul>
15 </ul>
16
16
17 {% end %}
17 {% end %}
18
18
19 {% block login_widget %}
20 {% end %}
21
19 {% block script %}
22 {% block script %}
20 <script type="text/javascript">
23 <script type="text/javascript">
21 $(document).ready(function() {
24 $(document).ready(function() {
22 IPython.login_widget = new IPython.LoginWidget('span#login_widget');
25 IPython.login_widget = new IPython.LoginWidget('span#login_widget');
23 });
26 });
24 </script>
27 </script>
25 {% end %}
28 {% end %}
General Comments 0
You need to be logged in to leave comments. Login now