@use crate::{ui::ButtonKind, Aggregation, Entry, State, ValidToken}; @use super::{button, button_link, image_preview, file_input, layout, text_area, text_input, statics::file_upload_js}; @use uuid::Uuid; @(aggregation: &Aggregation, aggregation_id: Uuid, entries: &[(Uuid, Entry)], token: &ValidToken, state: &State) @:layout(state, "Edit Aggregation", None, { }, {

Share Aggregation

Public Link

Edit Aggregation

Do not lose this link

@:text_input("title", Some("Title"), Some(&aggregation.title)) @:text_area("description", Some("Description"), Some(&aggregation.description))
@:button("Update Aggregation", ButtonKind::Submit) @:button_link("Delete Aggregation", &state.delete_aggregation_path(aggregation_id, token), ButtonKind::Outline)

Add Image

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