More templates for the group page

This commit is contained in:
Robin Ward 2014-02-06 13:06:19 -05:00
parent a873f7a95a
commit de57f29467
8 changed files with 31 additions and 4 deletions

View file

@ -64,7 +64,9 @@ Discourse.Route.buildRoutes(function() {
this.route(homepage, { path: '/' });
});
this.resource('group', { path: '/groups/:groupname' });
this.resource('group', { path: '/groups/:groupname' }, function() {
this.route('members');
});
// User routes
this.resource('user', { path: '/users/:username' }, function() {

View file

@ -0,0 +1,6 @@
Discourse.GroupIndexRoute = Discourse.Route.extend({
model: function() {
console.log('group index');
}
});

View file

@ -1,7 +1,7 @@
Discourse.GroupRoute = Discourse.Route.extend({
model: function() {
console.log('load it');
}
return Discourse.AdminGroup.create();
},
});

View file

@ -0,0 +1,10 @@
<div class="container">
<section class='user-navigation'>
<ul class='action-list nav-stacked'>
<li>{{#link-to 'group.index' model}}Posts{{/link-to}}</li>
<li>{{#link-to 'group.members' model}}Members{{/link-to}}</li>
</ul>
</section>
{{outlet}}
</div>

View file

@ -0,0 +1,2 @@
GROUP INDEX

View file

@ -0,0 +1,2 @@
LIST GROUP MEMBERS

View file

@ -3,4 +3,7 @@ class GroupsController < ApplicationController
def show
end
def members
end
end

View file

@ -163,7 +163,9 @@ Discourse::Application.routes.draw do
get "posts/by_number/:topic_id/:post_number" => "posts#by_number"
get "posts/:id/reply-history" => "posts#reply_history"
resources :groups
resources :groups do
get 'members'
end
resources :posts do
put "bookmark"