53 lines
2 KiB
HTML
53 lines
2 KiB
HTML
@use crate::ActixLoader;
|
|
@use crate::comments::ReportView;
|
|
@use crate::extensions::{CommentExt, ProfileExt};
|
|
@use crate::nav::NavState;
|
|
@use crate::templates::button_js;
|
|
@use crate::templates::layouts::home;
|
|
@use crate::templates::comments::profile_box;
|
|
@use hyaenidae_toolkit::templates::bbcode;
|
|
@use hyaenidae_toolkit::{templates::button_group, Button};
|
|
@use hyaenidae_toolkit::{templates::{card, card_title, card_body}, Card};
|
|
@use hyaenidae_toolkit::templates::text_input;
|
|
@use i18n_embed_fl::fl;
|
|
|
|
@(loader: &ActixLoader, view: &ReportView, nav_state: &NavState)
|
|
|
|
@:home(loader, &fl!(loader, "report-comment-heading"), &fl!(loader, "report-comment-description", author = view.author.name()), nav_state, {
|
|
@:button_js()
|
|
}, {
|
|
@:card(&Card::full_width().dark(nav_state.dark()), {
|
|
@:card_title({
|
|
@fl!(loader, "report-comment-heading")
|
|
})
|
|
@:card_body({
|
|
<div class="comment">
|
|
<div class="comment-body">
|
|
@:profile_box(loader, &view.author(), view.comment.published(), &view.parent(), &view.cache, nav_state.dark(), {}, {
|
|
<div class="comment-text">
|
|
@:bbcode({
|
|
@view.comment.body()
|
|
})
|
|
</div>
|
|
})
|
|
</div>
|
|
</div>
|
|
})
|
|
@:card_body({
|
|
<form method="POST" action="@view.comment.report_path()">
|
|
<h3>@fl!(loader, "report-comment-heading")</h3>
|
|
<p>
|
|
@fl!(loader, "report-description")
|
|
</p>
|
|
@:text_input(&view.input(loader).dark(nav_state.dark()))
|
|
<div class="button-section">
|
|
@:button_group(&[
|
|
Button::primary(&fl!(loader, "report-button")),
|
|
Button::secondary(&fl!(loader, "back-to-comment-button")).href(&view.comment.view_path()),
|
|
])
|
|
</div>
|
|
</form>
|
|
})
|
|
})
|
|
})
|