Skip to content

Embed URL

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
App.featureDeploys = SC.Object.create({
deploy: function() {
// code in here
}
});
App.FeatureView = SC.View.extend({
classNames: ['feature'],
templateName: 'feature',
createdAt: function () {
return $.timeago.distanceInWords(this.getPath('content.createdAt'));
}.property('createdAt').cacheable()
});
<script type="text/x-handlebars" data-template-name="feature">
<h2>{{content.title}}</h2>
{{#if content.body}}
{{content.body}}
{{/if}}
<abbr {{bindAttr title="content.createdAt"}}>{{createdAt}}</abbr>
{{#if content.waitingDeployment}}
{{#view SC.Button target="App.featureDeploy" action="deploy" class="deploy-now"}}
Deploy
{{/view}}
{{/if}}
{{#if content.isDeployed}}
{{#view SC.Button target="App.featureDeploys" action="view" class="deploy-now"}}
View Feature
{{/view}}
{{/if}}
</script>
<script type="text/x-handlebars">
{{collectionView App.OpenFeaturesView id="open-features"}}
</script>
App.OpenFeaturesView = SC.CollectionView.extend({
content: [],
itemViewClass: App.FeatureView
});
@tatey

It's not Backbone.js.

@coop
Owner

@tatey trollololol

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.