This repository has been archived by the owner on Nov 28, 2022. It is now read-only.
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
🎨 Separated post and page list screens
no issue - added `page` model - removed `page` param from Post model - added pages screen with associated links - added `:type` param to editor screens to work with the right models - removed post<->page toggle and associated tour item
- Loading branch information
1 parent
b18625b
commit f3a8d73
Showing
39 changed files
with
561 additions
and
239 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
import PostsLoadingController from './posts-loading'; | ||
import {inject as controller} from '@ember/controller'; | ||
|
||
/* eslint-disable ghost/ember/alias-model-in-controller */ | ||
export default PostsLoadingController.extend({ | ||
postsController: controller('pages') | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
import PostsController from './posts'; | ||
|
||
const TYPES = [{ | ||
name: 'All pages', | ||
value: null | ||
}, { | ||
name: 'Draft pages', | ||
value: 'draft' | ||
}, { | ||
name: 'Published pages', | ||
value: 'published' | ||
}, { | ||
name: 'Scheduled pages', | ||
value: 'scheduled' | ||
}, { | ||
name: 'Featured pages', | ||
value: 'featured' | ||
}]; | ||
|
||
const ORDERS = [{ | ||
name: 'Newest', | ||
value: null | ||
}, { | ||
name: 'Oldest', | ||
value: 'published_at asc' | ||
}, { | ||
name: 'Recently updated', | ||
value: 'updated_at desc' | ||
}]; | ||
|
||
/* eslint-disable ghost/ember/alias-model-in-controller */ | ||
export default PostsController.extend({ | ||
init() { | ||
this._super(...arguments); | ||
this.availableTypes = TYPES; | ||
this.availableOrders = ORDERS; | ||
}, | ||
|
||
actions: { | ||
openEditor(page) { | ||
this.transitionToRoute('editor.edit', 'page', page.get('id')); | ||
} | ||
} | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
import PostModel from './post'; | ||
|
||
export default PostModel.extend({ | ||
displayName: 'page' | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
import AuthenticatedRoute from 'ghost-admin/routes/authenticated'; | ||
|
||
export default AuthenticatedRoute.extend({ | ||
beforeModel() { | ||
this._super(...arguments); | ||
this.replaceWith('editor.new', 'post'); | ||
} | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
import PostsRoute from './posts'; | ||
|
||
export default PostsRoute.extend({ | ||
titleToken: 'Pages', | ||
modelName: 'page' | ||
}); |
Oops, something went wrong.