##// END OF EJS Templates
Display login button in read-only mode.
Stefan van der Walt -
Show More
@@ -22,12 +22,16 b' var IPython = (function (IPython) {'
22 22
23 23 LoginWidget.prototype.style = function () {
24 24 this.element.find('button#logout').button();
25 this.element.find('button#login').button();
25 26 };
26 27 LoginWidget.prototype.bind_events = function () {
27 28 var that = this;
28 29 this.element.find("button#logout").click(function () {
29 30 window.location = "/logout";
30 31 });
32 this.element.find("button#login").click(function () {
33 window.location = "/login";
34 });
31 35 };
32 36
33 37 // Set module variables
@@ -25,6 +25,8 b''
25 25 <span id="login_widget">
26 26 {% if current_user and current_user != 'anonymous' %}
27 27 <button id="logout">Logout</button>
28 {% else %}
29 <button id="login">Login</button>
28 30 {% end %}
29 31 </span>
30 32 {% block header %}
@@ -54,6 +54,8 b''
54 54 {% comment when appropriate until notebook.html is templated %}
55 55 {% if current_user and current_user != 'anonymous' %}
56 56 <button id="logout">Logout</button>
57 {% else %}
58 <button id="login">Login</button>
57 59 {% end %}
58 60 </span>
59 61
General Comments 0
You need to be logged in to leave comments. Login now