Show Log In button at the bottom of the page body when login_required and not logged in
This commit is contained in:
parent
f4d9bf9181
commit
ce2af5c6d1
|
@ -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);
|
||||
|
||||
|
|
|
@ -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}}
|
||||
|
|
|
@ -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,
|
||||
|
|
Loading…
Reference in New Issue