mirror of
https://github.com/discourse/discourse.git
synced 2024-11-24 17:15:32 +08: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
|
@ -7,8 +7,15 @@
|
||||||
@module Discourse
|
@module Discourse
|
||||||
**/
|
**/
|
||||||
Discourse.StaticController = Discourse.Controller.extend({
|
Discourse.StaticController = Discourse.Controller.extend({
|
||||||
|
needs: ['header'],
|
||||||
|
path: null,
|
||||||
|
|
||||||
|
showLoginButton: function() {
|
||||||
|
return this.get('path') === '/login';
|
||||||
|
}.property('path'),
|
||||||
|
|
||||||
loadPath: function(path) {
|
loadPath: function(path) {
|
||||||
|
this.set('path', path);
|
||||||
var staticController = this;
|
var staticController = this;
|
||||||
this.set('content', null);
|
this.set('content', null);
|
||||||
|
|
||||||
|
|
|
@ -2,6 +2,10 @@
|
||||||
<div class='contents clearfix body-page'>
|
<div class='contents clearfix body-page'>
|
||||||
{{#if content}}
|
{{#if content}}
|
||||||
{{{content}}}
|
{{{content}}}
|
||||||
|
|
||||||
|
{{#if showLoginButton}}
|
||||||
|
<button class="btn btn-primary" {{action showLogin}}>{{i18n log_in}}</button>
|
||||||
|
{{/if}}
|
||||||
{{else}}
|
{{else}}
|
||||||
<div class='spinner'>{{i18n loading}}</div>
|
<div class='spinner'>{{i18n loading}}</div>
|
||||||
{{/if}}
|
{{/if}}
|
||||||
|
|
|
@ -14,6 +14,7 @@
|
||||||
font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
|
font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
|
||||||
font-size: 16px;
|
font-size: 16px;
|
||||||
line-height: 22px;
|
line-height: 22px;
|
||||||
|
margin: 20px 15px;
|
||||||
|
|
||||||
// Consistent vertical spacing
|
// Consistent vertical spacing
|
||||||
blockquote,
|
blockquote,
|
||||||
|
|
Loading…
Reference in New Issue
Block a user