mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-12-19 08:31:43 +03:00
d8da21520f
Ember.ObjectController (and Ember.ArrayController) will be deprecated in Ember 1.11 (and removed from core in Ember 2.0). The reasoning is detailed in the Ember 2.0 RFC. This PR does the following: * Updates templates/controllers/views to explicitly reference model properties (instead of relying on proxying behavior). * Clearly delineate where certain properties are being set or retrieved from (for example it was not clear exactly where `scratch` and `titleScratch` were stored). * Remove usage of `Ember.ObjectController`. * Add JSCS rule to prevent future PR's from adding regressions.
43 lines
2.1 KiB
Handlebars
43 lines
2.1 KiB
Handlebars
<header class="page-header">
|
|
<button class="menu-button js-menu-button" {{action "toggleGlobalMobileNav"}}><span class="sr-only">Menu</span></button>
|
|
<h2 class="page-title">Content</h2>
|
|
</header>
|
|
|
|
<div class="page-content">
|
|
<section {{bind-attr class=":content-list :js-content-list postListFocused:keyboard-focused"}}>
|
|
<header class="floatingheader">
|
|
<section class="content-filter">
|
|
<small>All Posts</small>
|
|
</section>
|
|
{{#link-to "editor.new" class="btn btn-green" title="New Post"}}<span class="hidden">New Post</span>{{/link-to}}
|
|
</header>
|
|
{{#view "paginated-scroll-box" tagName="section" classNames="content-list-content js-content-scrollbox"}}
|
|
<ol class="posts-list">
|
|
{{#each post in model itemController="posts/post" itemView="post-item-view" itemTagName="li"}}
|
|
{{#link-to "posts.post" post class="permalink" alternateActive=view.active title="Edit this post"}}
|
|
<h3 class="entry-title">{{post.model.title}}</h3>
|
|
<section class="entry-meta">
|
|
<span class="status">
|
|
{{#if post.isPublished}}
|
|
{{#if post.model.page}}
|
|
<span class="page">Page</span>
|
|
{{else}}
|
|
<time datetime="{{unbound post.model.published_at}}" class="date published">
|
|
Published {{gh-format-timeago post.model.published_at}}
|
|
</time>
|
|
{{/if}}
|
|
{{else}}
|
|
<span class="draft">Draft</span>
|
|
{{/if}}
|
|
</span>
|
|
</section>
|
|
{{/link-to}}
|
|
{{/each}}
|
|
</ol>
|
|
{{/view}}
|
|
</section>
|
|
<section {{bind-attr class=":content-preview :js-content-preview postContentFocused:keyboard-focused"}}>
|
|
{{outlet}}
|
|
</section>
|
|
</div>
|