@:text_input("title", Some("Collection Title"), Some(&collection.title)) @:text_area("description", Some("Collection Description"), Some(&collection.description)) @:button("Update Collection", ButtonKind::Submit) @:button_link("Delete Collection", &state.delete_collection_path(collection_id, token, false), ButtonKind::Outline)
@:image(entry, state) @:text_input("title", Some("Image Title"), Some(&entry.title)) @:text_area("description", Some("Image Description"), Some(&entry.description)) @:button("Update Image", ButtonKind::Submit) @:button_link("Delete Image", &state.delete_entry_path(collection_id, *id, token, false), ButtonKind::Outline) @if i != 0 { @:button_link("Move Up", &state.move_entry_path(collection_id, *id, token, Direction::Up), ButtonKind::Outline) } @if (i + 1) != entries.len() { @:button_link("Move Down", &state.move_entry_path(collection_id, *id, token, Direction::Down), ButtonKind::Outline) }
Add Image @:file_input("images[]", Some("Select Image"), Some(crate::accept()), false) @:button("Upload", ButtonKind::Submit)