1
0
Fork 0
mirror of https://github.com/TryGhost/Ghost-Admin.git synced 2023-12-14 02:33:04 +01:00
Ghost-Admin/app/templates/posts-loading.hbs
Kevin Ansfield 25add1d4ac Extracted duplicated posts/pages filter into a component
no issue

- posts and pages (and their corresponding `-loading` counterparts) templates were all duplicating a lengthy section of handlebars
- extracted the duplicated handlebars into a template for easier design changes or upgrading of `ember-power-select`
- moved generation of the "selected" CSS classes into the template to clean up code in the controller
2020-01-15 15:15:20 +00:00

27 lines
1.2 KiB
Handlebars

<section class="gh-canvas" {{did-insert (action "setMainClass" "gh-main-primarybg" target=this.ui)}}>
<header class="gh-canvas-header post-header">
<h2 class="gh-canvas-title" data-test-screen-title>Posts</h2>
<section class="view-actions">
<GhContentfilter
@selectedType={{this.selectedType}}
@availableTypes={{this.availableTypes}}
@onTypeChange={{action (mut k)}}
@selectedAuthor={{this.selectedAuthor}}
@availableAuthors={{this.availableAuthors}}
@onAuthorChange={{action (mut k)}}
@selectedTag={{this.selectedTag}}
@availableTags={{this.availableTags}}
@onTagChange={{action (mut k)}}
@selectedOrder={{this.selectedOrder}}
@availableOrders={{this.availableOrders}}
@onOrderChange={{action (mut k)}}
/>
{{#link-to "editor.new" "post" class="gh-btn gh-btn-green" data-test-new-post-button=true}}<span>New post</span>{{/link-to}}
</section>
</header>
<div class="gh-content">
{{gh-loading-list}}
</div>
</section>