pict-rs-aggregator/templates/confirm_delete.rs.html

28 lines
1.1 KiB
HTML

@use crate::{ui::ButtonKind, Collection, State, ValidToken};
@use super::{layout_html, button_link_html, return_home_html};
@use uuid::Uuid;
@(id: Uuid, collection: &Collection, token: &ValidToken, state: &State)
@:layout_html(state, &format!("Delete: {}", collection.title), Some(&format!("Are you sure you want to delete {}", collection.title)), {
<meta property="og:url" content="@state.delete_collection_path(id, token, false)" />
}, {
<section>
<article>
<div class="content-group">
<h3>Delete @collection.title</h3>
</div>
<div class="content-group">
<p class="subtitle">Are you sure you want to delete @collection.title</p>
</div>
<div class="content-group">
<div class="button-group">
@:button_link_html("Delete Collection", &state.delete_collection_path(id, token, true), ButtonKind::Submit)
@:button_link_html("Cancel", &state.edit_collection_path(id, None, token), ButtonKind::Outline)
</div>
</div>
</article>
</section>
@:return_home_html(state)
})