separate lichess forum and team boards

This commit is contained in:
Thibault Duplessis 2012-12-22 22:04:16 +01:00
parent a028abea25
commit e960f19936
3 changed files with 44 additions and 36 deletions

View file

@ -3,39 +3,13 @@
@forum.layout(
title = trans.forum.str()) {
<div class="forum forum_index">
<h1>Lichess Forum</h1>
</div>
<table class="categories">
<thead>
<tr class="thead">
<th></th>
<th class="right">Topics</th>
<th class="right">Posts</th>
<th>Last Post</th>
</tr>
</thead>
<tbody>
@categs.map { categ =>
@if(categ.slug != "staff" || isGranted(Permission.StaffForum)) {
<tr>
<td class="subject">
<a class="category_name" href="@routes.ForumCateg.show(categ.slug)">@categ.name</a>
<h2 class="description">@categ.desc</h2>
</td>
<td class="right">@categ.nbTopics</td>
<td class="right">@categ.nbPosts</td>
<td class="last_post">
@categ.lastPost.map {
case (topic, post, page) => {
<a href="@routes.ForumTopic.show(categ.slug, topic.slug, page)#@post.number">@showDate(post.createdAt)</a><br />by @Html(authorName(post))
}
}
</td>
</td>
</tr>
}
}
</tbody>
</table>
<h1>Lichess Forum</h1>
@forum.categ.table(categs.filterNot(_.categ.isTeam))
@if(categs.exists(_.categ.isTeam)) {
<br />
<br />
<h1>Your teams boards</h1>
@forum.categ.table(categs.filter(_.categ.isTeam))
}
}

View file

@ -0,0 +1,34 @@
@(categs: List[lila.forum.CategView])(implicit ctx: Context)
<table class="categories">
<thead>
<tr class="thead">
<th></th>
<th class="right">Topics</th>
<th class="right">Posts</th>
<th>Last Post</th>
</tr>
</thead>
<tbody>
@categs.map { categ =>
@if(categ.slug != "staff" || isGranted(Permission.StaffForum)) {
<tr>
<td class="subject">
<a class="category_name" href="@routes.ForumCateg.show(categ.slug)">@categ.name</a>
<h2 class="description">@categ.desc</h2>
</td>
<td class="right">@categ.nbTopics</td>
<td class="right">@categ.nbPosts</td>
<td class="last_post">
@categ.lastPost.map {
case (topic, post, page) => {
<a href="@routes.ForumTopic.show(categ.slug, topic.slug, page)#@post.number">@showDate(post.createdAt)</a><br />by @Html(authorName(post))
}
}
</td>
</td>
</tr>
}
}
</tbody>
</table>

View file

@ -147,7 +147,7 @@
app.dbLock = new SpeedOMeter({
name : "DB LOCK",
maxVal : 50,
maxVal : 10,
container : container
});