Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Show login button on 404 page. Add routes to show login and signup mo…
…dals when page/route loads. If logged in and showing 404 page, load ember app.
- Loading branch information
Showing
9 changed files
with
48 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
Discourse.LoginRoute = Discourse.Route.extend({ | ||
beforeModel: function() { | ||
if (!Discourse.SiteSetting.login_required) { | ||
This comment has been minimized.
Sorry, something went wrong. |
||
this.transitionTo('discovery.latest').then(function(e) { | ||
This comment has been minimized.
Sorry, something went wrong. |
||
Ember.run.next(function() { | ||
e.send('showLogin'); | ||
}); | ||
}); | ||
} | ||
} | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
Discourse.SignupRoute = Discourse.Route.extend({ | ||
beforeModel: function() { | ||
this.transitionTo('discovery.latest').then(function(e) { | ||
This comment has been minimized.
Sorry, something went wrong.
eviltrout
Contributor
|
||
Ember.run.next(function() { | ||
e.send('showCreateAccount'); | ||
}); | ||
}); | ||
} | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,3 @@ | ||
<%= markdown_content(:login_required_welcome_message) %> | ||
<% if SiteSetting.login_required %> | ||
<%= markdown_content(:login_required_welcome_message) %> | ||
<% end %> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Typo? Shouldn't this be "Discourse.SiteSettings.login_required"?