Recipe edit (WIP)
This commit is contained in:
parent
fce4eade73
commit
c6dfff065c
24 changed files with 1157 additions and 971 deletions
|
|
@ -18,6 +18,7 @@ pub struct HomeTemplate {
|
|||
#[template(path = "message.html")]
|
||||
pub struct MessageTemplate {
|
||||
pub user: Option<model::User>,
|
||||
|
||||
pub message: String,
|
||||
pub as_code: bool, // Display the message in <pre> markup.
|
||||
}
|
||||
|
|
@ -44,6 +45,7 @@ impl MessageTemplate {
|
|||
#[template(path = "sign_up_form.html")]
|
||||
pub struct SignUpFormTemplate {
|
||||
pub user: Option<model::User>,
|
||||
|
||||
pub email: String,
|
||||
pub message: String,
|
||||
pub message_email: String,
|
||||
|
|
@ -54,6 +56,7 @@ pub struct SignUpFormTemplate {
|
|||
#[template(path = "sign_in_form.html")]
|
||||
pub struct SignInFormTemplate {
|
||||
pub user: Option<model::User>,
|
||||
|
||||
pub email: String,
|
||||
pub message: String,
|
||||
}
|
||||
|
|
@ -62,6 +65,7 @@ pub struct SignInFormTemplate {
|
|||
#[template(path = "ask_reset_password.html")]
|
||||
pub struct AskResetPasswordTemplate {
|
||||
pub user: Option<model::User>,
|
||||
|
||||
pub email: String,
|
||||
pub message: String,
|
||||
pub message_email: String,
|
||||
|
|
@ -71,6 +75,7 @@ pub struct AskResetPasswordTemplate {
|
|||
#[template(path = "reset_password.html")]
|
||||
pub struct ResetPasswordTemplate {
|
||||
pub user: Option<model::User>,
|
||||
|
||||
pub reset_token: String,
|
||||
pub message: String,
|
||||
pub message_password: String,
|
||||
|
|
@ -80,6 +85,7 @@ pub struct ResetPasswordTemplate {
|
|||
#[template(path = "profile.html")]
|
||||
pub struct ProfileTemplate {
|
||||
pub user: Option<model::User>,
|
||||
|
||||
pub username: String,
|
||||
pub email: String,
|
||||
pub message: String,
|
||||
|
|
@ -92,6 +98,7 @@ pub struct ProfileTemplate {
|
|||
pub struct RecipeViewTemplate {
|
||||
pub user: Option<model::User>,
|
||||
pub recipes: Recipes,
|
||||
|
||||
pub recipe: model::Recipe,
|
||||
}
|
||||
|
||||
|
|
@ -100,5 +107,7 @@ pub struct RecipeViewTemplate {
|
|||
pub struct RecipeEditTemplate {
|
||||
pub user: Option<model::User>,
|
||||
pub recipes: Recipes,
|
||||
|
||||
pub recipe: model::Recipe,
|
||||
pub languages: [(&'static str, &'static str); 2],
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue