32 lines
1.0 KiB
HTML
32 lines
1.0 KiB
HTML
@(requests: List[lila.team.RequestWithUser], t: Option[lila.team.Team])(implicit ctx: Context)
|
|
|
|
<table class="requests @t.isEmpty.fold("all", "for-team") datatable">
|
|
@if(t.nonEmpty) {
|
|
<thead>
|
|
<tr>
|
|
<th colspan=4>@requests.size join requests</th>
|
|
</tr>
|
|
</thead>
|
|
}
|
|
<tbody>
|
|
@requests.map { request =>
|
|
<tr>
|
|
@if(t.isEmpty) {
|
|
<td>@userLink(request.user) @teamLink(request.team)</td>
|
|
} else {
|
|
<td>@userLink(request.user)</td>
|
|
}
|
|
<td>@autoLink(request.message)</td>
|
|
<td>@momentFromNow(request.date)</td>
|
|
<td class="process">
|
|
<form class="process-request" action="@routes.Team.requestProcess(request.id)" method="post">
|
|
<input type="hidden" name="url" value="@t.fold(routes.Team.requests())(te => routes.Team.show(te.id))" />
|
|
<button name="process" class="submit button small" value="accept">@trans.accept()</button>
|
|
<button name="process" class="submit button" value="decline">@trans.decline()</button>
|
|
</form>
|
|
</td>
|
|
</tr>
|
|
}
|
|
</tbody>
|
|
</table>
|