added new parent page + minor css/js improvements
This commit is contained in:
16
templates/add.html
Normal file
16
templates/add.html
Normal file
@ -0,0 +1,16 @@
|
||||
{% extends "base.html" %}
|
||||
{% load static %}
|
||||
{% block title %}New {{ class }}{% endblock %}
|
||||
{% block head %}
|
||||
<link rel="stylesheet" href="{% static "form.css" %}">
|
||||
{% endblock %}
|
||||
{% block main %}
|
||||
<div class="container">
|
||||
<h2>New {{ class }}</h2>
|
||||
<form action="" method="POST">
|
||||
{% csrf_token %}
|
||||
{{ form }}
|
||||
<button type="submit">Create</button>
|
||||
</form>
|
||||
</div>
|
||||
{% endblock %}
|
@ -4,6 +4,7 @@
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>{% block title %}Title{% endblock %}</title>
|
||||
<link rel="shortcut icon" href="{% static "logo.svg" %}" type="image/x-svg">
|
||||
<link rel="stylesheet" href="{% static "base.css" %}">
|
||||
<script src="{% static "base.js" %}"></script>
|
||||
{% block head %}{% endblock %}
|
||||
@ -11,6 +12,7 @@
|
||||
<body>
|
||||
<header>
|
||||
<nav>
|
||||
<a class="logo" href="{% url "dashboard" %}"><img src="{% static "logo.svg" %}" alt="Time Dispatcher logo"></a>
|
||||
{% 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 %}
|
||||
|
@ -2,7 +2,7 @@
|
||||
{% load static %}
|
||||
{% block title %}Editing {{ class }} {{ id }}{% endblock %}
|
||||
{% block head %}
|
||||
<link rel="stylesheet" href="{% static "edit.css" %}">
|
||||
<link rel="stylesheet" href="{% static "form.css" %}">
|
||||
{% endblock %}
|
||||
{% block main %}
|
||||
<div class="container">
|
||||
|
@ -1,12 +1,19 @@
|
||||
{% extends "base.html" %}
|
||||
{% load static %}
|
||||
{% block title %}Import tasks{% endblock %}
|
||||
{% block head %}
|
||||
<link rel="stylesheet" href="{% static "form.css" %}">
|
||||
{% 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>
|
||||
<div class="container">
|
||||
<h1>Import tasks</h1>
|
||||
<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>
|
||||
</div>
|
||||
{% endblock %}
|
@ -2,19 +2,25 @@
|
||||
{% load static %}
|
||||
{% block head %}
|
||||
<link rel="stylesheet" href="{% static "list.css" %}">
|
||||
<script src="{% static "list.js" %}"></script>
|
||||
{% block extra-head %}{% endblock %}
|
||||
{% endblock %}
|
||||
{% block main %}
|
||||
<ul class="list">
|
||||
{% for element in elements %}
|
||||
<li data-id="{{ element.id }}" class="{% block extra-class %}{% endblock %}">
|
||||
{% 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>
|
||||
<div class="list-wrapper">
|
||||
<div class="list-header">
|
||||
<button class="new">New {{ class_name }}</button>
|
||||
</div>
|
||||
<ul class="list">
|
||||
{% for element in elements %}
|
||||
<li data-id="{{ element.id }}" class="{% block extra-class %}{% endblock %}">
|
||||
{% block element %}{% endblock %}
|
||||
<div class="actions">
|
||||
{% block actions %}{% endblock %}
|
||||
</div>
|
||||
</li>
|
||||
{% empty %}
|
||||
<li class="empty">No {{ class_name }} defined yet</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
</div>
|
||||
{% endblock %}
|
@ -1,15 +1,15 @@
|
||||
{% extends "list.html" %}
|
||||
{% load static %}
|
||||
{% block title %}Parents{% endblock %}
|
||||
{% block element_name %}parent{% endblock %}
|
||||
{% block extra-head %}
|
||||
<link rel="stylesheet" href="{% static "parents.css" %}">
|
||||
<script src="{% static "parents.js" %}"></script>
|
||||
{% endblock %}
|
||||
{% block extra-class %}{% if element.is_productive %}productive{% endif %}{% endblock %}
|
||||
{% block element %}
|
||||
<div class="name">{{ element.name }}</div>
|
||||
<div class="project_num">({{ element.project_num }})</div>
|
||||
{% if element.project_num %}
|
||||
<div class="project_num">({{ element.project_num }})</div>
|
||||
{% endif %}
|
||||
{% endblock %}
|
||||
{% block actions %}
|
||||
<button class="edit">Edit</button>
|
||||
|
Reference in New Issue
Block a user