56 lines
1.9 KiB
HTML
56 lines
1.9 KiB
HTML
{% extends "base.html" %}
|
|
{% load static %}
|
|
|
|
{% block head %}
|
|
<script type="module" defer src="{% static "scripts/index.js" %}"></script>
|
|
{% endblock %}
|
|
|
|
{% block content %}
|
|
<article>
|
|
{% if employee.archived %}
|
|
<p class="--archived"><em>This employee is currently Archived</em></p>
|
|
{% endif %}
|
|
<hgroup>
|
|
<h1>{{employee}}</h1>
|
|
<h2>Hire Date: {{employee.hire_date}}</h2>
|
|
<details class="menu">
|
|
<summary class="menu__title">Options</summary>
|
|
<dl class="menu__items">
|
|
<dt><a href="{% url 'employee-update' employee.pk %}">Update Employee details</a></dt>
|
|
<dt><a href="{% url 'employee-archive' employee.pk %}">Archive Employee</a></dt>
|
|
<dt><a href="{% url 'employee-delete' employee.pk %}">Delete Employee</a></dt>
|
|
</dl>
|
|
</details>
|
|
</hgroup>
|
|
<section>
|
|
<p>
|
|
<strong>Title</strong>: {{employee.title}}</br>
|
|
<strong>Department</strong>: {{employee.department}}</br>
|
|
<strong>Manager</strong>: {{employee.manager}}
|
|
</p>
|
|
<p><strong>Initial comments</strong>:<p>
|
|
<blockquote>{{employee.initial_comments|linebreaksbr}}</blockquote>
|
|
</section>
|
|
<section id="todos">
|
|
<h3>To-do's</h3>
|
|
{% include "board/todo_list.html" with todo_list=employee.todo_set.all %}
|
|
{% if not employee.archived %}
|
|
<p>
|
|
<a class="action-button" href="{% url 'todo-create' employee.pk %}">Add a to-do</a>
|
|
</p>
|
|
{% endif %}
|
|
</section>
|
|
<section>
|
|
<h3>Log</h3>
|
|
<p>
|
|
<a class="action-button" href="{% url 'entry-create' employee.pk %}">Add an Entry</a>
|
|
</p>
|
|
{% for entry in employee.logentry_set.all %}
|
|
<p>
|
|
<span>{{entry.created_at|date:"SHORT_DATE_FORMAT"}}—</span>
|
|
<span>{{entry.notes}}</span>
|
|
</p>
|
|
{% endfor %}
|
|
</section>
|
|
</article>
|
|
{% endblock %} |