Ghost/ghost/admin/templates/posts.hbs
Robert Jackson b56c26c597 Cleanup posts template.
No issue.

* Fix indentation (it was surprisingly hard for me to grok what was happening
  without indentation).
* Utilize `alternateActive` from `core/client/utils/link-view.js` to
  maintain the `active` state. Observing `childViews` is deprecated (and
  may not work properly in future versions of Ember).
* Remove now unused `item-view`.
2014-12-31 21:06:05 -05:00

43 lines
2.0 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.title}}</h3>
<section class="entry-meta">
<span class="status">
{{#if post.isPublished}}
{{#if post.page}}
<span class="page">Page</span>
{{else}}
<time datetime="{{unbound post.published_at}}" class="date published">
Published {{gh-format-timeago post.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>