mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-12-21 09:52:06 +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.
23 lines
997 B
Handlebars
23 lines
997 B
Handlebars
<header class="post-preview-header clearfix">
|
|
{{#link-to "posts" tagName="button" class="btn btn-default btn-back"}}Back{{/link-to}}
|
|
<h2 class="page-title">Preview</h2>
|
|
<button type="button" {{bind-attr class="model.featured:featured:unfeatured"}} title="Feature this post" {{action "toggleFeatured"}}>
|
|
<span class="hidden">Star</span>
|
|
</button>
|
|
<small class="post-published-by">
|
|
<span class="status">{{#if isPublished}}Published{{else}}Written{{/if}}</span>
|
|
<span class="normal">by</span>
|
|
<span class="author">{{#if model.author.name}}{{model.author.name}}{{else}}{{model.author.email}}{{/if}}</span>
|
|
</small>
|
|
<section class="post-controls">
|
|
{{#link-to "editor.edit" this class="btn btn-default post-edit"}} Edit{{/link-to}}
|
|
</section>
|
|
</header>
|
|
|
|
{{#view "content-preview-content-view" tagName="section"}}
|
|
<div class="wrapper">
|
|
<h1>{{model.title}}</h1>
|
|
{{gh-format-html model.html}}
|
|
</div>
|
|
{{/view}}
|