UX: Show the footer on the user summary and preferences pages

This commit is contained in:
Robin Ward 2018-02-07 11:35:00 -05:00
parent fb91d24deb
commit c0ef6ca01c
13 changed files with 37 additions and 0 deletions

View File

@ -1,11 +1,19 @@
import Composer from 'discourse/models/composer';
const DiscourseRoute = Ember.Route.extend({
showFooter: false,
// Set to true to refresh a model without a transition if a query param
// changes
resfreshQueryWithoutTransition: false,
activate() {
this._super();
if (this.get('showFooter')) {
this.controllerFor('application').set('showFooter', true);
}
},
refresh() {
if (!this.refreshQueryWithoutTransition) { return this._super(); }

View File

@ -1,6 +1,8 @@
import RestrictedUserRoute from "discourse/routes/restricted-user";
export default RestrictedUserRoute.extend({
showFooter: true,
model: function() {
return this.modelFor('user');
},

View File

@ -1,6 +1,8 @@
import RestrictedUserRoute from "discourse/routes/restricted-user";
export default RestrictedUserRoute.extend({
showFooter: true,
setupController(controller, user) {
controller.reset();
controller.setProperties({

View File

@ -2,6 +2,8 @@ import UserBadge from 'discourse/models/user-badge';
import RestrictedUserRoute from "discourse/routes/restricted-user";
export default RestrictedUserRoute.extend({
showFooter: true,
model: function() {
return UserBadge.findByUsername(this.modelFor('user').get('username'));
},

View File

@ -2,6 +2,8 @@ import UserBadge from 'discourse/models/user-badge';
import RestrictedUserRoute from "discourse/routes/restricted-user";
export default RestrictedUserRoute.extend({
showFooter: true,
model: function() {
return UserBadge.findByUsername(this.modelFor('user').get('username'));
},

View File

@ -0,0 +1,5 @@
import RestrictedUserRoute from "discourse/routes/restricted-user";
export default RestrictedUserRoute.extend({
showFooter: true
});

View File

@ -1,6 +1,8 @@
import RestrictedUserRoute from "discourse/routes/restricted-user";
export default RestrictedUserRoute.extend({
showFooter: true,
model: function() {
return this.modelFor('user');
},

View File

@ -1,6 +1,8 @@
import RestrictedUserRoute from "discourse/routes/restricted-user";
export default RestrictedUserRoute.extend({
showFooter: true,
redirect() {
this.transitionTo('preferences.account');
}

View File

@ -1,6 +1,8 @@
import RestrictedUserRoute from "discourse/routes/restricted-user";
export default RestrictedUserRoute.extend({
showFooter: true,
setupController(controller, user) {
controller.setProperties({
model: user

View File

@ -0,0 +1,5 @@
import RestrictedUserRoute from "discourse/routes/restricted-user";
export default RestrictedUserRoute.extend({
showFooter: true
});

View File

@ -1,6 +1,8 @@
import RestrictedUserRoute from "discourse/routes/restricted-user";
export default RestrictedUserRoute.extend({
showFooter: true,
model: function() {
return this.modelFor('user');
},

View File

@ -3,6 +3,7 @@ import showModal from 'discourse/lib/show-modal';
import { popupAjaxError } from 'discourse/lib/ajax-error';
export default RestrictedUserRoute.extend({
model() {
return this.modelFor('user');
},

View File

@ -1,4 +1,6 @@
export default Discourse.Route.extend({
showFooter: true,
model() {
return this.modelFor("user").summary();
},