separate lichess forum and team boards
This commit is contained in:
parent
a028abea25
commit
e960f19936
|
@ -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))
|
||||
}
|
||||
}
|
||||
|
|
34
app/views/forum/categ/table.scala.html
Normal file
34
app/views/forum/categ/table.scala.html
Normal 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>
|
|
@ -147,7 +147,7 @@
|
|||
|
||||
app.dbLock = new SpeedOMeter({
|
||||
name : "DB LOCK",
|
||||
maxVal : 50,
|
||||
maxVal : 10,
|
||||
container : container
|
||||
});
|
||||
|
||||
|
|
Loading…
Reference in a new issue