mirror of
https://github.com/codeninjasllc/discourse.git
synced 2024-12-18 03:25:31 -05:00
More templates for the group page
This commit is contained in:
parent
a873f7a95a
commit
de57f29467
8 changed files with 31 additions and 4 deletions
|
@ -64,7 +64,9 @@ Discourse.Route.buildRoutes(function() {
|
||||||
this.route(homepage, { path: '/' });
|
this.route(homepage, { path: '/' });
|
||||||
});
|
});
|
||||||
|
|
||||||
this.resource('group', { path: '/groups/:groupname' });
|
this.resource('group', { path: '/groups/:groupname' }, function() {
|
||||||
|
this.route('members');
|
||||||
|
});
|
||||||
|
|
||||||
// User routes
|
// User routes
|
||||||
this.resource('user', { path: '/users/:username' }, function() {
|
this.resource('user', { path: '/users/:username' }, function() {
|
||||||
|
|
|
@ -0,0 +1,6 @@
|
||||||
|
Discourse.GroupIndexRoute = Discourse.Route.extend({
|
||||||
|
|
||||||
|
model: function() {
|
||||||
|
console.log('group index');
|
||||||
|
}
|
||||||
|
});
|
|
@ -1,7 +1,7 @@
|
||||||
Discourse.GroupRoute = Discourse.Route.extend({
|
Discourse.GroupRoute = Discourse.Route.extend({
|
||||||
|
|
||||||
model: function() {
|
model: function() {
|
||||||
console.log('load it');
|
return Discourse.AdminGroup.create();
|
||||||
}
|
},
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
|
@ -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>
|
|
@ -0,0 +1,2 @@
|
||||||
|
GROUP INDEX
|
||||||
|
|
|
@ -0,0 +1,2 @@
|
||||||
|
LIST GROUP MEMBERS
|
||||||
|
|
|
@ -3,4 +3,7 @@ class GroupsController < ApplicationController
|
||||||
def show
|
def show
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def members
|
||||||
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
|
@ -163,7 +163,9 @@ Discourse::Application.routes.draw do
|
||||||
get "posts/by_number/:topic_id/:post_number" => "posts#by_number"
|
get "posts/by_number/:topic_id/:post_number" => "posts#by_number"
|
||||||
get "posts/:id/reply-history" => "posts#reply_history"
|
get "posts/:id/reply-history" => "posts#reply_history"
|
||||||
|
|
||||||
resources :groups
|
resources :groups do
|
||||||
|
get 'members'
|
||||||
|
end
|
||||||
|
|
||||||
resources :posts do
|
resources :posts do
|
||||||
put "bookmark"
|
put "bookmark"
|
||||||
|
|
Loading…
Reference in a new issue