Use table for mods list

This commit is contained in:
Björn Dahlgren 2014-04-05 19:36:34 +00:00
parent 11150bc59b
commit 8ef61ed197
4 changed files with 28 additions and 12 deletions

View File

@ -1,15 +1,19 @@
define(function (require) {
"use strict";
var $ = require('jquery'),
_ = require('underscore'),
Backbone = require('backbone'),
Marionette = require('marionette'),
ListItemView = require('app/views/mods/list_item');
return Marionette.CollectionView.extend({
tagName: 'ul',
ListItemView = require('app/views/mods/list_item'),
tpl = require('text!tpl/mods/list.html'),
template = _.template(tpl);
return Marionette.CompositeView.extend({
itemView: ListItemView,
itemViewContainer: "tbody",
template: template,
});
});

View File

@ -1,17 +1,17 @@
define(function (require) {
"use strict";
var $ = require('jquery'),
_ = require('underscore'),
Backbone = require('backbone'),
Marionette = require('marionette'),
tpl = require('text!tpl/mods/list_item.html'),
template = _.template(tpl);
return Marionette.ItemView.extend({
tagName: "li",
tagName: "tr",
template: template
});
});

View File

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

View File

@ -1 +1,3 @@
<a href='#mods/<%-name%>'><%-name%></a>
<td>
<a href='#mods/<%-name%>'><%-name%></a>
</td>