...
This commit is contained in:
		@@ -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)
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										27
									
								
								actix_mvc_app/src/views/error.html
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										27
									
								
								actix_mvc_app/src/views/error.html
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,27 @@
 | 
			
		||||
{% extends "base.html" %}
 | 
			
		||||
 | 
			
		||||
{% block title %}Error{% endblock %}
 | 
			
		||||
 | 
			
		||||
{% block content %}
 | 
			
		||||
<div class="row justify-content-center mt-5">
 | 
			
		||||
    <div class="col-md-8">
 | 
			
		||||
        <div class="card border-danger">
 | 
			
		||||
            <div class="card-header bg-danger text-white">
 | 
			
		||||
                <h4 class="mb-0"><i class="bi bi-exclamation-triangle-fill me-2"></i>Error</h4>
 | 
			
		||||
            </div>
 | 
			
		||||
            <div class="card-body">
 | 
			
		||||
                <h5 class="card-title">Something went wrong</h5>
 | 
			
		||||
                <p class="card-text">{{ error }}</p>
 | 
			
		||||
                <div class="mt-4">
 | 
			
		||||
                    <a href="/" class="btn btn-primary me-2">
 | 
			
		||||
                        <i class="bi bi-house-door me-1"></i>Go to Home
 | 
			
		||||
                    </a>
 | 
			
		||||
                    <a href="javascript:history.back()" class="btn btn-outline-secondary">
 | 
			
		||||
                        <i class="bi bi-arrow-left me-1"></i>Go Back
 | 
			
		||||
                    </a>
 | 
			
		||||
                </div>
 | 
			
		||||
            </div>
 | 
			
		||||
        </div>
 | 
			
		||||
    </div>
 | 
			
		||||
</div>
 | 
			
		||||
{% endblock %}
 | 
			
		||||
		Reference in New Issue
	
	Block a user