From b6dd04a6aa7912982fd8107c36374d23d4c37295 Mon Sep 17 00:00:00 2001 From: despiegk Date: Tue, 22 Apr 2025 07:14:37 +0400 Subject: [PATCH] ... --- actix_mvc_app/src/controllers/flow.rs | 1 + actix_mvc_app/src/views/error.html | 27 +++++++++++++++++++++++++++ 2 files changed, 28 insertions(+) create mode 100644 actix_mvc_app/src/views/error.html diff --git a/actix_mvc_app/src/controllers/flow.rs b/actix_mvc_app/src/controllers/flow.rs index 8df1f7f..7649242 100644 --- a/actix_mvc_app/src/controllers/flow.rs +++ b/actix_mvc_app/src/controllers/flow.rs @@ -87,6 +87,7 @@ impl FlowController { Ok(HttpResponse::Ok().content_type("text/html").body(rendered)) } else { let mut ctx = tera::Context::new(); + ctx.insert("active_page", "flows"); ctx.insert("error", "Flow not found"); let rendered = tmpl.render("error.html", &ctx) diff --git a/actix_mvc_app/src/views/error.html b/actix_mvc_app/src/views/error.html new file mode 100644 index 0000000..e583b93 --- /dev/null +++ b/actix_mvc_app/src/views/error.html @@ -0,0 +1,27 @@ +{% extends "base.html" %} + +{% block title %}Error{% endblock %} + +{% block content %} +
+
+
+
+

Error

+
+
+
Something went wrong
+

{{ error }}

+ +
+
+
+
+{% endblock %} \ No newline at end of file