mirror of
https://github.com/flarum/framework.git
synced 2024-12-05 00:43:39 +08:00
24 lines
550 B
JavaScript
24 lines
550 B
JavaScript
import Ember from 'ember';
|
|
|
|
export default Ember.Controller.extend({
|
|
|
|
// The title of the forum.
|
|
// TODO: Preload this value in the index.html payload from Laravel config.
|
|
forumTitle: 'Flarum Demo Forum',
|
|
|
|
// The title of the current page. This should be set as appropriate in
|
|
// controllers/views.
|
|
pageTitle: '',
|
|
|
|
backButtonTarget: null,
|
|
|
|
searchQuery: '',
|
|
searchActive: false,
|
|
|
|
actions: {
|
|
search: function(query) {
|
|
this.transitionToRoute('index', {queryParams: {searchQuery: query, sort: query ? 'relevance' : 'recent'}});
|
|
}
|
|
}
|
|
});
|