added basic pages + task import
This commit is contained in:
@ -1,10 +1,24 @@
|
||||
{% load static %}
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>Title</title>
|
||||
<title>{% block title %}Title{% endblock %}</title>
|
||||
<link rel="stylesheet" href="{% static "base.css" %}">
|
||||
<script src="{% static "base.js" %}"></script>
|
||||
{% block head %}{% endblock %}
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<header>
|
||||
<nav>
|
||||
{% for nav_link in nav_links %}
|
||||
<a href="{% url nav_link.view %}" {% if request.resolver_match.view_name == nav_link.view %}class="active"{% endif %}>{{ nav_link.label }}</a>
|
||||
{% endfor %}
|
||||
</nav>
|
||||
</header>
|
||||
<main>
|
||||
{% block main %}{% endblock %}
|
||||
</main>
|
||||
<footer>{% block footer %}{% endblock %}</footer>
|
||||
</body>
|
||||
</html>
|
@ -1 +1,9 @@
|
||||
{% extends "base.html" %}
|
||||
{% load static %}
|
||||
{% block title %}Dashboard{% endblock %}
|
||||
{% block head %}
|
||||
<link rel="stylesheet" href="{% static "dashboard.css" %}">
|
||||
{% endblock %}
|
||||
{% block footer %}{% endblock %}
|
||||
{% block main %}
|
||||
{% endblock %}
|
12
templates/import.html
Normal file
12
templates/import.html
Normal file
@ -0,0 +1,12 @@
|
||||
{% extends "base.html" %}
|
||||
{% block title %}Import tasks{% endblock %}
|
||||
{% block main %}
|
||||
<form action="" method="POST" enctype="multipart/form-data">
|
||||
{% csrf_token %}
|
||||
<div>
|
||||
<label for="file">File</label>
|
||||
<input type="file" name="file" id="file">
|
||||
</div>
|
||||
<button type="submit">Import</button>
|
||||
</form>
|
||||
{% endblock %}
|
19
templates/list.html
Normal file
19
templates/list.html
Normal file
@ -0,0 +1,19 @@
|
||||
{% extends "base.html" %}
|
||||
{% load static %}
|
||||
{% block head %}
|
||||
<link rel="stylesheet" href="{% static "list.css" %}">
|
||||
{% endblock %}
|
||||
{% block main %}
|
||||
<ul class="list">
|
||||
{% for element in elements %}
|
||||
<li data-id="{{ element.id }}">
|
||||
{% block element %}{% endblock %}
|
||||
<div class="actions">
|
||||
{% block actions %}{% endblock %}
|
||||
</div>
|
||||
</li>
|
||||
{% empty %}
|
||||
<li class="empty">No {% block element_name %}{% endblock %} defined yet</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
{% endblock %}
|
11
templates/parents.html
Normal file
11
templates/parents.html
Normal file
@ -0,0 +1,11 @@
|
||||
{% extends "list.html" %}
|
||||
{% load static %}
|
||||
{% block title %}Parents{% endblock %}
|
||||
{% block element_name %}parent{% endblock %}
|
||||
{% block element %}
|
||||
<div class="name">{{ element.name }}</div>
|
||||
<div class="project_num">({{ element.project_num }})</div>
|
||||
{% endblock %}
|
||||
{% block actions %}
|
||||
<button class="edit">Edit</button>
|
||||
{% endblock %}
|
10
templates/project.html
Normal file
10
templates/project.html
Normal file
@ -0,0 +1,10 @@
|
||||
{% extends "base.html" %}
|
||||
|
||||
{% block main %}
|
||||
<h2>Editing project</h2>
|
||||
<form action="" method="POST">
|
||||
{% csrf_token %}
|
||||
{{ form }}
|
||||
<button type="submit">Save</button>
|
||||
</form>
|
||||
{% endblock %}
|
38
templates/projects.html
Normal file
38
templates/projects.html
Normal file
@ -0,0 +1,38 @@
|
||||
{% extends "base.html" %}
|
||||
{% load static %}
|
||||
{% block title %}Projects{% endblock %}
|
||||
{% block head %}
|
||||
<link rel="stylesheet" href="{% static "projects.css" %}">
|
||||
<script src="{% static "projects.js" %}"></script>
|
||||
{% endblock %}
|
||||
{% block footer %}{% endblock %}
|
||||
{% block main %}
|
||||
<table class="projects">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Project</th>
|
||||
<th>Parent</th>
|
||||
<th>Actions</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for project in projects %}
|
||||
<tr data-id="{{ project.id }}">
|
||||
<td>{{ project.name }}</td>
|
||||
<td>
|
||||
<select class="parent-sel">
|
||||
<option value=""></option>
|
||||
{% for parent in parents %}
|
||||
<option value="{{ parent.id }}" {% if project.parent.id == parent.id %}selected{% endif %}>{{ parent.name }}</option>
|
||||
{% endfor %}
|
||||
</select>
|
||||
</td>
|
||||
<td>
|
||||
<button class="see">See</button>
|
||||
<button class="delete">Delete</button>
|
||||
</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
{% endblock %}
|
Reference in New Issue
Block a user