framework/js/old/admin/components/HeaderPrimary.js

30 lines
867 B
JavaScript
Raw Normal View History

import Component from '../../common/Component';
import ItemList from '../../common/utils/ItemList';
import listItems from '../../common/helpers/listItems';
2015-07-29 20:58:22 +09:30
/**
* The `HeaderPrimary` component displays primary header controls. On the
* default skin, these are shown just to the right of the forum title.
*/
export default class HeaderPrimary extends Component {
view() {
2020-04-17 11:57:55 +02:00
return <ul className="Header-controls">{listItems(this.items().toArray())}</ul>;
2015-07-29 20:58:22 +09:30
}
config(isInitialized, context) {
// Since this component is 'above' the content of the page (that is, it is a
// part of the global UI that persists between routes), we will flag the DOM
// to be retained across route changes.
context.retain = true;
}
2015-07-29 20:58:22 +09:30
/**
* Build an item list for the controls.
*
* @return {ItemList}
*/
items() {
return new ItemList();
}
}