@use crate::{ui::ButtonKind, Collection, Direction, Entry, State, ValidToken}; @use super::{button_html, button_link_html, image_html, file_input_html, layout_html, return_home_html, text_area_html, text_input_html, statics::file_upload_js}; @use uuid::Uuid; @(collection: &Collection, collection_id: Uuid, entries: &[(Uuid, Entry)], token: &ValidToken, state: &State, qr: &str) @:layout_html(state, "Edit Collection", None, { }, {

Share Collection

Public Link
@Html(qr)

Edit Collection

Do not lose this link

@:text_input_html("title", Some("Collection Title"), Some(&collection.title), false) @:text_area_html("description", Some("Collection Description"), Some(&collection.description), false)
@:button_html("Update Collection", ButtonKind::Submit) @:button_link_html("Delete Collection", &state.delete_collection_path(collection_id, token, false), ButtonKind::Outline)

Add Image

@:file_input_html("images[]", Some("Select Image"), Some(crate::accept()), false)
@:button_html("Upload", ButtonKind::Submit)
@:return_home_html(state) })