Skip to content

Commit

Permalink
Move home page into namespaced dir and format
Browse files Browse the repository at this point in the history
  • Loading branch information
danpalmer committed Jan 5, 2021
1 parent 77b9d94 commit f6ae3b4
Show file tree
Hide file tree
Showing 3 changed files with 38 additions and 32 deletions.
31 changes: 0 additions & 31 deletions response/templates/home.html

This file was deleted.

35 changes: 35 additions & 0 deletions response/templates/response/home.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
{% extends "response/base.html" %}
{% load static %}
{% load unslackify %}
{% load markdown_filter %}

{% block head %}
<link rel="stylesheet" href="{% static 'incident_doc.css' %}">
{% endblock %}


{% block content %}
<div class="row pb-4">
<div class="col-lg-12 text-center">
{% comment %} ----- Heading ----- {% endcomment %}
<h1 class="mt-3" id="title"><a href="">Incidents</a></h1>
</div>

<div class="col-lg-12">
<ul>
{% for incident in incidents %}
<li>
{{ incident.severity_emoji }}
<a href="{% url 'incident_doc' incident.pk %}" target="_blank">
Incident {{ incident.pk }}&nbsp;
</a>
<span class="badge {{ incident.badge_type }} blink_me">
{{ incident.status_text|upper }}
</span>
- {{ incident.report }}
</li>
{% endfor %}
</ul>
</div>
</div>
{% endblock %}
4 changes: 3 additions & 1 deletion response/ui/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,9 @@
@response_login_required
def home(request: HttpRequest):
incidents = Incident.objects.all
return render(request, template_name="home.html", context={"incidents": incidents})
return render(
request, template_name="response/home.html", context={"incidents": incidents}
)


@response_login_required
Expand Down

0 comments on commit f6ae3b4

Please sign in to comment.