#if($query.book_id) #set( $book = $db.book.fetch($query.book_id) ) #end #if($book)

Edit book

#else

Add book

#end