Show Log In button at the bottom of the page body when login_required and not logged in

This commit is contained in:
Neil Lalonde 2013-10-25 16:05:59 -04:00
parent f4d9bf9181
commit ce2af5c6d1
3 changed files with 12 additions and 0 deletions

View file

@ -7,8 +7,15 @@
@module Discourse
**/
Discourse.StaticController = Discourse.Controller.extend({
needs: ['header'],
path: null,
showLoginButton: function() {
return this.get('path') === '/login';
}.property('path'),
loadPath: function(path) {
this.set('path', path);
var staticController = this;
this.set('content', null);

View file

@ -2,6 +2,10 @@
<div class='contents clearfix body-page'>
{{#if content}}
{{{content}}}
{{#if showLoginButton}}
<button class="btn btn-primary" {{action showLogin}}>{{i18n log_in}}</button>
{{/if}}
{{else}}
<div class='spinner'>{{i18n loading}}</div>
{{/if}}

View file

@ -14,6 +14,7 @@
font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
font-size: 16px;
line-height: 22px;
margin: 20px 15px;
// Consistent vertical spacing
blockquote,