hyaenidae/server/templates/comments/report.rs.html
asonix 934ddd76ff Server: Update to latest Toolkit & Profile apis
Reorganize files a bit
Add a Pagination trait to guide with paging in the future
Add extension traits for Profile, Comment, and Submission
Async-ify more things, but not all things
2021-01-21 23:47:47 -06:00

46 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").dark(nav_state.dark()),
Button::secondary("Back to Comment").href(&view.comment_path()).dark(nav_state.dark()),
])
</div>
</form>
})
})
})