mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-11-25 19:48:50 +03:00
2a77c0fe51
no issue - list custom post views in collapsable sidebar navigation - default views: Draft, Scheduled, Published (except for contributors) - record expanded/collapsed state of the navigation menus in user settings via new `navigation` service - adds `customViews` service that manages custom views - provides list of default views - gives access to "active" custom view based on current route and query params - manages loading/saving of custom views to user settings - show "Add view" button in the content filter when the posts list has been filtered - show "Edit view" button in the content filter when the posts list filter matches a saved view Co-authored-by: Peter Zimon <peter.zimon@gmail.com>
15 lines
356 B
JavaScript
15 lines
356 B
JavaScript
import BaseValidator from './base';
|
|
import {isBlank} from '@ember/utils';
|
|
|
|
export default BaseValidator.create({
|
|
properties: ['name'],
|
|
|
|
name(model) {
|
|
if (isBlank(model.name)) {
|
|
model.errors.add('name', 'Please enter a name');
|
|
model.hasValidated.pushObject('name');
|
|
this.invalidate();
|
|
}
|
|
}
|
|
});
|