Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Techwraith
committed
Oct 30, 2012
1 parent
944267c
commit 74a946c
Showing
1 changed file
with
17 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,31 @@ | ||
<div class="hero-unit"> | ||
<h2><@= <%= names.property.singular %>.<%= properties['default'].name %> @></h2> | ||
<h2 class="<%= properties['default'].name %>"><@= <%= names.property.singular %>.<%= properties['default'].name %> @></h2> | ||
<@- linkTo('Edit this <%= names.property.singular %>', edit<%= names.constructor.singular %>Path(params.id), {class: 'btn pull-right'}); @> | ||
</div> | ||
|
||
<h2><%= names.constructor.singular %> Properties</h2> | ||
<@ for(var i in <%= names.property.singular %>) { -@> | ||
<@ if(i !== 'saved') { -@> | ||
<div class="row list-item"> | ||
<div class="span8"> | ||
<div class="span4"> | ||
<h3><@= i @></h3> | ||
</div> | ||
<div class="span4"> | ||
<h3><i class="icon-list-alt"></i><@= <%= names.property.singular %>[i] @></h3> | ||
<div class="span8"> | ||
<h3><i class="icon-list-alt"></i><span class="<@= i @>"><@= <%= names.property.singular %>[i] @></span></h3> | ||
</div> | ||
</div> | ||
<%% } -%> | ||
<%% } -%> | ||
|
||
<script type="text/javascript"> | ||
geddy.io.addListenersForModels(['<%= names.constructor.singular %>']); | ||
geddy.model.<%= names.constructor.singular %>.on('update', function (<%= names.property.singular %>){ | ||
var properties = <%= names.property.singular %>.toData(); | ||
for (var i in properties) { | ||
$('.'+i).text(properties[i]); | ||
} | ||
}); | ||
</script> |