Better missions listing

This commit is contained in:
Björn Dahlgren 2014-04-04 12:52:01 +00:00
parent 92e2c02b8d
commit d06cd5f064
3 changed files with 18 additions and 4 deletions

View File

@ -6,10 +6,14 @@ define(function (require) {
_ = require('underscore'),
Backbone = require('backbone'),
Marionette = require('marionette'),
ListItemView = require('app/views/missions/list_item');
ListItemView = require('app/views/missions/list_item'),
tpl = require('text!tpl/missions/list.html'),
template = _.template(tpl);
return Marionette.CollectionView.extend({
tagName: 'ul',
return Marionette.CompositeView.extend({
itemView: ListItemView,
itemViewContainer: "tbody",
template: template,
});
});

View File

@ -11,7 +11,7 @@ define(function (require) {
template = _.template(tpl);
return Marionette.ItemView.extend({
tagName: "li",
tagName: "td",
template: template
});
});

View File

@ -0,0 +1,10 @@
<table class="table table-striped">
<thead>
<tr>
<th>Mission</th>
</tr>
</thead>
<!-- want to insert collection items, here -->
<tbody></tbody>
</table>