Permalink
Browse files

Added item detail template

  • Loading branch information...
1 parent 9496461 commit dc1a9c76bf71659789f61f88fe4409f89fbe9cf5 @quirkey quirkey committed Oct 10, 2009
Showing with 11 additions and 1 deletion.
  1. +3 −1 javascripts/json_store.js
  2. +8 −0 templates/item_detail.template
@@ -26,7 +26,9 @@
});
this.get('#/item/:id', function(context) {
-
+ this.item = this.items[this.params['id']];
+ if (!this.item) { return this.notFound(); }
+ this.partial('templates/item_detail.template');
});
});
@@ -0,0 +1,8 @@
+<div class="item-detail">
+ <div class="item-image"><img src="<%= item.large_image %>" alt="<%= item.title %>" /></div>
+ <div class="item-artist"><%= item.artist %></div>
+ <div class="item-title"><%= item.title %></div>
+ <div class="item-price">$<%= item.price %></div>
+ <div class="item-link"><a href="<%= item.url %>">Buy this item on Amazon</a></div>
+ <div class="back-link"><a href="#/">&laquo; Back to Items</a></div>
+</div>

0 comments on commit dc1a9c7

Please sign in to comment.