45 lines
1.7 KiB
HTML
45 lines
1.7 KiB
HTML
@use crate::comments::ReportView;
|
|
@use crate::extensions::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::button_group, Button};
|
|
@use hyaenidae_toolkit::{templates::{card, card_title, card_body}, Card};
|
|
@use hyaenidae_toolkit::templates::text_input;
|
|
|
|
@(view: &ReportView, nav_state: &NavState)
|
|
|
|
@:home("Report Comment", &format!("Report comment by {}", view.author.name()), nav_state, {
|
|
@:button_js()
|
|
}, {
|
|
@:card(&Card::full_width().dark(nav_state.dark()), {
|
|
@:card_title({ Report Comment })
|
|
@:card_body({
|
|
<div class="comment">
|
|
<div class="comment-body">
|
|
@:profile_box(&view.author(), view.comment.published(), &view.parent(), &view.cache, nav_state.dark(), {}, {
|
|
<div class="comment-text">
|
|
@view.comment.body()
|
|
</div>
|
|
})
|
|
</div>
|
|
</div>
|
|
})
|
|
@:card_body({
|
|
<form method="POST" action="@view.report_path()">
|
|
<h3>Report Comment</h3>
|
|
<p>
|
|
Please include any relevant information for moderators to act on this report.
|
|
</p>
|
|
@:text_input(&view.input)
|
|
<div class="button-section">
|
|
@:button_group(&[
|
|
Button::primary("Report"),
|
|
Button::secondary("Back to Comment").href(&view.comment_path()),
|
|
])
|
|
</div>
|
|
</form>
|
|
})
|
|
})
|
|
})
|