mirror of
https://github.com/codeninjasllc/discourse.git
synced 2024-11-27 17:46:05 -05: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
2 changed files with 15 additions and 1 deletions
|
@ -1,6 +1,16 @@
|
|||
import computed from 'ember-addons/ember-computed-decorators';
|
||||
|
||||
export default Ember.Controller.extend({
|
||||
|
||||
needs: ['application'],
|
||||
|
||||
showLoginButton: Em.computed.equal("model.path", "login"),
|
||||
|
||||
@computed("model.path")
|
||||
showSignupButton() {
|
||||
return this.get("model.path") === "login" && this.get('controllers.application.canSignUp');
|
||||
},
|
||||
|
||||
actions: {
|
||||
markFaqRead() {
|
||||
const currentUser = this.currentUser;
|
||||
|
|
|
@ -3,8 +3,12 @@
|
|||
{{plugin-outlet "above-static"}}
|
||||
{{{model.html}}}
|
||||
|
||||
{{#if showSignupButton}}
|
||||
{{d-button action="showCreateAccount" class="btn-primary sign-up-button" label="sign_up"}}
|
||||
{{/if}}
|
||||
|
||||
{{#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}}
|
||||
</div>
|
||||
</div>
|
||||
|
|
Loading…
Reference in a new issue