Ghost/ghost/admin/app/models/setting.js
Kevin Ansfield 24df9781cc Custom Post Templates UI (#878)
refs https://github.com/TryGhost/Ghost/issues/9060

- add `{{gh-psm-template-select}}` component
  - allows selection of a custom template for a post if the active theme has custom templates
  - loads themes on render, only hitting the server if not already in the store
  - disables select if post slug matches a `post-*.hbs` or `page-*.hbs` template
- adds `customTemplate` attr to `Post` model
- adds `templates` attr to `Theme` model with CPs to pull out custom vs post/page override templates
- add `.gh-select.disabled` styles to make disabled selects look visually disabled
2017-10-10 14:26:19 +02:00

35 lines
1.0 KiB
JavaScript

/* eslint-disable camelcase */
import Model from 'ember-data/model';
import ValidationEngine from 'ghost-admin/mixins/validation-engine';
import attr from 'ember-data/attr';
export default Model.extend(ValidationEngine, {
validationType: 'setting',
title: attr('string'),
description: attr('string'),
logo: attr('string'),
coverImage: attr('string'),
icon: attr('string'),
defaultLocale: attr('string'),
forceI18n: attr('boolean'),
permalinks: attr('string'),
activeTimezone: attr('string', {defaultValue: 'Etc/UTC'}),
ghostHead: attr('string'),
ghostFoot: attr('string'),
facebook: attr('facebook-url-user'),
twitter: attr('twitter-url-user'),
labs: attr('string'),
navigation: attr('navigation-settings'),
isPrivate: attr('boolean'),
publicHash: attr('string'),
password: attr('string'),
slack: attr('slack-settings'),
amp: attr('boolean'),
unsplash: attr('unsplash-settings', {
defaultValue() {
return {isActive: true};
}
})
});