45 lines
1.5 KiB
HTML
45 lines
1.5 KiB
HTML
@(thread: lila.message.Thread, form: Option[Form[_]], blocks: Boolean)(implicit ctx: Context, me: User)
|
|
|
|
@message.layout(
|
|
title = thread.name) {
|
|
<div id="lichess_message" class="content_box @if(thread.asMod){ mod}">
|
|
<div class="thread_actions">
|
|
<form action="@routes.Message.delete(thread.id)" method="post">
|
|
<button type="submit" class="delete button"> Delete</button>
|
|
</form>
|
|
</div>
|
|
|
|
<div class="head">
|
|
<h1>@thread.nonEmptyName</h1>
|
|
</div>
|
|
|
|
@thread.posts.map { post =>
|
|
<div class="thread_message embed_analyse" id="message_@post.id">
|
|
<span class="infos">
|
|
@userIdLink(thread.visibleSenderOf(post), none) <span data-icon="H"></span> @userIdLink(thread.visibleReceiverOf(post), "inline".some) - @momentFromNow(post.createdAt)
|
|
</span>
|
|
<div class="thread_message_body">@autoLink(post.text)</div>
|
|
</div>
|
|
}
|
|
|
|
<div class="answer" id="bottom">
|
|
@if(blocks) {
|
|
<p>This user blocks you. You cannot answer.</p>
|
|
} else {
|
|
@form.map { f =>
|
|
<form action="@routes.Message.answer(thread.id)" method="post">
|
|
<div class="field_body">
|
|
<textarea required="required" name="@f("text").name" id="@f("text").id">@f("text").value</textarea>
|
|
@errMsg(f("text"))
|
|
</div>
|
|
<div class="actions">
|
|
<button class="send button" data-icon="E" type="submit"> @trans.send()</button>
|
|
<a class="cancel" href="@routes.Message.inbox(1)">@trans.cancel()</a>
|
|
</div>
|
|
</form>
|
|
}
|
|
}
|
|
</div>
|
|
</div>
|
|
}
|