Skip to content

Instantly share code, notes, and snippets.

@inklesspen
Created February 11, 2012 07:34
Show Gist options
  • Select an option

  • Save inklesspen/1797531 to your computer and use it in GitHub Desktop.

Select an option

Save inklesspen/1797531 to your computer and use it in GitHub Desktop.
Leeuwenhoek.historyView = Em.View.create({
templateName: 'history-view',
inSetupModeBinding: 'Leeuwenhoek.historyController.inSetupMode'
});
Leeuwenhoek.SetupHistoryView = Em.View.extend({
templateName: 'setup-history-view',
historyBinding: 'Leeuwenhoek.historyController.content',
firstEra: Em.computed(function() {
// get the first era out of the history
return null;
}).property('history'),
lastEra: Em.computed(function() {
// get the last era out of the history
return null;
}).property('history'),
});
<script type="text/x-handlebars" data-template-name="history-view">
{{#if inSetupMode}}
{{view Leeuwenhoek.SetupHistoryView}}
{{else}}
not setup
{{/if}}
</script>
<script type="text/x-handlebars" data-template-name="setup-history-view">
<div class="row">
<div class="span4">
{{view firstEraCardView}}
</div>
<div class="span8">
Instructiones
</div>
<div class="span4">
{{view lastEraCardView}}
</div>
</div>
</script>
<script type="text/x-handlebars" data-template-name="era-card-view">
<div>
Era Card {{index}}
</div>
</script>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment