From e5ec81464cd9999a95fd5aa77e485332ac01c37d Mon Sep 17 00:00:00 2001 From: projectmoon Date: Sat, 23 Jan 2021 15:26:30 +0000 Subject: [PATCH] Add a 'home' link to the character sheets --- src/frontend/templates/characters/edit_character.html.tera | 7 ++++++- src/frontend/templates/characters/view_character.html.tera | 1 + src/routes/characters/edit.rs | 2 ++ 3 files changed, 9 insertions(+), 1 deletion(-) diff --git a/src/frontend/templates/characters/edit_character.html.tera b/src/frontend/templates/characters/edit_character.html.tera index 41c0162..ae24603 100644 --- a/src/frontend/templates/characters/edit_character.html.tera +++ b/src/frontend/templates/characters/edit_character.html.tera @@ -165,7 +165,6 @@ {# Webpack Templating for API script #} <%= htmlWebpackPlugin.tags.bodyTags %> -

Core Sheet

@@ -173,6 +172,12 @@

+ +

Basics

System: {{data_type}}
diff --git a/src/frontend/templates/characters/view_character.html.tera b/src/frontend/templates/characters/view_character.html.tera index 03de3db..af43d1b 100644 --- a/src/frontend/templates/characters/view_character.html.tera +++ b/src/frontend/templates/characters/view_character.html.tera @@ -172,6 +172,7 @@ diff --git a/src/routes/characters/edit.rs b/src/routes/characters/edit.rs index 2d1a0b2..8da8b45 100644 --- a/src/routes/characters/edit.rs +++ b/src/routes/characters/edit.rs @@ -10,6 +10,7 @@ use strum::IntoEnumIterator; struct EditCharacterContext<'a> { pub name: &'a str, pub username: &'a str, + pub id: i32, pub data_type: &'a CharacterDataType, pub sheet: Box, pub state: FormStateContext<'a>, @@ -26,6 +27,7 @@ fn edit_character_template(user: &User, character: Character) -> Result