@use crate::{ui::ButtonKind, Collection, Direction, Entry, State, ValidToken}; @use super::{button, button_link, image, file_input, layout, return_home, text_area, text_input, statics::file_upload_js}; @use uuid::Uuid; @(collection: &Collection, collection_id: Uuid, entries: &[(Uuid, Entry)], token: &ValidToken, state: &State, qr: &str) @:layout(state, "Edit Collection", None, { }, {

Share Collection

Public Link
@Html(qr)

Edit Collection

Do not lose this link

@:text_input("title", Some("Collection Title"), Some(&collection.title), false) @:text_area("description", Some("Collection Description"), Some(&collection.description), false)
@:button("Update Collection", ButtonKind::Submit) @:button_link("Delete Collection", &state.delete_collection_path(collection_id, token, false), ButtonKind::Outline)

Add Image

@:file_input("images[]", Some("Select Image"), Some(crate::accept()), false)
@:button("Upload", ButtonKind::Submit)
@:return_home(state) })