Commit 36c46d90 authored by alexandre's avatar alexandre

Added user list-detail views

parent a201d892
......@@ -17,6 +17,16 @@ window.W = window.W || {};
var view = new W.AboutView();
baseView.showChildView('main', view);
},
userList: function () {
var baseView = this.getOption('application').getView();
var view = new W.UserListView();
baseView.showChildView('main', view);
},
userDetail: function () {
var baseView = this.getOption('application').getView();
var view = new W.UserDetailView();
baseView.showChildView('main', view);
},
scoreList: function () {
var baseView = this.getOption('application').getView();
var view = new W.ScoreListView();
......
......@@ -14,6 +14,8 @@ window.W = window.W || {};
'apropos(/)': 'about',
'partitions(/)': 'scoreList',
'partitions/:id(/)': 'scoreDetail',
'users/(/)': 'userList',
'users/:id(/)': 'userDetail',
},
initialize: function (options) {
......
......@@ -1457,6 +1457,17 @@ window.W = window.W || {};
* User views
*/
W.UserListView = Backbone.Marionette.View.extend({
template: '#user-list-template',
});
W.UserDetailView = Backbone.Marionette.View.extend({
template: '#user-detail-template',
});
W.LoginView = Backbone.Marionette.View.extend({
template: '#login-template',
......
......@@ -22,6 +22,14 @@
{% include "playground/underscore/home.mtpl" %}
</script>
<script id="user-list-template" type="text/template">
{% include "playground/underscore/user-list.mtpl" %}
</script>
<script id="user-detail-template" type="text/template">
{% include "playground/underscore/user-detail.mtpl" %}
</script>
<script id="about-template" type="text/template">
{% include "playground/underscore/about.mtpl" %}
</script>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment