mirror of
https://github.com/discourse/discourse.git
synced 2025-04-26 23:54:29 +08:00
FIX: also show Sign Up button on front page of private sites that allow new registrations
This commit is contained in:
parent
3f67f91d27
commit
2ff4248c19
@ -1,6 +1,16 @@
|
|||||||
|
import computed from 'ember-addons/ember-computed-decorators';
|
||||||
|
|
||||||
export default Ember.Controller.extend({
|
export default Ember.Controller.extend({
|
||||||
|
|
||||||
|
needs: ['application'],
|
||||||
|
|
||||||
showLoginButton: Em.computed.equal("model.path", "login"),
|
showLoginButton: Em.computed.equal("model.path", "login"),
|
||||||
|
|
||||||
|
@computed("model.path")
|
||||||
|
showSignupButton() {
|
||||||
|
return this.get("model.path") === "login" && this.get('controllers.application.canSignUp');
|
||||||
|
},
|
||||||
|
|
||||||
actions: {
|
actions: {
|
||||||
markFaqRead() {
|
markFaqRead() {
|
||||||
const currentUser = this.currentUser;
|
const currentUser = this.currentUser;
|
||||||
|
@ -3,8 +3,12 @@
|
|||||||
{{plugin-outlet "above-static"}}
|
{{plugin-outlet "above-static"}}
|
||||||
{{{model.html}}}
|
{{{model.html}}}
|
||||||
|
|
||||||
|
{{#if showSignupButton}}
|
||||||
|
{{d-button action="showCreateAccount" class="btn-primary sign-up-button" label="sign_up"}}
|
||||||
|
{{/if}}
|
||||||
|
|
||||||
{{#if showLoginButton}}
|
{{#if showLoginButton}}
|
||||||
<button class="btn btn-primary" {{action "showLogin"}}>{{fa-icon "user"}}{{i18n 'log_in'}}</button>
|
{{d-button action="showLogin" class="btn-primary login-button" icon="user" label="log_in"}}
|
||||||
{{/if}}
|
{{/if}}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user