2015-02-13 07:22:32 +03:00
|
|
|
import Ember from 'ember';
|
2014-06-25 16:12:48 +04:00
|
|
|
|
2015-07-16 17:12:03 +03:00
|
|
|
export default Ember.Controller.extend({
|
|
|
|
appController: Ember.inject.controller('application'),
|
2015-05-26 05:10:50 +03:00
|
|
|
ghostPaths: Ember.inject.service('ghost-paths'),
|
|
|
|
|
2015-07-16 17:12:03 +03:00
|
|
|
showBackLink: Ember.computed.match('appController.currentRouteName', /^setup\.(two|three)$/),
|
2014-06-25 16:12:48 +04:00
|
|
|
|
2015-07-16 17:12:03 +03:00
|
|
|
backRoute: Ember.computed('appController.currentRouteName', function () {
|
|
|
|
var appController = this.get('appController'),
|
|
|
|
currentRoute = Ember.get(appController, 'currentRouteName');
|
2014-06-25 16:12:48 +04:00
|
|
|
|
2015-07-16 17:12:03 +03:00
|
|
|
return currentRoute === 'setup.two' ? 'setup.one' : 'setup.two';
|
|
|
|
})
|
2014-06-25 16:12:48 +04:00
|
|
|
});
|