From ec89b7c98b765bfaaabab455c7b82c1bb55b77a4 Mon Sep 17 00:00:00 2001 From: Stefan van der Walt Date: Wed, 30 Nov 2011 23:44:20 -0800 Subject: [PATCH] Display login button in read-only mode. --- IPython/frontend/html/notebook/static/js/loginwidget.js | 4 ++++ IPython/frontend/html/notebook/templates/layout.html | 2 ++ IPython/frontend/html/notebook/templates/notebook.html | 2 ++ 3 files changed, 8 insertions(+) diff --git a/IPython/frontend/html/notebook/static/js/loginwidget.js b/IPython/frontend/html/notebook/static/js/loginwidget.js index 6ba8075d6..763118e8d 100644 --- a/IPython/frontend/html/notebook/static/js/loginwidget.js +++ b/IPython/frontend/html/notebook/static/js/loginwidget.js @@ -22,12 +22,16 @@ var IPython = (function (IPython) { LoginWidget.prototype.style = function () { this.element.find('button#logout').button(); + this.element.find('button#login').button(); }; LoginWidget.prototype.bind_events = function () { var that = this; this.element.find("button#logout").click(function () { window.location = "/logout"; }); + this.element.find("button#login").click(function () { + window.location = "/login"; + }); }; // Set module variables diff --git a/IPython/frontend/html/notebook/templates/layout.html b/IPython/frontend/html/notebook/templates/layout.html index 7d6b5f526..ddc9c444f 100644 --- a/IPython/frontend/html/notebook/templates/layout.html +++ b/IPython/frontend/html/notebook/templates/layout.html @@ -25,6 +25,8 @@ {% if current_user and current_user != 'anonymous' %} + {% else %} + {% end %} {% block header %} diff --git a/IPython/frontend/html/notebook/templates/notebook.html b/IPython/frontend/html/notebook/templates/notebook.html index 8e6e70daf..037d135c9 100644 --- a/IPython/frontend/html/notebook/templates/notebook.html +++ b/IPython/frontend/html/notebook/templates/notebook.html @@ -54,6 +54,8 @@ {% comment when appropriate until notebook.html is templated %} {% if current_user and current_user != 'anonymous' %} + {% else %} + {% end %}