Ajax update of recent posts

This commit is contained in:
Thibault Duplessis 2012-05-27 01:48:10 +02:00
parent 9ac684e749
commit e24e1d0b30
3 changed files with 6 additions and 1 deletions

View file

@ -9,6 +9,10 @@ object ForumPost extends LilaController with Forum {
def postApi = env.forum.postApi
def forms = forum.DataForm
val recent = Open { implicit ctx =>
Ok(html.forum.post.recent(env.forum.recent(ctx.me)))
}
def create(categSlug: String, slug: String, page: Int) = OpenBody { implicit ctx
CategGrant(categSlug) {
implicit val req = ctx.body

View file

@ -44,7 +44,7 @@
<table class="lichess_messages"></table>
</div>
</div>
<div class="new_posts undertable" data-url="/forum/recent-posts">
<div class="new_posts undertable" data-url="@routes.ForumPost.recent">
<div class="undertable_top">
<a class="more" title="@trans.talkAboutChessAndDiscussLichessFeaturesInTheForum()" href="#">@trans.forum() »</a>
<span class="title">@trans.forum()</span>

View file

@ -90,6 +90,7 @@ GET /lobby/socket controllers.Lobby.socket
# Forum
GET /forum controllers.ForumCateg.index
GET /forum/recent controllers.ForumPost.recent
GET /forum/:slug controllers.ForumCateg.show(slug: String, page: Int ?= 1)
GET /forum/:categSlug/form controllers.ForumTopic.form(categSlug: String)
POST /forum/:categSlug/new controllers.ForumTopic.create(categSlug: String)