mirror of
https://github.com/codeninjasllc/discourse.git
synced 2024-11-27 17:46:05 -05:00
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
3 changed files with 12 additions and 0 deletions
|
@ -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 a new issue